-
Notifications
You must be signed in to change notification settings - Fork 587
OCPBUGS-74506: Remove ConsolePluginSecurityPolicy featuregate #2683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Hello @jhadvig! Some important instructions when contributing to openshift/api: |
|
@jhadvig: This pull request references Jira Issue OCPBUGS-74506, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
📝 WalkthroughWalkthroughThis pull request removes the ConsolePluginContentSecurityPolicy feature gate from the codebase. Test cases for ConsolePlugin content security policy validation are migrated from a feature-gated test file to an ungated test file. The feature gate declaration is removed from the features registry, and all references to it are deleted from feature gate manifests across multiple deployment configurations including Hypershift and SelfManagedHA. The feature gate annotation is also removed from the ConsolePluginSpec documentation. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
@jhadvig: This pull request references Jira Issue OCPBUGS-74506, which is valid. 3 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. |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@console/v1/tests/consoleplugins.console.openshift.io/AAA_ungated.yaml`:
- Around line 264-275: The test text and value are inconsistent: the test claims
a “tab” but the CSP value uses spaces; update the YAML so
spec.contentSecurityPolicy[0].values[0] contains an actual tab character (escape
it) in the URI (replace the series of spaces in the initial block value
"https://scri pt1.com/" with a single \t where intended) or alternatively
rename the test description from “tab” to “spaces” so it accurately reflects the
current input; ensure you only modify the initial block value or the test name
and keep the expectedError unchanged.
| initial: | | ||
| apiVersion: console.openshift.io/v1 | ||
| kind: ConsolePlugin | ||
| spec: | ||
| displayName: foo | ||
| backend: | ||
| type: Service | ||
| contentSecurityPolicy: | ||
| - directive: ScriptSrc | ||
| values: | ||
| - https://scri pt1.com/ | ||
| expectedError: "spec.contentSecurityPolicy[0].values[0]: Invalid value: \"string\": CSP directive value cannot contain a whitespace" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test description says “tab” but the value uses spaces.
Either use an actual tab (escaped) or rename the test to “spaces” to avoid confusion.
🔧 Suggested fix (use a tab escape)
- - name: Should throw an error for invalid CSP directive values with whitespace, using tab
+ - name: Should throw an error for invalid CSP directive values with whitespace, using tab
initial: |
apiVersion: console.openshift.io/v1
kind: ConsolePlugin
spec:
displayName: foo
backend:
type: Service
contentSecurityPolicy:
- directive: ScriptSrc
values:
- - https://scri pt1.com/
+ - "https://scri\tpt1.com/"🤖 Prompt for AI Agents
In `@console/v1/tests/consoleplugins.console.openshift.io/AAA_ungated.yaml` around
lines 264 - 275, The test text and value are inconsistent: the test claims a
“tab” but the CSP value uses spaces; update the YAML so
spec.contentSecurityPolicy[0].values[0] contains an actual tab character (escape
it) in the URI (replace the series of spaces in the initial block value
"https://scri pt1.com/" with a single \t where intended) or alternatively
rename the test description from “tab” to “spaces” so it accurately reflects the
current input; ensure you only modify the initial block value or the test name
and keep the expectedError unchanged.
|
/lgtm |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoelSpeed 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 |
|
@jhadvig: The following tests 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. |
User description
/assign @JoelSpeed
PR Type
Enhancement
Description
Remove ConsolePluginContentSecurityPolicy feature gate
Make CSP configuration always available for ConsolePlugin
Move CSP tests from gated to ungated test suite
Update feature gate manifests and documentation
Diagram Walkthrough
File Walkthrough
5 files
Remove feature gate annotation from CSP fieldDelete ConsolePluginContentSecurityPolicy feature gate definitionClear FeatureGates list for ConsolePlugin CRDAdd full CSP schema to ungated CRD manifestRemove feature-gated CRD manifest file2 files
Add comprehensive CSP validation tests to ungated suiteRemove feature-gated CSP test file entirely1 files
Remove ConsolePluginContentSecurityPolicy from feature matrix8 files
Remove CSP feature gate from Hypershift Default profileRemove CSP feature gate from Hypershift DevPreview profileRemove CSP feature gate from Hypershift OKD profileRemove CSP feature gate from Hypershift TechPreview profileRemove CSP feature gate from SelfManagedHA Default profileRemove CSP feature gate from SelfManagedHA DevPreview profileRemove CSP feature gate from SelfManagedHA OKD profileRemove CSP feature gate from SelfManagedHA TechPreview profile