Skip to content

Commit 67349fa

Browse files
🐛 fix: Add documented RBAC prerequisites to test template
Add bind and escalate verbs to test RBAC template to comply with documented prerequisites in docs/concepts/permission-model.md. These verbs are REQUIRED per our documentation for installer ServiceAccounts that install operators with their own RBAC. The missing prerequisites were exposed by the rbac-escalation e2e test, which uses an operator requiring permissions the test SA doesn't have (storage.k8s.io, scheduling.k8s.io). Without bind/escalate verbs, Kubernetes rejects the ClusterRoleBinding creation with escalation prevention errors. Previous tests passed because they only used test-operator, which has minimal RBAC (tokenreviews, subjectaccessreviews) that the test SA coincidentally already has. This created false confidence and hid the incomplete RBAC template. Fixes: rbac-escalation e2e test Aligns: test template with docs/concepts/permission-model.md See: https://github.com/operator-framework/operator-controller/actions/runs/20920337864/job/60103970542?pr=2441
1 parent d192d08 commit 67349fa

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/e2e/steps/testdata/rbac-template.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ rules:
5050
- roles
5151
- clusterrolebindings
5252
- rolebindings
53-
verbs: [ update, create, list, watch, get, delete, patch ]
53+
# The bind and escalate verbs allow the ServiceAccount to create role bindings
54+
# for roles it doesn't have and grant permissions beyond its own. This is required
55+
# because extension bundles contain their own RBAC that must be created.
56+
# See docs/concepts/permission-model.md for details on these requirements.
57+
verbs: [ update, create, list, watch, get, delete, patch, bind, escalate ]
5458
- apiGroups: ["coordination.k8s.io"]
5559
resources: ["leases"]
5660
verbs: [ update, create, list, watch, get, delete, patch ]

0 commit comments

Comments
 (0)