Wire Rancher to Authentik ak_groups + akP-rancher global roles #2

Merged
benvin merged 1 commits from benvin/rancher-akgroups into main 2026-07-18 20:53:19 +10:00
Owner

Why

Complete the two-tier Authentik RBAC (terraform-authentik#7) for Rancher: read the hierarchical ak_groups claim and grant Rancher global roles to the akP-rancher-* permission groups. Members of akR-global-admin/akR-standard-user inherit these.

Change

  • keycloakoidc: scopes += ak_groups; groups_field: ak_groups (read groups from that claim instead of the default groups).
  • global_role_bindings (new config dir): akP-rancher-adminadmin, akP-rancher-useruser, via rancher2_global_role_binding with principal keycloakoidc_group://<name>.

Depends on

terraform-authentik#7 (creates akP-rancher-*, the access binding, and the ak_groups mapping).

Validation

tofu validate passes. Note: the group principal id format (keycloakoidc_group://<name>) can only be confirmed on a live apply/login — if the binding errors, that prefix is the knob to adjust.

## Why Complete the two-tier Authentik RBAC (terraform-authentik#7) for Rancher: read the hierarchical `ak_groups` claim and grant Rancher global roles to the `akP-rancher-*` permission groups. Members of `akR-global-admin`/`akR-standard-user` inherit these. ## Change - **keycloakoidc**: `scopes` += `ak_groups`; `groups_field: ak_groups` (read groups from that claim instead of the default `groups`). - **global_role_bindings** (new config dir): `akP-rancher-admin` → `admin`, `akP-rancher-user` → `user`, via `rancher2_global_role_binding` with principal `keycloakoidc_group://<name>`. ## Depends on terraform-authentik#7 (creates `akP-rancher-*`, the access binding, and the `ak_groups` mapping). ## Validation `tofu validate` passes. **Note:** the group principal id format (`keycloakoidc_group://<name>`) can only be confirmed on a live `apply`/login — if the binding errors, that prefix is the knob to adjust.
unkinben added 1 commit 2026-07-18 16:25:29 +10:00
Wire Rancher to Authentik ak_groups + akP-rancher global roles
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
80fa1b2844
Consume the two-tier Authentik RBAC (terraform-authentik): read the hierarchical
`ak_groups` claim and grant Rancher global roles to the akP-rancher permission
groups. Members of akR-global-admin/akR-standard-user inherit these.

- keycloakoidc: scopes += ak_groups; groups_field = ak_groups
- global_role_bindings: akP-rancher-admin -> admin, akP-rancher-user -> user
  (group principal keycloakoidc_group://<name>)
benvin merged commit 1dc43580f6 into main 2026-07-18 20:53:19 +10:00
benvin deleted branch benvin/rancher-akgroups 2026-07-18 20:53:19 +10:00
Sign in to join this conversation.