Repository navigation
Warn when RD_INSECURE_SSL_HOSTNAME disables hostname verification - #660
Open
skywalkw3r wants to merge 1 commit into
Open
skywalkw3r wants to merge 1 commit into
skywalkw3r wants to merge 1 commit into
Conversation
RD_INSECURE_SSL=true prints a warning on every run, but RD_INSECURE_SSL_HOSTNAME=true silently accepts any certificate that chains to a trusted CA, whatever host it was issued for. Left set in CI or rd.conf, it lets a certificate for an unrelated domain intercept the connection and the API token without any reminder that the check is off. Print a matching warning, skipped when RD_INSECURE_SSL=true already warned, and honour RD_INSECURE_SSL_NO_WARN=true. Signed-off-by: Lucas Weir <skywalkw3r@protonmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #663.
RD_INSECURE_SSL=trueprints a warning on every run, butRD_INSECURE_SSL_HOSTNAME=truesilently disables hostname verification. With it set, any certificate that chains to a trusted CA is accepted for the Rundeck host, so a certificate for an unrelated domain is enough to intercept the connection and the API token. A setting like that is easy to forget in CI variables orrd.conf.This prints a matching warning when
RD_INSECURE_SSL_HOSTNAME=true(unlessRD_INSECURE_SSL=truealready printed one), and honours the existingRD_INSECURE_SSL_NO_WARN=trueto suppress it.Testing
./gradlew :rd-cli-tool:testpasses (348 tests, JDK 17).rd system infoagainst an unreachable https URL:RD_INSECURE_SSL_HOSTNAME=true# WARNING: RD_INSECURE_SSL_HOSTNAME=true, server hostnames will not be verified against the certificateRD_INSECURE_SSL_HOSTNAME=true+RD_INSECURE_SSL_NO_WARN=trueRD_INSECURE_SSL_HOSTNAME=true+RD_INSECURE_SSL=trueRD_INSECURE_SSL=truewarning