fix(operator): default fips140 to off via go.mod, not the chart - #350
Open
nshidlansik wants to merge 1 commit into
Open
fix(operator): default fips140 to off via go.mod, not the chart#350nshidlansik wants to merge 1 commit into
nshidlansik wants to merge 1 commit into
Conversation
Same fix as the main-branch source (see the equivalent PR against
main). GOFIPS140=v1.0.0 at build time overrides the fips140 GODEBUG
default to on, so the {{- if ne .Values.fipsMode "off" }} guard around
the GODEBUG env var (merged in the v0.2 backport) meant fipsMode=off
set no GODEBUG at all and fell through to the compiled-in on default:
off and on were identical.
Add a "godebug fips140=off" directive to operator/go.mod, which
overrides GOFIPS140's default back to off at compile time, and restore
the chart's original {{- if ne .Values.fipsMode "off" }} guard.
Verified with crypto/fips140.Enabled() run inside the operator module:
GOFIPS140=v1.0.0, no GODEBUG at runtime -> Enabled() == false (was
true before this fix)
GOFIPS140=v1.0.0, GODEBUG=fips140=on -> Enabled() == true
GOFIPS140=v1.0.0, GODEBUG=fips140=only -> Enabled() == true
Found by Aviad Hayumi in review after #335 (the main-branch source of
this backport) merged.
Signed-off-by: Nir Shidlansik <nshidlansik@nvidia.com>
nshidlansik
requested review from
AviadHayumi,
Isan-Rivkin,
rogirun,
ronlv10,
shaked-bouktus and
yuval-gr
as code owners
September 8, 2026 16:29
yuval-gr
approved these changes
Sep 8, 2026
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.
What does this PR do?
Follow-up to the
v0.2FIPS 140-3 backport (#348): fixes the same bug thatwas fixed on
mainin #349.fipsMode: off(the chart default) silently ran the operator with FIPS modeenabled instead of disabled.
GOFIPS140=v1.0.0at build time makes theoperator binary's own compiled-in
GODEBUGdefaultfips140=on(per Go'sown docs:
GOFIPS140"enable[s] FIPS 140-3 mode by default", and thefips140GODEBUG option "defaults to off unless GOFIPS140 is set at buildtime").
deployment.yaml's{{- if ne .Values.fipsMode "off" }}guardaround the
GODEBUGenv var meantfipsMode=offset noGODEBUGat all, sothe binary fell through to its compiled-in
ondefault:offandonwereidentical.
Fix: add a
godebug fips140=offdirective tooperator/go.mod, whichoverrides
GOFIPS140's default back to off at compile time. The chart's{{- if ne .Values.fipsMode "off" }}guard is kept as-is.Verified with
crypto/fips140.Enabled()run inside the operator module:Found by Aviad Hayumi in review after #335 (the
mainsource of thebackport) merged.
Related issue(s)
Relates to #334
Checklist
git commit -s)make check)