* make jsonschema loading work with current versions of the jsonschema library
again and simplify the code while at it.
* Improve itest workflow for validation service, to make them more robust.
* Use a github action to setup nodejs and use a version that is
required by https://github.com/secvisogram/csaf-validator-service/.
* Add nodejs16 installation to prepareUbuntuInstanceForITests.sh.
(so it can be done once in manual settings)
* Add refreshing of apt cache before apt install because sometimes
the cached ubuntu image does not have the apt cache current.
---------
Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
|
||
|---|---|---|
| .. | ||
| createCCForITest.sh | ||
| createRootCAForITest.sh | ||
| createWebserverCertForITest.sh | ||
| DNSConfigForItest.sh | ||
| downloadExamples.sh | ||
| prepareUbuntuInstanceForITests.sh | ||
| Readme.md | ||
| setupProviderForITest.sh | ||
| setupValidationService.sh | ||
| testAggregator.sh | ||
| testChecker.sh | ||
| testDownloader.sh | ||
| TLSClientConfigsForITest.sh | ||
| TLSConfigsForITest.sh | ||
| uploadToProvider.sh | ||
Scripts for assisting the Integration tests. They are written on Ubuntu 20.04 TLS amd64.
-
prepareUbunutForITest.shinstalls the required packages for the csaf_distribution integration tests on a naked ubuntu 20.04 LTS amd64. -
TLSConfigsForITest.shgenerates a root CA and webserver cert by runningcreateRootCAForITest.shandcreateWebserverCertForITest.shand configures nginx for serving TLS connections. -
TLSClientConfigsForITest.shgenerates client certificates by callingcreateCCForITest.shwhich uses the root certificate initialized before withcreateRootCAForITest.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.shbuilds the csaf_provider, writes the required nginx configurations and create the initial folders. IT callsuploadToProvider.shto 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 root):
curl --fail -O https://raw.githubusercontent.com/csaf-poc/csaf_distribution/main/docs/scripts/prepareUbuntuInstanceForITests.sh
bash prepareUbuntuInstanceForITests.sh
git clone https://github.com/csaf-poc/csaf_distribution.git # --branch <name>
pushd csaf_distribution/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