Skip to content

fix(rbac): trim unused nodes, secrets, runtimeclasses, and excess verbs from controller ClusterRoles - #3122

Open
Pangjiping wants to merge 3 commits into
opensandbox-group:mainfrom
Pangjiping:fix/fast-sandbox-controller-drop-node-rbac
Open

Pangjiping wants to merge 3 commits into
opensandbox-group:mainfrom
Pangjiping:fix/fast-sandbox-controller-drop-node-rbac

Conversation

@Pangjiping

@Pangjiping Pangjiping commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Removes unused RBAC permissions across fast-sandbox-controller, fast-sandbox-fastpath, and opensandbox-manager-role ClusterRoles as part of least-privilege RBAC tightening for #2909 (Blocker 2), and removes the unreferenced scripts/tests/test_fastpath_auth_charts.py test file.

Audit & Changes

manifests/charts/fast-sandbox/templates/rbac.yaml

  • fast-sandbox-controller:
    • Drop nodes — control plane never reads/writes Node objects (node get/patch is performed by the firecracker-runtime DaemonSet using its own RBAC).
    • Drop node.k8s.io/runtimeclasses — control plane never queries RuntimeClass objects.
    • Split configmaps (get, list, watch, create) and secrets (get, list, watch, create, update) to drop unused update/patch/delete verbs.
  • fast-sandbox-fastpath:
    • Drop secrets (get) — already absent in upstream fast-sandbox config/rbac/base.yaml; FastPath never accesses Secrets.

kubernetes/ & manifests/charts/controller/templates/clusterrole.yaml

  • opensandbox-manager-role:
    • Drop secrets (get, list, watch) from sandboxsnapshot_controller.go marker, kubernetes/config/rbac/role.yaml, and Helm chart — controller only references Secret names in Pod/Job SecretVolumeSource / ImagePullSecrets and never reads Secret contents.
    • Narrow events from full CRUD to create, patch across all three controller markers, role.yaml, and Helm chart.

Cleanup

  • Remove unused scripts/tests/test_fastpath_auth_charts.py.

Verification

  • helm lint manifests/charts/fast-sandbox manifests/charts/controller
  • helm template on fast-sandbox and controller charts
  • go test -v ./internal/controller -run 'Test_PROJECT|RBAC' (4/4 passed)

Companion upstream PRs: opensandbox-group/fast-sandbox#270 (merged), opensandbox-group/fast-sandbox#271

Ref: #2909

@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 26, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T05:28:00.273696Z 4524081 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Pangjiping
Pangjiping force-pushed the fix/fast-sandbox-controller-drop-node-rbac branch from b6b28cc to 26e6abf Compare November 26, 2026 04:11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6b28cc63e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@github-actions github-actions Bot added component/k8s For kubernetes runtime size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 26, 2026
@Pangjiping Pangjiping changed the title fix(helm): remove unused nodes RBAC from fast-sandbox-controller ClusterRole fix(rbac): trim unused nodes, secrets, runtimeclasses, and excess verbs from controller ClusterRoles Nov 26, 2026
@Pangjiping

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4524081b58

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/k8s For kubernetes runtime ok-to-test size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants