docs: clarify OIDC role mapping requires a mapped group#97
Merged
Conversation
Setting OIDC_CLAIM_ROLES makes group matching mandatory: non-admin users in no mapped group are rejected with "User has not been granted any roles for this application." Document the OIDC_ROLE_VIEWER/EDITOR fix and correct the misleading "legacy no-op" framing. Generated-By: PostHog Code Task-Id: 8650f3d2-ad2c-4988-9843-4c7941b886d5
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes a documentation gap surfaced in a Discord
#helpthread: a newly created (non-admin) OIDC user was rejected at login with{"detail":"User has not been granted any roles for this application."}.The cause is that once
OIDC_CLAIM_ROLESis set, RomM requires every user to match at least one mapped role group. Admins matchedOIDC_ROLE_ADMIN, but regular users in no mapped group were turned away. The fix (per the thread) is to map non-admins to the User role viaOIDC_ROLE_VIEWER/OIDC_ROLE_EDITOR.The old docs described those vars as legacy no-ops, which hid the fact that they're still how you grant non-admins access.
Changes
administration/oidc/index.md— replaced the "Legacy role variables" note with a warning explaining group matching becomes mandatory, showing the exact error and theOIDC_ROLE_VIEWER=platform-usersfix; clarified that skippingOIDC_CLAIM_ROLESprovisions everyone as User.troubleshooting/authentication.md— new OIDC entry keyed on the exact error string, with the fix.resources/snippets/env-vars.md— correctedOIDC_ROLE_VIEWER/OIDC_ROLE_EDITORdescriptions.Created with PostHog Code