feat(chart): add per-workload service accounts and least-privilege RBAC#76
Open
anchapin wants to merge 1 commit into
Open
feat(chart): add per-workload service accounts and least-privilege RBAC#76anchapin wants to merge 1 commit into
anchapin wants to merge 1 commit into
Conversation
- Add dedicated ServiceAccount per workload (web, web-background, worker, rserve, db, redis, pre-delete-hook) via new workload-serviceaccounts.yaml - Replace legacy cluster-admin ClusterRoleBinding on default SA with a least-privilege Role+RoleBinding scoped to the pre-delete hook - Add security.legacyDefaultServiceAccountClusterAdmin.enabled toggle for phased rollout (false = least-privilege, true = legacy) - Assign serviceAccountName to all deployment specs - Document the phased SA hardening rollout in aws/cluster_setup.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Replaces the legacy
cluster-adminClusterRoleBinding on the namespacedefaultServiceAccount with dedicated per-workload ServiceAccounts and a least-privilege Role scoped to the pre-delete hook.Changes
New:
workload-serviceaccounts.yamlCreates dedicated ServiceAccounts for:
web,web-background,worker,rserve,db,redis,nfs-cleanup(pre-delete hook).Updated:
nfs-disconnect-rbac.yamlRolewith onlydeleteon specific Deployments, bound tonfs-cleanup-saClusterRoleBindingcluster-admin binding for backwards compatibilitysecurity.legacyDefaultServiceAccountClusterAdmin.enabled(default:false)Updated: All deployment specs
Each deployment now references its dedicated ServiceAccount via
spec.serviceAccountName.Updated:
aws/cluster_setup.mdDocuments the two-phase SA hardening rollout (phase 1: set
legacyDefaultServiceAccountClusterAdmin.enabled=true, phase 2: setfalse).Values Added
Rollout Notes
Apply with
--set security.legacyDefaultServiceAccountClusterAdmin.enabled=truefirst, verify no workload usesdefaultSA, then flip tofalse.