Skip to content

EPMDEDP-17184: fix: drop unregistered groups scope that broke Grafana OIDC login - #4

Merged
SergK merged 1 commit into
mainfrom
keep-roles-only
Jul 28, 2026
Merged

EPMDEDP-17184: fix: drop unregistered groups scope that broke Grafana OIDC login#4
SergK merged 1 commit into
mainfrom
keep-roles-only

Conversation

@SergK

@SergK SergK commented Jul 28, 2026

Copy link
Copy Markdown
Member

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.

… 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>
@epmd-edp

Copy link
Copy Markdown
Collaborator

Pipeline review-claude-code-telemetry-main-8n476 ✅ Passed

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

@SergK
SergK merged commit f3d8711 into main Jul 28, 2026
2 checks passed
@SergK
SergK deleted the keep-roles-only branch July 28, 2026 06:37
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.

2 participants