Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for WFLY-15871, Warning logged when no HTTPS_* variables configured. #295

Merged
merged 1 commit into from Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -323,8 +323,7 @@ configure_https() {
create_elytron_https_connector_cli "https" "https" "LocalhostSslContext" "true"
fi

else

elif [ -n "${HTTPS_PASSWORD}" ] || [ -n "${HTTPS_KEYSTORE}" ]; then
if [ -z "${HTTPS_PASSWORD}" ]; then
missing_msg="$missing_msg HTTPS_PASSWORD"
fi
Expand Down
7 changes: 3 additions & 4 deletions jboss/container/wildfly/launch/elytron/test/elytron.bats
Expand Up @@ -295,8 +295,7 @@ EOF
CONFIGURE_ELYTRON_SSL=true
run configure_https
echo "OUTPUT ${output}"
[ "${output}" = "WARN CONFIGURE_ELYTRON_SSL env variable is set to true, that is no more needed, SSL can only be configured using Elytron.
WARN Partial HTTPS configuration, the https connector WILL NOT be configured. Missing: HTTPS_PASSWORD HTTPS_KEYSTORE" ]
[ "${output}" = "WARN CONFIGURE_ELYTRON_SSL env variable is set to true, that is no more needed, SSL can only be configured using Elytron." ]
}

@test "Configure HTTPS - set CONFIGURE_ELYTRON_SSL=false" {
Expand All @@ -309,10 +308,10 @@ WARN Partial HTTPS configuration, the https connector WILL NOT be configured. Mi
ERROR Exiting..." ]
}

@test "Configure HTTPS - missing all required vars" {
@test "Configure HTTPS - missing all required vars, no warning" {
echo '<!-- ##ELYTRON_TLS## -->' > ${CONFIG_FILE}
echo '<!-- ##TLS## -->' >> ${CONFIG_FILE}
expected='WARN Partial HTTPS configuration, the https connector WILL NOT be configured. Missing: HTTPS_PASSWORD HTTPS_KEYSTORE'
expected=''
HTTPS_PASSWORD=
HTTPS_KEYSTORE=
HTTPS_KEYSTORE_TYPE=
Expand Down
Expand Up @@ -42,8 +42,7 @@ teardown() {

run configure
echo "${output}"
[ "${output}" = "WARN Partial HTTPS configuration, the https connector WILL NOT be configured. Missing: HTTPS_PASSWORD HTTPS_KEYSTORE
ERROR SECDOMAIN_NAME env variable can't be set, use ELYTRON_SECDOMAIN_NAME env variable to configure authentication using Elytron.
[ "${output}" = "ERROR SECDOMAIN_NAME env variable can't be set, use ELYTRON_SECDOMAIN_NAME env variable to configure authentication using Elytron.
ERROR Exiting..." ]
}

Expand Down