You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add group/role exclusion filter for OIDC group sync
Allow filtering out system/default roles from group synchronization:
- Add shouldExcludeGroup() function with exact match and regex support
- Support comma-separated exclusion patterns via OPENID_GROUPS_EXCLUDE_PATTERN
- Case-insensitive exact matching for role names
- Regex patterns with 'regex:' prefix (e.g., regex:^default-.*)
- Update extractGroupsFromToken to accept and apply exclusion filter
- Add comprehensive documentation in .env.example
Use cases:
- Exclude Keycloak default roles (default-roles-*, manage-account, etc.)
- Exclude Auth0 system scopes (offline_access, openid, profile, email)
- Exclude authentication-only roles that shouldn't become groups
- Filter out UMA authorization roles (uma_authorization)
Examples:
OPENID_GROUPS_EXCLUDE_PATTERN=default-roles-mediawan,manage-account,offline_access
OPENID_GROUPS_EXCLUDE_PATTERN=regex:^default-.*,regex:^manage-.*,offline_access
Tested with Keycloak 26.x - successfully filters out system roles
0 commit comments