SREP-4471 Remove Write permissions in LPSRE RBAC#2710
SREP-4471 Remove Write permissions in LPSRE RBAC#2710feichashao wants to merge 3 commits intoopenshift:masterfrom
Conversation
WalkthroughMultiple ClusterRole RBAC manifests across the backplane were tightened: numerous create/patch/update/delete verbs were removed for jobs, pods, builds, PVCs, scaling/patching of controllers, operator/OLM resources, Velero, and Tekton, leaving predominantly read-only (get/list/watch) access where applicable. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
deploy/backplane/lpsre/rhoam/01-rhoam-lpsre-admins-project.ClusterRole.yaml (1)
82-91: Tekton access correctly reduced to read-only; minor trailing whitespace.The change to
get,list,watchis correct and consistent with the RHMI project ClusterRole.Line 91 appears to have trailing whitespace or an empty line with spaces. Consider removing it for cleaner formatting.
🧹 Remove trailing whitespace
- get - list - watch -🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@deploy/backplane/lpsre/rhoam/01-rhoam-lpsre-admins-project.ClusterRole.yaml` around lines 82 - 91, There is trailing whitespace / an extra blank line after the Tekton permission block in the ClusterRole (the block with apiGroups: tekton.dev, resources: '*', verbs: get/list/watch); remove the trailing spaces or empty line following that block so the YAML ends cleanly and passes formatting checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@deploy/backplane/lpsre/rhoam/01-rhoam-lpsre-admins-project.ClusterRole.yaml`:
- Around line 82-91: There is trailing whitespace / an extra blank line after
the Tekton permission block in the ClusterRole (the block with apiGroups:
tekton.dev, resources: '*', verbs: get/list/watch); remove the trailing spaces
or empty line following that block so the YAML ends cleanly and passes
formatting checks.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 83066336-8e9b-4bac-8bef-1bf97c0b7d27
📒 Files selected for processing (10)
deploy/acm-policies/50-GENERATED-backplane-lpsre.Policy.yamldeploy/backplane/lpsre/10-lpsre-admins-project.ClusterRole.ymldeploy/backplane/lpsre/acs/02-acs-lpsre-admins-project.ClusterRole.yamldeploy/backplane/lpsre/rhmi/01-rhmi-lpsre-admins-cluster-aggregate.ClusterRole.yamldeploy/backplane/lpsre/rhmi/01-rhmi-lpsre-admins-project.ClusterRole.yamldeploy/backplane/lpsre/rhoam/01-rhoam-lpsre-admins-cluster-aggregate.ClusterRole.yamldeploy/backplane/lpsre/rhoam/01-rhoam-lpsre-admins-project.ClusterRole.yamlhack/00-osd-managed-cluster-config-integration.yaml.tmplhack/00-osd-managed-cluster-config-production.yaml.tmplhack/00-osd-managed-cluster-config-stage.yaml.tmpl
💤 Files with no reviewable changes (3)
- deploy/backplane/lpsre/acs/02-acs-lpsre-admins-project.ClusterRole.yaml
- deploy/backplane/lpsre/10-lpsre-admins-project.ClusterRole.yml
- deploy/acm-policies/50-GENERATED-backplane-lpsre.Policy.yaml
|
@feichashao: 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. |
|
/hold Communicating with LPSRE regarding the change. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feichashao, xiaoyu74 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 |
| - update | ||
| - watch | ||
| # LP SRE can interact with installplans | ||
| - apiGroups: |
There was a problem hiding this comment.
@feichashao Aligned with the direction of this PR overall, but flagging one carve-out request from the RHOAM side:We need to retain the ability to manually patch RHOAM Install-plans without elevation. All RHOAM upgrades are service-affecting, and manual Install-plan approval is the single most common upgrade-time intervention we perform. Blast radius is bounded — patch on an IP only lets us flip spec.approved=true on a plan OLM has already generated, we can't synthesize new state with it. Requiring backplane elevate per-approval during an active upgrade window is a real MTTR cost in exactly the moments we're already time-pressured.
Proposing we keep this rule:
# LP SRE can interact with installplans
- apiGroups:
- "operators.coreos.com"
resources:
- installplans
verbs:
- "patch"
I would ask the same for the equivalent block in rhmi/01-rhmi-lpsre-admins-project.ClusterRole.yaml for consistency.
What type of PR is this?
cleanup
What this PR does / why we need it?
For security and compliance reasons, we want to limit the permissions SRE have. Currently, SRE can perform many write actions (create/patch/delete) on many openshift platform namespaces.
This PR reduces most write permissions for the LPSRE RBAC.
If SRE need write operations to solve issues, they can use ocm backplane elevate, which requires a justification and go through the normal elevation process.
The PR keeps some write permissions which are not actually changing the cluster resources.
The
create pods/portforwardis kept for monitoring, which is needed by ocm backplane console.The
create podsecuritypolicyreviews , podsecuritypolicyselfsubjectreviews, podsecuritypolicysubjectreviews and tokenreviewsare kept as they are actually read-only operations which is for checking auth related stuff.Which Jira/Github issue(s) this PR fixes?
https://redhat.atlassian.net/browse/SREP-4471
Special notes for your reviewer:
Pre-checks (if applicable):
Tested latest changes against a cluster
Included documentation changes with PR
If this is a new object that is not intended for the FedRAMP environment (if unsure, please reach out to team FedRAMP), please exclude it with:
Summary by CodeRabbit