Files
computer-playbook/docs/administration/configuration/rbac.md
T
kevinveenbirkenbachandClaude Opus 4.7 48766f0bf9 docs: align rbac/req docs with documentation.md and readme_md.md guidelines
- Remove every em-dash thought break (4 in 004, 24 in 006, 2 in
  the WordPress role README) per the "no em-dashes" rule in
  `docs/contributing/documentation.md`.
- Replace "is forbidden" with the RFC 2119 keyword "MUST NOT" in
  005 and 006.
- Disambiguate the ambiguous `[rbac.md](...)` links in the role
  README, the administration SPOT, and the design SPOT by giving
  each link a descriptive label ("Administration RBAC" /
  "RBAC design"), per the link-text rules in `documentation.md`.
- Move the emoji decorations on `roles/web-app-wordpress/tasks/
  plugins/README.md` headings from before to after the heading
  text and turn the U+2192 arrow into prose so the document
  matches the heading-emoji rule.
- Update `docs/contributing/design/iam/rbac.md` so the LDAP
  layout, Keycloak mapper, and `path_join` paragraphs reflect
  the flat-CN + per-app mapper implementation that requirement
  005 actually ships, instead of the hierarchical-OU vision the
  page was originally drafted against.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 09:34:03 +02:00

2.6 KiB

RBAC 🛂

This page is the administration SPOT for granting and revoking application role memberships via Keycloak. It covers the how; for the why (design, schema, LDAP layout, client-scope contract) see RBAC design.

Granting a role 🎟️

Every application role corresponds to one Keycloak group whose path is hierarchical:

# single-site app
/roles/<application_id>/<role_name>

# Multisite (tenant-aware) app, per-site role
/roles/<application_id>/<tenant>/<role_name>

# Multisite (tenant-aware) app, network-wide role
/roles/<application_id>/network-administrator

To grant a user the role <role_name> on <application_id>:

  1. Log in to the Keycloak admin console as the platform super administrator.
  2. Switch to the configured realm (for example infinito.nexus).
  3. Open Users, search for the user, and select them.
  4. Open the Groups tab on the user profile.
  5. Click Join Group, search for the target role name, and join the group at the full path shown above.

To revoke a role, remove the user from the same group. Changes take effect the next time the user completes an OIDC sign-in; no immediate logout is required for the user to retain their current session's capabilities.

Confirming the groups claim 🧾

When a user unexpectedly ends up in the fallback subscriber role, check the following in order:

  1. The user is a direct member of the expected group (not only a parent OU).
  2. The OIDC client used by the application has the groups client scope attached as a default scope (not optional). The design note in RBAC design explains why.
  3. The Keycloak Userinfo preview for the user contains a groups array with the full path. If it does not, the scope is not reaching the userinfo endpoint and the mapping will not fire.

Migration from the pre-005 flat layout 🔁

Infinito.Nexus before requirement 005 provisioned all RBAC groups flat under ou=roles with names shaped <application_id>-<role_name>. The 005 deploy rewrites these DNs into the hierarchical layout described above, keeps every memberUid / member, and forces a Keycloak Logout all so no stale access tokens keep pre-005 paths alive. The migration runs automatically as part of svc-db-openldap provisioning; no manual LDIF editing is required.

If you need to roll back the migration, restore the LDAP backup taken before the first deploy that included requirement 005 and also invalidate the affected Keycloak sessions.

See also 🔗