Skip to content

feat: OIDC group-to-role mapping and various improvements#4

Closed
pezzking wants to merge 1 commit intoleonmeijer:mainfrom
pezzking:feature/oidc-group-mapping-and-fixes
Closed

feat: OIDC group-to-role mapping and various improvements#4
pezzking wants to merge 1 commit intoleonmeijer:mainfrom
pezzking:feature/oidc-group-mapping-and-fixes

Conversation

@pezzking
Copy link
Collaborator

Summary

  • OIDC Group-to-Role Mapping: Automatically assign Console roles based on OIDC group membership
  • Global Admin Groups: Configure OIDC groups that grant global admin access via OIDC_ADMIN_GROUPS env var
  • Configurable PULSAR_CLUSTER: Make cluster name configurable via environment variable
  • New OIDC Groups Settings Page: UI for configuring group mappings per environment

Features

OIDC Group Mapping

  • Extract groups from OIDC token using configurable claim name (OIDC_ROLE_CLAIM, default: groups)
  • Map OIDC groups to Console roles (e.g., developersdeveloper, platform-teamadmin)
  • Global admin groups grant is_global_admin=True to users
  • Optional role sync on every login (OIDC_SYNC_ROLES_ON_LOGIN)
  • Configure via environment variables OR per-environment database settings via UI

New Environment Variables

Variable Description Default
OIDC_ROLE_CLAIM OIDC claim containing user groups groups
OIDC_ADMIN_GROUPS Comma-separated admin groups
OIDC_SYNC_ROLES_ON_LOGIN Sync roles on every login true
PULSAR_CLUSTER Pulsar cluster name standalone

Changes

Backend

  • Add group mapping fields to oidc_providers table (migration 007)
  • Update auth service with group extraction and role mapping logic
  • Add OIDC provider CRUD endpoints (GET/POST/PUT/DELETE /{env_id}/oidc-provider)
  • Support virtual OIDC provider config when using global env vars

Frontend

  • New OIDCSettingsPage for configuring group mappings
  • Add "OIDC Groups" navigation item in Settings sidebar
  • Update API hooks and types for OIDC provider config

Documentation

  • Update README with OIDC group mapping documentation
  • Add .env.example with all configuration options

Test plan

  • Configure OIDC_ADMIN_GROUPS=admins and verify users in that group become global admins
  • Create group-to-role mapping in UI and verify role assignment on login
  • Test with OIDC_SYNC_ROLES_ON_LOGIN=true to verify role removal when user leaves group
  • Verify UI works with both global OIDC config and per-environment database config

🤖 Generated with Claude Code

OIDC Group Mapping:
- Add automatic role assignment based on OIDC group membership
- Support global admin groups via OIDC_ADMIN_GROUPS env var
- Add OIDC_ROLE_CLAIM config for custom group claim name
- Add OIDC_SYNC_ROLES_ON_LOGIN to sync roles on every login
- New Settings > OIDC Groups page for UI configuration
- Support both env var config and per-environment database config
- Auto-create database record when saving with global OIDC config

Backend:
- Add group mapping fields to oidc_providers table (migration 007)
- Update auth service with group extraction and role mapping logic
- Add OIDC provider CRUD endpoints for environment configuration
- Make PULSAR_CLUSTER configurable via environment variable

Frontend:
- Add OIDCSettingsPage for group mapping configuration
- Add OIDC Groups navigation item in sidebar
- Update API hooks and types for OIDC provider config

Documentation:
- Update README with OIDC group mapping documentation
- Add .env.example with all configuration options

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pezzking pezzking closed this Jan 16, 2026
@pezzking pezzking deleted the feature/oidc-group-mapping-and-fixes branch January 16, 2026 19:21
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