EPMDEDP-17184: fix: drop unregistered groups scope that broke Grafana OIDC login - #4
Merged
Conversation
… OIDC login Grafana forwards its `scopes` setting verbatim as the OAuth `scope` parameter, and Keycloak validates every entry against the client scopes registered in the realm. No `groups` client scope exists there, so Keycloak rejected the authorize request with "Invalid scopes" and Grafana surfaced "Login provider denied login request" — SSO was unusable. The group membership protocol mapper on the client did not make `groups` a requestable scope; client mappers always emit their claim and are never negotiated via the scope parameter. Since org roles are derived from the `roles` claim and `allowed_groups` gating was never enabled, the groups claim had no consumer, so both the mapper and the unused `groups_attribute_path` are removed alongside the scope. Group-based gating can be reintroduced later by restoring the mapper and setting `allowed_groups`, without listing `groups` in `scopes`. Signed-off-by: Sergiy Kulanov <sergiy_kulanov@epam.com>
Collaborator
Pipeline
|
| Status | Task | Duration |
|---|---|---|
| ✅ | github-set-pending-status | 6s |
| ✅ | fetch-repository | 25s |
| ✅ | check-chart-name | 8s |
| ✅ | helm-docs | 6s |
| ✅ | helm-dependency-update | 14s |
| ✅ | helm-lint | 11s |
| ✅ | helm-template | 5s |
| ✅ | github-report-pipeline-status | 6s |
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.
Grafana forwards its
scopessetting verbatim as the OAuthscopeparameter, and Keycloak validates every entry against the client scopes registered in the realm. Nogroupsclient scope exists there, so Keycloak rejected the authorize request with "Invalid scopes" and Grafana surfaced "Login provider denied login request" — SSO was unusable.The group membership protocol mapper on the client did not make
groupsa requestable scope; client mappers always emit their claim and are never negotiated via the scope parameter. Since org roles are derived from therolesclaim andallowed_groupsgating was never enabled, the groups claim had no consumer, so both the mapper and the unusedgroups_attribute_pathare removed alongside the scope.Group-based gating can be reintroduced later by restoring the mapper and setting
allowed_groups, without listinggroupsinscopes.