Skip to content

Add configurable OIDC group-to-role mapping#36

Merged
jeffmccune merged 1 commit intomainfrom
feature/configurable-group-mapping
Jan 30, 2026
Merged

Add configurable OIDC group-to-role mapping#36
jeffmccune merged 1 commit intomainfrom
feature/configurable-group-mapping

Conversation

@jeffmccune
Copy link
Contributor

Summary

  • Add --viewer-groups, --editor-groups, and --owner-groups CLI flags that accept comma-separated OIDC group names to map to each built-in role
  • Introduce GroupMapping struct in the rbac package, replacing the hardcoded switch statement with a configurable map
  • Wire the mapping through console.ConfigServer → secrets Handler → authorization checks
  • When flags are unset, defaults to the original group names (viewer, editor, owner) — fully backward compatible

Test plan

  • RED: Wrote failing tests for NewGroupMapping, ParseGroups, GroupMapping.MapGroupToRole, GroupMapping.CheckAccess, and CLI flag registration
  • GREEN: Implemented GroupMapping type, ParseGroups helper, CLI flags, and full wiring
  • All existing tests pass (rbac, secrets authz, secrets handler, CLI)
  • Race detector passes
  • No new lint issues introduced
  • Trigger Container workflow to validate build

🤖 Generated with Claude Code

Add --viewer-groups, --editor-groups, and --owner-groups flags that
accept comma-separated OIDC group names to map to each built-in role.
When unset, defaults to the original group names (viewer, editor, owner).

Introduces GroupMapping struct in the rbac package that replaces the
hardcoded switch statement, wired through Config -> Server -> Handler.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jeffmccune jeffmccune merged commit c94eabe into main Jan 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant