1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00
gocsaf/docs/scripts
Bernhard Reiter e8706e5eb9 feat: perform go path repo move
* Change the go module path
   from github.com/csaf-poc/csaf_distribution to github.com/gocsaf/csaf.
 * Rename archive for release tarballs.
 * Adjust testing scripts and documentation.
2024-11-04 13:20:47 +01:00
..
createCCForITest.sh Change Licenses from MIT to Apache 2.0 2024-04-22 13:11:30 +02:00
createRootCAForITest.sh Change Licenses from MIT to Apache 2.0 2024-04-22 13:11:30 +02:00
createWebserverCertForITest.sh Change Licenses from MIT to Apache 2.0 2024-04-22 13:11:30 +02:00
DNSConfigForItest.sh Change Licenses from MIT to Apache 2.0 2024-04-22 13:11:30 +02:00
downloadExamples.sh Change Licenses from MIT to Apache 2.0 2024-04-22 13:11:30 +02:00
prepareUbuntuInstanceForITests.sh feat: perform go path repo move 2024-11-04 13:20:47 +01:00
Readme.md feat: perform go path repo move 2024-11-04 13:20:47 +01:00
setupProviderForITest.sh Use .test TLD for integration setup (#577) 2024-09-29 09:08:01 +02:00
setupValidationService.sh feat: no longer require to be root user to call setup scripts 2024-08-05 16:41:55 +02:00
testAggregator.sh feat: perform go path repo move 2024-11-04 13:20:47 +01:00
testChecker.sh feat: perform go path repo move 2024-11-04 13:20:47 +01:00
testDownloader.sh feat: perform go path repo move 2024-11-04 13:20:47 +01:00
TLSClientConfigsForITest.sh feat: perform go path repo move 2024-11-04 13:20:47 +01:00
TLSConfigsForITest.sh feat: perform go path repo move 2024-11-04 13:20:47 +01:00
uploadToProvider.sh Change Licenses from MIT to Apache 2.0 2024-04-22 13:11:30 +02:00

Scripts for assisting the Integration tests. They were written on Ubuntu 20.04 TLS amd64 and also tested with 24.04 TLS.

  • prepareUbuntuInstanceForITests.sh installs the required packages for the csaf integration tests on a naked Ubuntu LTS amd64.

  • TLSConfigsForITest.sh generates a root CA and webserver cert by running createRootCAForITest.sh and createWebserverCertForITest.sh and configures nginx for serving TLS connections.

  • TLSClientConfigsForITest.sh generates client certificates by calling createCCForITest.sh which uses the root certificate initialized before with createRootCAForITest.sh. It configures nginx to enable the authentication with client certificate. (This assumes that the same folder name is used to create the root certificate)

  • setupProviderForITest.sh builds the csaf_provider, writes the required nginx configurations and create the initial folders. IT calls uploadToProvider.sh to upload some csaf example files to the provider.

As creating the folders needs to authenticate with the csaf_provider, the configurations of TLS server and Client certificate authentication should be set. So it is recommended to call the scripts in this order: TLSConfigsForITest.sh, TLSClientConfigsForITest.sh, setupProviderForITest.sh

Calling example (as user with sudo privileges):

    curl --fail -O https://raw.githubusercontent.com/gocsaf/csaf/main/docs/scripts/prepareUbuntuInstanceForITests.sh
    sudo bash prepareUbuntuInstanceForITests.sh

    git clone https://github.com/gocsaf/csaf.git # --branch <name>
    pushd csaf/docs/scripts/

    export FOLDERNAME=devca1 ORGANAME="CSAF Tools Development (internal)"
    source ./TLSConfigsForITest.sh
    set +e  # for an interactive shell, reverse set -e done by previous line
    ./TLSClientConfigsForITest.sh
    ./setupProviderForITest.sh
    ./testAggregator.sh
    ./testDownloader.sh