Conversation
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. Adds regression coverage to the existing upgrade-impact RBAC suite and documents the cluster-wide scope on rbac.secrets.
ksc98
force-pushed
the
rbac-secrets-respect-explicit-optin
branch
2 times, most recently
from
October 1, 2026 06:10
aed2f5f to
df8701f
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.
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:Turning on SSO is what widens the grant, which is a surprising direction, and there is no way to decline it. On our production cluster Radar holds an open watch on every Secret while
rbac.secretsis set tofalse.The fix
This also makes the rule consistent with the rest of the chart. Both Helm add-on ClusterRoles already require
rbac.helm, treating auth mode as an additional condition rather than a substitute for it:Only the Secrets rule let auth mode stand in on its own.
Who this affects on upgrade
Anyone matching
rbac.secrets: falseandrbac.helm: falseand auth enabled. Both flags default tofalse, so that is every authenticated install that has not set one of them — not an edge case.They lose Helm release listing, since Helm stores releases as Secrets. It is silent: no error, the Helm view just renders empty after a routine
helm upgrade. Settingrbac.helm: true(already required for every other Helm capability) orrbac.secrets: truerestores it.That is the real cost of this change and it is your call whether it is worth it. If you would rather not break authenticated defaults, I am happy to rework this as a default-true opt-out using the chart's existing absence-means-true pattern, which is what Bugbot pointed at on #38 — say the word.
Test plan
Three cases added to the existing
upgrade_impact_rbac_test.yaml. The key one,keeps Secrets access opt-in when auth is enabled, fails on unmodifiedupstream/mainand passes on this branch — verified by running it against a clean worktree checkout ofmain, so it is a real regression test rather than a tautology.Full suite on this branch: 25 pass, 2 fail. Those 2 (
service.yamlannotation merging) fail identically on unmodifiedupstream/main— pre-existing, unrelated to this change.helm lint charts/radarpasses.Rendered ClusterRole, unscoped Secrets rule:
auth.mode=oidc["get","list","watch"]auth.mode=oidc+rbac.secrets=trueauth.mode=oidc+rbac.helm=truerbac.secrets=true, no authrbac.helm=true, no authThe narrowly-scoped
hubble-relay-client-certsrule is unaffected throughout, and the tests assert that.No chart version bump —
charts/radar/Chart.yamllooks maintainer-owned (Update radar chart to vXbot commits), and perCLAUDE.mdanything landing incharts/triggers packaging. Happy to add one if you would prefer.Note
Medium Risk
Security-sensitive RBAC tightening with a behavior change on upgrade for common authenticated defaults (Helm UI may go empty until rbac.helm or rbac.secrets is enabled).
Overview
rbac.secrets: falsenow actually withholds cluster-wide Secretget/list/watchon the Radar ServiceAccount. The ClusterRole no longer auto-grants that rule whenauth.modeis notnoneorcloud.enabledis on—onlyrbac.secretsorrbac.helmenable it (Helm still documents that release storage needs Secrets read).Comments in
values.yamlandclusterrole.yamlclarify that list/watch cannot be scoped by Secret type, so the grant is all Secrets and should stay explicit opt-in.Helm chart tests add cases that OIDC without those flags omits the broad Secrets rule (while the scoped
hubble-relay-client-certsrule is unchanged) and thatrbac.secretsorrbac.helmstill grant access with auth on.Upgrade note: authenticated installs that left both
rbac.secretsandrbac.helmat defaultfalsewill lose Helm release listing after upgrade unless one of those flags is set—no error, just an empty Helm view.Reviewed by Cursor Bugbot for commit df8701f. Bugbot is set up for automated code reviews on this repo. Configure here.