Add scope field and examples to OIDC authentication configuration - #8072
Open
gkmzfk6um wants to merge 3 commits into
Open
Add scope field and examples to OIDC authentication configuration#8072gkmzfk6um wants to merge 3 commits into
gkmzfk6um wants to merge 3 commits into
Conversation
Added scope parameter to OIDC authentication options.
Updated hint for the scope field to include examples of additional scopes.
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.
Problem
The Generic OpenID Connect / OAuth2 strategy currently hardcodes the requested scopes (openid profile email). Users who need additional scopes — e.g. group/role scopes like roles for group mapping — have no way to request them. The IdP only releases claims (such as group memberships or, in some setups, even the email claim) when the corresponding scope is present in the authorization request, so group mapping silently fails regardless of the "Map Groups" setting.
Change
Add an optional scope field to the strategy configuration (definition.yml)
Pass the configured value through to the OIDC strategy (authentication.js), so it is included in the authorization request
The default scopes openid profile email remain always included; the new field only adds scopes
Behavior
Fully backward compatible: leaving the field empty behaves exactly like before
Example: setting openid profile email roles requests a roles scope, which the IdP can then release as a group claim for Map Groups