COO-1819:fix: Add TLS min version and cipher suite configuration support#232
COO-1819:fix: Add TLS min version and cipher suite configuration support#232shwetaap wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@shwetaap: This pull request references COO-1819 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughAdds CLI flags/env for TLS min version and cipher suites, parsing helpers for both, passes parsed values into ChangesTLS Configuration Customization
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmd/plugin-backend.go`:
- Around line 115-119: The tlsVersions map and parseTLSVersion path currently
allow VersionTLS10/11 which can downgrade cfg.TLSMinVersion below TLS1.2; update
the code to forbid versions < tls.VersionTLS12 by removing "VersionTLS10" and
"VersionTLS11" from the tlsVersions map (or, after parsing, clamp any parsed
value lower than tls.VersionTLS12 to tls.VersionTLS12), and ensure when applying
cfg.TLSMinVersion (after calling oscrypto.SecureTLSConfig) you enforce a minimum
of tls.VersionTLS12 (optionally logging or returning an error if a user
requested a lower version) so the server never runs under TLS1.0/1.1.
In `@pkg/server.go`:
- Around line 62-63: The cfg.TLSCipherSuites assignment only affects TLS
1.0–1.2; TLS 1.3 suites are not configurable, so update the code around
tlsConfig.CipherSuites and cfg.TLSCipherSuites to either (a) add a clear comment
explaining this limitation, or (b) validate/enforce that cfg.TLSMinVersion (or
tlsConfig.MinVersion) is <= tls.VersionTLS12 when cfg.TLSCipherSuites is
non-empty: if TLSCipherSuites is set and TLSMinVersion > tls.VersionTLS12,
return an error or lower the min version and log a warning so callers don’t
assume TLS 1.3 will honor cipher suites. Ensure references to TLSCipherSuites,
tlsConfig.CipherSuites and TLSMinVersion (tlsConfig.MinVersion) are updated
accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 8c08d1c6-c666-4bf1-8a7d-1f8c9e1b7b1c
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (4)
cmd/plugin-backend.gocmd/plugin-backend_test.gogo.modpkg/server.go
|
@shwetaap: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alanconway, shwetaap The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Shweta Padubidri <spadubid@redhat.com>
Add TLS min version and cipher suite configuration support
Summary by CodeRabbit
New Features
Tests