Skip to content

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
backport/csl-13179-fips-fix-release-1.9.x
Open

fix: correct FIPS Consul version check in connect-init (CSL-13179) [backport 1.9.x]#5255
Surabhi-1605 wants to merge 3 commits intorelease/1.9.xfrom
backport/csl-13179-fips-fix-release-1.9.x

Conversation

@Surabhi-1605
Copy link
Copy Markdown
Contributor

@Surabhi-1605 Surabhi-1605 commented Apr 24, 2026

Summary

Backport of #5252release/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.go had three bugs causing both WARN messages to fire unconditionally on every pod startup:

  1. Called /v1/agent/version — endpoint does not exist in Consul (404)
  2. var versionInfo map[string]interface{} is nil/passed by value — response never populated
  3. No else guard — 'non-FIPS detected' warning fired even when the API call failed

Fix

Read state.DataplaneFeatures["DATAPLANE_FEATURES_FIPS"] — already populated by consul-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

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
@Surabhi-1605 Surabhi-1605 requested a review from a team as a code owner April 24, 2026 08:18
@Surabhi-1605 Surabhi-1605 self-assigned this Apr 29, 2026
@Surabhi-1605 Surabhi-1605 added the pr/no-backport signals that a PR will not contain a backport label label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/no-backport signals that a PR will not contain a backport label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant