T4: k8s namespace + capability Roles #20
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lab/iac!20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t4-k8s-capability-roles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
By ginjiruu — Open — +149 -3
From
t4-k8s-capability-rolesintomasterCloses #7
Implements T4: the k8s tenant module now creates, per catalog app, a namespace plus namespace-scoped capability Roles per the ADR-0007 k8s column, each bound to the app's kanidm capability group:
viewer/contributor: get/list on non-secret resources (pods, services, configmaps, deployments, statefulsets, ingresses, events, pods/log)developer: edit (get/list/watch/create/update/patch) on the same non-secret set — no deletemaintainer: developer +delete/deletecollectionlive-debugging: get pods + create on pods/exec, pods/attach, pods/portforwardk8s-secret-viewer: get/list secrets (namespace-wide, all-or-nothing per ADR-0007)root: namespace Role*incl secrets (per app, matching the kanidm<app>-rootgroup)Each Role has a namespace-scoped RoleBinding whose subject is the matching kanidm group name (
group-<app>-<capability>,<app>-root) withkind: Group— membership grants arrive via the OIDC groups claim, never cluster-wide.generated-secret-manager/manual-secret-managerare Vault-only per the matrix and get no Role or binding.Verification:
tofu validatepasses;tofu planis green (30 to add: 2 namespaces + 14 Roles + 14 RoleBindings across privatebin/syncthing).Wiring note: subject names are the kanidm group names, so the apiserver OIDC setup must request kanidm's
groups_namescope and set--oidc-groups-claim=groupsfor the bindings to match.<app>-rootis nested in every capability group (ADR-0007), so root members also match the capability bindings.