Manage human role membership from config/users/ #37

Merged
benvin merged 2 commits from benvin/media-adult-membership into main 2026-09-19 14:55:02 +10:00
Member

Human role assignment has been a UI-only operation: the module manages groups and service accounts but no human membership, so which akR-* roles a person holds lives nowhere in code. This adds the mechanism; it ships with no assignments.

  • Add a users/ config kind: config/users/<username>.yaml listing the akR-* roles that user holds.
  • Resolve accounts with data.authentik_user by username; never declare authentik_user for a human.
  • Set authentik_group.role users only for roles a user file names; every other role stays null and untouched.
  • Fail the plan when a user file names a role with no config/roles/<name>.yaml.

Naming a role in a user file makes Terraform authoritative over that role's entire member list.

Human role assignment has been a UI-only operation: the module manages groups and service accounts but no human membership, so which akR-* roles a person holds lives nowhere in code. This adds the mechanism; it ships with no assignments. - Add a `users/` config kind: `config/users/<username>.yaml` listing the `akR-*` roles that user holds. - Resolve accounts with `data.authentik_user` by username; never declare `authentik_user` for a human. - Set `authentik_group.role` `users` only for roles a user file names; every other role stays `null` and untouched. - Fail the plan when a user file names a role with no `config/roles/<name>.yaml`. Naming a role in a user file makes Terraform authoritative over that role's entire member list.
unkin-agent added 1 commit 2026-09-19 12:47:13 +10:00
Manage human role membership from config/users/
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline failed
d848d9ae86
Add a users/ config kind mapping a human to the akR-* roles they hold.
Look accounts up with data.authentik_user; never declare them. Set
authentik_group.role users only for roles a user file names, leaving
every other role's membership untouched. No assignments yet.
benvin added 1 commit 2026-09-19 13:48:18 +10:00
Merge branch 'main' into benvin/media-adult-membership
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
e2d7de4148
benvin merged commit 4fceaeeee6 into main 2026-09-19 14:55:02 +10:00
benvin deleted branch benvin/media-adult-membership 2026-09-19 14:55:02 +10:00
Sign in to join this conversation.