diff --git a/csaf/remotevalidation.go b/csaf/remotevalidation.go index 329e48f..2e7a53a 100644 --- a/csaf/remotevalidation.go +++ b/csaf/remotevalidation.go @@ -23,7 +23,7 @@ import ( // defaultURL is default URL where to look for // the validation service. const ( - defaultURL = "http://localhost:3000" + defaultURL = "http://localhost:8082" validationPath = "/api/v1/validate" ) diff --git a/docs/examples/provider_config.toml b/docs/examples/provider_config.toml index 1cd2180..bae72f8 100644 --- a/docs/examples/provider_config.toml +++ b/docs/examples/provider_config.toml @@ -83,7 +83,7 @@ # This example provides an overview over the syntax, # adjust the parameters depending on your setup. #[remote_validator] -#url = "http://localhost:3000" +#url = "http://localhost:8082" #presets = ["mandatory"] #cache = "/var/lib/csaf/validations.db" diff --git a/docs/scripts/setupProviderForITest.sh b/docs/scripts/setupProviderForITest.sh index fec79b2..86cbe23 100755 --- a/docs/scripts/setupProviderForITest.sh +++ b/docs/scripts/setupProviderForITest.sh @@ -116,12 +116,17 @@ set +e echo echo === Try to reach the validator service ten times, up to nine fails are ok for ((i = 1; i <= 10; i++)); do - if [ $(curl -IL http://localhost:3000/api/v1/tests | grep -c HTTP ) != "0" ]; then + if [ $(curl -IL http://localhost:8082/api/v1/tests | grep -c HTTP ) != "0" ]; then break fi sleep 3 done +if [ $i == 11 ]; then + echo Could not connect to validation service! + exit 1 +fi + # Upload files ./uploadToProvider.sh diff --git a/docs/scripts/setupValidationService.sh b/docs/scripts/setupValidationService.sh index 273eebc..bc7629d 100755 --- a/docs/scripts/setupValidationService.sh +++ b/docs/scripts/setupValidationService.sh @@ -1,4 +1,14 @@ #!/usr/bin/env bash +# +# This file is Free Software under the MIT License +# without warranty, see README.md and LICENSES/MIT.txt for details. +# +# SPDX-License-Identifier: MIT +# +# SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) +# Software-Engineering: 2022 Intevation GmbH + +set -e # to exit if a command in the script fails sudo mkdir -p /var/lib/csaf sudo chgrp www-data /var/lib/csaf/ @@ -8,7 +18,7 @@ sudo chgrp www-data /var/lib/csaf/validations.db sudo chmod g+rw,o-rwx /var/lib/csaf/validations.db echo ' -remote_validator= { "url" = "http://localhost:3000", "presets" = ["mandatory"], "cache" = "/var/lib/csaf/validations.db" } +remote_validator= { "url" = "http://localhost:8082", "presets" = ["mandatory"], "cache" = "/var/lib/csaf/validations.db" } ' | sudo tee --append /etc/csaf/config.toml # Install nodejs