fix: replace wildcard verbs on secrets and RBAC resources#422
Open
mgrzybek wants to merge 2 commits into
Open
Conversation
irt-shpc
previously approved these changes
Jun 22, 2026
mgrzybek
force-pushed
the
fix/c2-c3-rbac-wildcard-verbs
branch
from
June 29, 2026 14:35
1d787e7 to
c8c0e3a
Compare
- The secrets ClusterRole rule used a verb wildcard ("*"), granting
implicit access to any future special verb on secrets cluster-wide.
Replaced with the explicit set of verbs the operator actually requires
(get, list, watch, create, update, patch, delete). Full namespace
scoping (Role+RoleBinding per managed namespace) is a separate
operator-code change; this PR documents the required verbs precisely.
- The RBAC ClusterRole rule used a verb wildcard on roles,
rolebindings, clusterroles and clusterrolebindings. This implicitly
granted the escalate and bind verbs, allowing a compromised operator
pod to add arbitrary permissions to any ClusterRole or create a
ClusterRoleBinding pointing at cluster-admin. Replaced with the same
explicit verb set, removing escalate and bind. The Dex chart's
ClusterRole only requests permissions the operator already holds, so
no escalate/bind is needed for Helm installs to succeed.
mgrzybek
force-pushed
the
fix/c2-c3-rbac-wildcard-verbs
branch
from
June 29, 2026 15:00
c8c0e3a to
4d5f970
Compare
irt-shpc
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finding
secretscluster-wide (chart/templates/clusterrole.yaml:52–57)clusterrolesandclusterrolebindings— privilege escalation (chart/templates/clusterrole.yaml:85–93)Root cause
Both rules used
"*"as the verb list in the operator'sClusterRole.The wildcard grants implicit access to any future special verb on
secretscluster-wide, including across all tenant namespaces (Keycloak admin passwords, OIDC client secrets, TLS certificates).The wildcard on the RBAC rule implicitly included the
escalateandbindverbs.escalateallows modifying anyClusterRoleto add permissions beyond what the operator itself holds;bindallows creatingClusterRoleBindingobjects referencing roles the operator could not normally bind to (e.g.cluster-admin). A compromised operator pod could exploit these to achieve full cluster takeover.Changes
chart/templates/clusterrole.yaml: replaced"*"on thesecretsrule with the explicit verb set the operator actually uses (get,list,watch,create,update,patch,delete)chart/templates/clusterrole.yaml: replaced"*"on the RBAC rule (roles,rolebindings,clusterroles,clusterrolebindings) with the same explicit verb set, removingescalateandbindMerge order
No dependency on other open PRs.