fix: correct FIPS Consul version check in connect-init (CSL-13179) [backport 1.9.x]#5255
Open
Surabhi-1605 wants to merge 3 commits intorelease/1.9.xfrom
Open
fix: correct FIPS Consul version check in connect-init (CSL-13179) [backport 1.9.x]#5255Surabhi-1605 wants to merge 3 commits intorelease/1.9.xfrom
Surabhi-1605 wants to merge 3 commits intorelease/1.9.xfrom
Conversation
The original code had three bugs: 1. Called /v1/agent/version which does not exist in Consul (404) 2. Passed a nil map by value to Raw().Query(), so the response was never populated and versionInfo was always empty 3. Missing else guard meant the 'non-FIPS detected' warning always fired unconditionally, even when the API call failed The fix reads state.DataplaneFeatures['DATAPLANE_FEATURES_FIPS'] which is already populated by consul-server-connection-manager during initialization via GetSupportedDataplaneFeatures. This is the authoritative, zero-cost way to check server FIPS status. Fixes CSL-13179
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.
Summary
Backport of #5252 →
release/1.9.x(consul-k8s 1.9.x — latest supported release branch).Jira: CSL-13179
What was broken
The FIPS check in
connect-init/command.gohad three bugs causing both WARN messages to fire unconditionally on every pod startup:/v1/agent/version— endpoint does not exist in Consul (404)var versionInfo map[string]interface{}is nil/passed by value — response never populatedelseguard — 'non-FIPS detected' warning fired even when the API call failedFix
Read
state.DataplaneFeatures["DATAPLANE_FEATURES_FIPS"]— already populated byconsul-server-connection-manager v0.1.12(used on this branch) during watcher initialization with ACL token auto-injected via the watcher's gRPC unary interceptor. Zero extra network calls.Files Changed
control-plane/subcommand/connect-init/command.go.changelog/_5252.txt