Repository navigation
Conversation
Signed-off-by: Chris Werner Rau <cwrau@cwrau.info>
cwrau
force-pushed
the
feat/rbac/aggregate-view
branch
from
October 8, 2026 07:33
81180b1 to
5312211
Compare
This branch has not been deployed
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.
Overview
Add ClusterRoles aggregated into the builtin
editandadminroles for thedex.coreos.comstorage resources.What this PR does / why we need it
Users bound to the builtin
edit/adminClusterRoles currently cannot see or manage Dex's Kubernetes-storage resources (dex.coreos.com) without hand-written RBAC. Kubernetes lets operators extend those roles through aggregated ClusterRoles (rbac.authorization.k8s.io/aggregate-to-{edit,admin}: "true").This adds two ClusterRoles, both labelled
aggregate-to-editandaggregate-to-admin:<fullname>-aggregate-view-sensitive:get,list,watch<fullname>-aggregate-edit:create,delete,deletecollection,patch,updatecovering all 12 kinds Dex stores as CRDs: authcodes, authrequests, authsessions, connectors, devicerequests, devicetokens, oauth2clients, offlinesessionses, passwords, refreshtokens, signingkeies, useridentities.
None of these is aggregated into
view. Every kind holds credentials, tokens, keys or session state (password hashes, refresh tokens, signing keys, client secrets), and the builtinviewrole is meant to be safe to hand out widely. Read access is therefore only granted toeditandadmin, the same as write access.The roles are controlled by a new value
rbac.createAggregation(defaulttrue, nested underrbac.create). They are only rendered ifconfig.storage.typeiskubernetesor not set. Dex only uses these CRDs with the Kubernetes storage backend; when the config comes from an external secret the chart cannot see the storage type, so the roles are rendered in that case as well. The gating handles a nullconfigorconfig.storage.Special notes for your reviewer
edit/admingains read and write access to these resources (including OAuth2 clients, passwords, connectors and signing keys) in namespaces where Dex stores data. Settingrbac.createAggregation: falserestores the previous behaviour.helm templateforconfig.storage.typeset tomemory,sqlite3andkubernetes, forconfig=nullandconfig.storage=null, and withrbac.createAggregation=falseandrbac.create=false.helm lintandct lint --config ct.yaml --charts charts/dexpass. I did not install the chart into a cluster.artifacthub.io/changesannotation was cleared before adding the new entry, as the contributing guide asks, which is why the previous favicon entry is gone.make docswas not run, since it needs a pinned helm-docs; I edited only the version badge and the newrbac.createAggregationrow of the README by hand to match the generator output.Checklist
Chart.yaml(see the contributing guide for details)Chart.yaml(see the contributing guide for details)make docs(the README rows for the version badge andrbac.createAggregationwere updated by hand to match generator output)