OTA-2108: restrict console plugin NetworkPolicy to openshift-console namespace - #1450
Conversation
…nsole namespace The allow-console-ingress NetworkPolicy opened port 9001 to any pod in the cluster. Restrict ingress to the openshift-console namespace using a namespaceSelector, matching the annotation's stated intent and enforcing least-privilege networking. Fixes OTA-2108 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@jrangelramos: This pull request references OTA-2108 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 weakness to target the "5.1.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: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe NetworkPolicy now allows ingress only from the ChangesNetworkPolicy ingress restriction
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized change restricts console plugin network access to the openshift-console namespace. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ 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. Comment |
|
Scheduling tests matching the |
|
@jrangelramos: 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. |
| app: cluster-update-console-plugin | ||
| ingress: | ||
| - ports: | ||
| - from: |
There was a problem hiding this comment.
I don't see anything here about why @jhadvig didn't tune access like this (or even more tightly, can't we also match the app: console label?).
But also, the long-established monitoring ConsolePlugin doesn't bother to set from for their ConsolePlugin, so 🤷, doesn't seem like a particularly sensitive thing to protect.
wking
left a comment
There was a problem hiding this comment.
Seems like there are lots of valid options in this space, and I'm not particular about which path we take. I'm fine with what we had before this pull. I'm fine with what this pull is delivering. And I'd be fine if folks wanted to tighten it down more. As long as the testing shows it still working, that's enough for me. The odds of someone exploiting the low-priviledge console-plugin service to harm a cluster or capture sensitive data seem very low.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ankitathomas, jrangelramos, wking 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 |
Summary
allow-console-ingressNetworkPolicy opened port 9001/TCP to any pod in the cluster,despite the annotation stating it allows ingress "from the console" only.
from: namespaceSelectormatchingkubernetes.io/metadata.name: openshift-consoleto enforce least-privilege networking and align the policy with its stated intent.
Fixes https://redhat.atlassian.net/browse/OTA-2108
Test plan
gotestsum --packages="./pkg/agenticrun/..."— 49 tests)🤖 Generated with Claude Code
Summary by CodeRabbit