radar: let rbac.secrets=false actually deny Secrets access - #38
Closed
ksc98 wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a08125e. Configure here.
Enabling auth (auth.mode != none) granted the ServiceAccount get/list/watch on Secrets cluster-wide even with rbac.secrets=false, because the gate ORed the auth mode in alongside the explicit opt-ins. Drop the auth/cloud clauses so the rule follows rbac.secrets / rbac.helm only. This matches the Helm add-on ClusterRoles, which already require rbac.helm and treat auth mode as an additional condition rather than a substitute.
ksc98
force-pushed
the
rbac-secrets-auto-enable-optout
branch
from
August 18, 2026 03:37
a08125e to
85ac25f
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 issue
rbac.secrets: falsedoes not deny Secrets access. Enabling auth grants the Radar ServiceAccountget/list/watchon Secrets cluster-wide regardless, because the auth mode is ORed in alongside the explicit opt-ins:So turning on SSO is what widens the grant, and there is no way to decline it. On our production cluster Radar ends up holding an open watch on every Secret while
rbac.secretsis set tofalse.The fix
Drop the auth/cloud clauses so the rule follows
rbac.secrets/rbac.helmonly:This also makes the rule consistent with the rest of the chart. Both Helm add-on ClusterRoles already require
rbac.helm, treating the auth mode as an additional condition rather than a substitute for it:Only the Secrets rule let auth mode stand in on its own.
Behaviour change: an install with auth on and both flags at their
falsedefaults no longer gets cluster-wide Secrets read, so Helm release listing and the certificate-expiry check go empty. Settingrbac.helm: true(already required for every other Helm capability) orrbac.secrets: truerestores it.Test plan
helm lint charts/radarpasses. Rendered ClusterRole, unscoped Secrets rule:auth.mode=oidc["get","list","watch"]auth.mode=oidc+rbac.secrets=true["get","list","watch"]["get","list","watch"]auth.mode=oidc+rbac.helm=true["get","list","watch"]["get","list","watch"]rbac.secrets=true, no auth["get","list","watch"]["get","list","watch"]rbac.helm=true, no auth["get","list","watch"]["get","list","watch"]The narrowly-scoped
hubble-relay-client-certsrule is unaffected in every case.No chart version bump —
charts/radar/Chart.yamllooks maintainer-owned (Update radar chart to vXbot commits). Happy to add one if you'd rather.Note
Medium Risk
Changes Radar’s cluster RBAC around Secrets (credential exposure surface); misconfiguration could remove Helm/cert features for auth-only users while defaults are intended to stay equivalent.
Overview
Cluster-wide Secrets read access for the Radar ServiceAccount is no longer tied to
auth.modeorcloud.enabled. The unscopedsecretsrule inclusterrole.yamlis emitted only whenrbac.secretsorrbac.helmis enabled.Comments on that block are updated to state that list/watch cannot be scoped by Secret type, so the grant must stay behind explicit opt-in (
rbac.secrets/rbac.helm). The narrowly scopedhubble-relay-client-certsrule is unchanged.Per the PR description,
rbac.secretsAutoEnable(defaulttrue) is meant to preserve today’s auth/cloud auto-grant when left at default; with it set tofalse, operators can avoid Radar holding cluster-wide Secret credentials while still opting in viarbac.secretsorrbac.helm. Trade-off when declining the auto-grant: Helm release visibility and certificate-expiry checks may be empty for users without their own Secrets permissions.Reviewed by Cursor Bugbot for commit 85ac25f. Bugbot is set up for automated code reviews on this repo. Configure here.