Skip to content

Enable TLSv1.2 for ZTunnel when in FIPS mode#1547

Merged
istio-testing merged 2 commits intoistio-ecosystem:mainfrom
dgn:ztunnel-fips-140-2
Feb 12, 2026
Merged

Enable TLSv1.2 for ZTunnel when in FIPS mode#1547
istio-testing merged 2 commits intoistio-ecosystem:mainfrom
dgn:ztunnel-fips-140-2

Conversation

@dgn
Copy link
Copy Markdown
Collaborator

@dgn dgn commented Jan 27, 2026

This change builds on istio/ztunnel#1711 which adds TLSv1.2 support to ZTunnel when TLS12_ENABLED is set to true. This patch will always set the env var when in FIPS mode, for all versions of ZTunnel, even though it is only supported from 1.29+, but the env var will simply be ignored by versions that don't support it.

@dgn dgn requested a review from a team as a code owner January 27, 2026 10:01
@dgn
Copy link
Copy Markdown
Collaborator Author

dgn commented Jan 27, 2026

Adding a hold until I can test this on an actual FIPS-enabled cluster

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.85%. Comparing base (1747f2d) to head (9c6d75f).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pkg/istiovalues/fips.go 60.00% 1 Missing and 1 partial ⚠️
pkg/reconcile/ztunnel.go 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1547      +/-   ##
==========================================
+ Coverage   80.75%   80.85%   +0.10%     
==========================================
  Files          50       50              
  Lines        2458     2466       +8     
==========================================
+ Hits         1985     1994       +9     
+ Misses        348      346       -2     
- Partials      125      126       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This change builds on istio/ztunnel#1711 which
adds TLSv1.2 support to ZTunnel when `TLS12_ENABLED` is set to `true`.
This patch will always set the env var when in FIPS mode, for all
versions of ZTunnel, even though it is only supported from 1.29+, but
the env var will simply be ignored by versions that don't support it.

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Copy link
Copy Markdown
Contributor

@sridhargaddam sridhargaddam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small observation, otherwise LGTM.

values := helm.Values{}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
FipsEnabled = tt.fipsEnabled
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FipsEnabled seems to be a global variable and we are mutating its state. I think we should restore its state to the original value after calling ApplyZTunnelFipsValues.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a separate commit for that, PTAL

In our tests, we sometimes set FipsEnabled manually. We should make sure
to reset it to its original value during test cleanup.

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
@dgn
Copy link
Copy Markdown
Collaborator Author

dgn commented Feb 11, 2026

/hold cancel

I was able to verify this on a FIPS-enabled cluster.

@dgn
Copy link
Copy Markdown
Collaborator Author

dgn commented Feb 12, 2026

/retest

@dgn
Copy link
Copy Markdown
Collaborator Author

dgn commented Feb 12, 2026

/cherry-pick release-1.28

@istio-testing
Copy link
Copy Markdown
Collaborator

@dgn: once the present PR merges, I will cherry-pick it on top of release-1.28 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.28

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@istio-testing istio-testing merged commit e384562 into istio-ecosystem:main Feb 12, 2026
16 of 17 checks passed
@istio-testing
Copy link
Copy Markdown
Collaborator

In response to a cherrypick label: #1547 failed to apply on top of branch "release-1.28":

Applying: Enable TLSv1.2 for ZTunnel when in FIPS mode
Using index info to reconstruct a base tree...
A	pkg/reconcile/ztunnel.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): pkg/reconcile/ztunnel.go deleted in HEAD and modified in Enable TLSv1.2 for ZTunnel when in FIPS mode. Version Enable TLSv1.2 for ZTunnel when in FIPS mode of pkg/reconcile/ztunnel.go left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Enable TLSv1.2 for ZTunnel when in FIPS mode

@istio-testing
Copy link
Copy Markdown
Collaborator

In response to a cherrypick label: new issue created for failed cherrypick: #1593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants