Repository navigation
feat(helm): bind the credential provider's Secret reader only in the namespaces you list - #131
Open
QuentinBisson wants to merge 1 commit into
Conversation
QuentinBisson
marked this pull request as ready for review
November 5, 2026 14:30
QuentinBisson
added a commit
to giantswarm/substrate
that referenced
this pull request
Nov 5, 2026
5 tasks
QuentinBisson
force-pushed
the
chart-credential-provider-rbac-namespaces
branch
from
November 7, 2026 01:47
aa8f286 to
4b91239
Compare
The k8s-credential-provider-secret-reader ClusterRole is bound with a ClusterRoleBinding, so the provider can read every Secret in the cluster. credentialProvider.rbac.namespaces binds the ClusterRole by RoleBinding in each listed namespace instead. Empty, the default, keeps the ClusterRoleBinding. The ClusterRole is always rendered so other namespaces can bind it. Signed-off-by: QuentinBisson <quentin@giantswarm.io>
QuentinBisson
force-pushed
the
chart-credential-provider-rbac-namespaces
branch
from
November 9, 2026 11:25
4b91239 to
bc17755
Compare
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.
The Kubernetes Secrets credential provider's reader is bound with a ClusterRoleBinding, so it can read every Secret in the cluster. On a cluster where other workloads keep Secrets the provider must not read, there is no way to narrow that without patching the chart.
credentialProvider.rbac.namespacesbinds the same ClusterRole by RoleBinding in each listed namespace instead. Empty (the default) keeps today's ClusterRoleBinding, so existing installs render the same objects. The ClusterRole is always rendered, so namespaces created later can bind it themselves. The provider reads one Secret per request in the namespace theate-secret://URI names (cmd/credential-provider/kubernetes-secrets/kubeprovider.go:152) and answers a 403 withPermissionDenied(:160-162), so no code change is needed. The key and its semantics follow kagent's chart (rbac.namespaces).AI use: AI-assisted, including the commit message and this description. I reviewed the change, the tests and the text, and ran
helm unittest charts/substrate.