OPRUN-4591: Add RBAC for console lifecycle-server API access#1144
OPRUN-4591: Add RBAC for console lifecycle-server API access#1144perdasilva wants to merge 1 commit intoopenshift:mainfrom
Conversation
Add a ClusterRole and ClusterRoleBinding that grant the console ServiceAccount read access to the lifecycle-server nonResourceURL paths (/api/*/lifecycles/*). The lifecycle-server authenticates callers via TokenReview and authorizes them via SubjectAccessReview on nonResourceURLs. These RBAC resources allow the console backend to call the lifecycle API using its pod ServiceAccount token. The manifest is gated behind TechPreviewNoUpgrade and scoped to the Console capability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
WalkthroughA new Kubernetes RBAC manifest file is introduced that defines a ClusterRole granting read access to lifecycle-related API non-resource URLs and a ClusterRoleBinding that binds this role to the console ServiceAccount in the openshift-console namespace. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: perdasilva 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 |
|
/hold not ready |
|
/retest |
|
@perdasilva: This pull request references OPRUN-4591 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 story 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. |
|
@perdasilva: 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. |
Summary
ClusterRole(system:openshift:console:lifecycle-reader) andClusterRoleBindingthat grant the console ServiceAccountGETaccess to lifecycle-server nonResourceURL paths (/api/*/lifecycles/*).TokenReview/SubjectAccessReviewfor authn/authz on nonResourceURLs, so the console pod SA needs explicit RBAC to call the API.TechPreviewNoUpgradefeature set and scoped to theConsolecapability.Details
The lifecycle-server exposes operator lifecycle data (e.g. update risks, recommended actions) via nonResourceURL endpoints. The console backend needs to query these endpoints to surface lifecycle information in the UI.
Since nonResourceURLs are not covered by standard namespace-scoped RBAC, a dedicated
ClusterRolewithnonResourceURLsrules is required. TheClusterRoleBindingbinds this role to theconsoleServiceAccount in theopenshift-consolenamespace.Test plan
GET /api/*/lifecycles/*endpoints on the lifecycle-server🤖 Commit and PR descriptions generated with Claude Code
Summary by CodeRabbit