OCPBUGS-82151: Filter non-FIPS TLS 1.3 ciphers and validate effective profiles#1422
OCPBUGS-82151: Filter non-FIPS TLS 1.3 ciphers and validate effective profiles#1422bentito wants to merge 1 commit intoopenshift:release-4.21from
Conversation
…profiles This change ensures that when the cluster is running in FIPS mode, the non-FIPS compliant TLS_CHACHA20_POLY1305_SHA256 cipher is filtered from the ROUTER_CIPHERSUITES environment variable. Additionally, this change updates validateTLSSecurityProfile to explicitly resolve the effective TLS security profile (including any profile inherited from the APIServer config) and validates that resolved profile, rather than just validating the IngressController's profile overrides, ensuring admission catches invalid Custom profiles on FIPS clusters. (cherry picked from commit 0da1246)
|
@bentito: This pull request references Jira Issue OCPBUGS-3917, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
WalkthroughThe changes introduce FIPS mode awareness to TLS security profile validation and deployment generation. The validation chain now incorporates cluster APIServer config to resolve effective TLS profiles and reject profiles with non-FIPS-approved TLS 1.3 ciphers on FIPS-enabled clusters. Deployment generation detects FIPS mode via procfs and filters TLS 1.3 cipher suites accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant Reconcile
participant Admit
participant Validate
participant ValidateTLS
participant FIPS as FIPS Check
Reconcile->>Admit: Call with apiConfig
Admit->>Validate: Pass apiConfig
Validate->>ValidateTLS: Pass apiConfig
ValidateTLS->>ValidateTLS: Resolve effective TLS profile<br/>(ingress-specific or inherited)
ValidateTLS->>ValidateTLS: Validate custom fields<br/>(presence, cipher syntax, validity)
ValidateTLS->>FIPS: Check if FIPS enabled
alt FIPS Enabled
ValidateTLS->>ValidateTLS: Filter TLS 1.3 ciphers<br/>to FIPS-approved set
alt No FIPS ciphers remain
ValidateTLS-->>Admit: Rejection with offending ciphers
else FIPS ciphers present
ValidateTLS-->>Admit: Validation success
end
else FIPS Disabled
ValidateTLS-->>Admit: Validation success
end
sequenceDiagram
participant DesiredDeployment
participant ProcFS as /proc/sys
participant CipherFilter
participant EnvVar as ROUTER_CIPHERSUITES
DesiredDeployment->>ProcFS: Read fips_enabled
alt File readable
ProcFS-->>DesiredDeployment: FIPS status
else Read error
DesiredDeployment->>DesiredDeployment: Assume non-FIPS
end
DesiredDeployment->>CipherFilter: Check FIPS enabled
alt FIPS Enabled
CipherFilter->>CipherFilter: Filter TLS 1.3 ciphers<br/>to FIPS-approved subset
CipherFilter->>EnvVar: Set filtered ciphers
else FIPS Disabled
CipherFilter->>EnvVar: Set all ciphers
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/jira cherrypick OCPBUGS-3917 |
|
@bentito: An error was encountered cloning bug for cherrypick for bug OCPBUGS-3917 on the Jira server at https://redhat.atlassian.net. No known errors were detected, please see the full error message for details. Full error message.
request failed. Please analyze the request body for more details. Status code: 400: {"errorMessages":[],"errors":{"versions":"Cannot assign issue to versions 21782, 21776 as they have been archived. Please refresh the page to update the list of non-archived versions."}}
Please contact an administrator to resolve this issue, then request a bug refresh with 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. |
|
@bentito: This pull request references Jira Issue OCPBUGS-82151, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
/jira refresh |
|
@bentito: This pull request references Jira Issue OCPBUGS-82151, which is invalid:
Comment 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. |
|
/jira refresh |
|
@bentito: This pull request references Jira Issue OCPBUGS-82151, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (hongli@redhat.com), skipping review request. 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. |
|
@bentito: This pull request references Jira Issue OCPBUGS-82151, which is valid. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (hongli@redhat.com), skipping review request. 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. |
|
/retest |
|
@coderabbitai are the current check failures due to infrastructure problems or actual code problems? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 5408 Let me dig into the failing job logs to check the root cause. 🏁 Script executed: Length of output: 1932 🏁 Script executed: Length of output: 6774 🏁 Script executed: Length of output: 4315 🏁 Script executed: Length of output: 9146
❌
|
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
|
@bentito: The following test failed, say
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. |
|
@coderabbitai please review this PR |
|
✅ Actions performedReview triggered.
|
|
@bentito: This pull request references Jira Issue OCPBUGS-82151, which is valid. 7 validation(s) were run on this bug
Requesting review from QA contact: 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. |
|
✅ Actions performedReview triggered.
|
|
/assign |
|
/lgtm |
Manual backport of #1401 due to merge conflicts.
Summary by CodeRabbit
New Features
Bug Fixes