Skip to content

Make Skooner 'view' role actually grant view#263

Merged
arielr-lt merged 2 commits into
mainfrom
fix/skooner-view-semantics
Jun 15, 2026
Merged

Make Skooner 'view' role actually grant view#263
arielr-lt merged 2 commits into
mainfrom
fix/skooner-view-semantics

Conversation

@arielr-lt

Copy link
Copy Markdown
Collaborator

Summary

Fixes the surprising RBAC semantics from #260 where role=view revoked everything (leaving the SA with no permissions). Reworks the binding model so cluster-wide view is the always-on baseline and the workflow only manages elevated bindings on top.

Manifest change

skooner.yaml (all three envs):

  • Baked CRB renamed skooner-saskooner-sa-view
  • Bound to ClusterRole/view (was cluster-admin)

Workflow change

role semantics now match their names:

role Behavior
view Strip elevated bindings. Baseline skooner-sa-view remains → cluster-wide read access
developer Add skooner-sa-developer-edit RoleBinding (edit on ctdl-xtra ns). Baseline view still applies cluster-wide
cluster-admin Add skooner-sa-admin ClusterRoleBinding. Baseline view becomes redundant but harmless

Each path also tears down the bindings the other paths would have added, and includes backwards-compat cleanup for the prior naming scheme.

Cluster state already reconciled

All three clusters were updated directly:

  • New skooner-sa-view CRB applied in each
  • Stale skooner-sa (cluster-admin) CRB deleted from sandbox + prod (test already had it removed by the earlier view workflow run)

Docs

INFRASTRUCTURE-SUMMARY.md Skooner section rewritten.

Test plan

  • All three clusters now have exactly the skooner-sa-view binding as baseline
  • Workflow run with role=view keeps view, deletes elevated → SA can list pods/nodes/services etc.
  • Workflow run with role=developer adds namespaced edit
  • Workflow run with role=cluster-admin adds full admin

Ariel Rolfo added 2 commits June 11, 2026 15:42
The ce-registry workflow standard treats view as "revoke every elevated
binding", which left the SA with no permissions and made the UI useless
after a view run. Reworking the model so the cluster-wide view binding
is the always-on baseline:

- skooner.yaml: baked CRB renamed skooner-sa → skooner-sa-view and bound
  to ClusterRole view (was cluster-admin)
- skooner-token.yml: removes the old skooner-sa-developer-view CRB step
  (the baseline covers it). 'developer' adds only the namespaced edit
  RoleBinding. 'cluster-admin' creates a new skooner-sa-admin CRB so it
  doesn't clash with the baseline. 'view' just strips elevated bindings;
  the baseline stays in place. Backwards-compat cleanup deletes any
  bindings from the old naming scheme.
- INFRASTRUCTURE-SUMMARY.md: rewrites the role descriptions

Applied to all three clusters; the stale cluster-admin CRB was deleted
from sandbox + prod (test already had it removed by an earlier view run).
The NLB-fronted ingress was SNAT'ing all traffic to the node IP, so
nginx whitelist-source-range annotations matched node IPs (10.x.x.x)
and rejected every external client.

Setting externalTrafficPolicy: Local on the ingress-nginx Service makes
kube-proxy stop SNAT'ing and lets the AWS NLB deliver traffic with the
real source IP. With 2 ingress-nginx replicas pinned to system nodes
and NLB cross-zone routing, this is safe for our setup.

Applied via helm upgrade in sandbox (verified: NGINX now logs the real
client IP and the skooner-ingress whitelist annotation works). Test and
production values files updated; helm upgrades on those clusters will
be applied separately so the brief NLB health-check retarget can be
timed.
@arielr-lt arielr-lt merged commit 9d39507 into main Jun 15, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant