Skip to content

[HYPERSHELL-125] fix(control-plane): drop invalid Keycloak scopes from console OIDC - #171

Merged
jsell-rh merged 2 commits into
mainfrom
fix/console-oauth2-scope
Aug 20, 2026
Merged

[HYPERSHELL-125] fix(control-plane): drop invalid Keycloak scopes from console OIDC#171
jsell-rh merged 2 commits into
mainfrom
fix/console-oauth2-scope

Conversation

@jsell-rh

Copy link
Copy Markdown
Collaborator

Summary

  • Removes gateway-roles from OAUTH2_PROXY_SCOPE — the scope doesn't exist on federated realms (e.g. ambient-code), causing invalid_scope on console login
  • Removes gateway-roles and openid from defaultClientScopes on Keycloak console clients — gateway-roles doesn't exist on federated realms; openid is implicit in the OIDC protocol, not a realm client scope
  • Supersedes [HYPERSHELL-124] fix(control-plane): drop invalid scopes from Keycloak client config #167 which only fixed one of three defaultClientScopes occurrences (the other two were added by the console feature merge [HYPERSHELL-110] feat: per-gateway Gateway Console #147)
  • The dedicated client-roles protocol mapper on each console client handles role mapping into hypershell.roles independently of realm-level scopes

Test plan

  • Staging: console login no longer returns invalid_scope
  • Kind: console login still works (built-in roles scope handles role mapping)
  • Verify hypershell.roles claim is present in the access token after login

🤖 Generated with Claude Code

Remove gateway-roles from OAUTH2_PROXY_SCOPE and defaultClientScopes,
and openid from defaultClientScopes. gateway-roles only exists in
Kind's local Keycloak; federated realms reject it as invalid_scope.
openid is implicit in the OIDC protocol, not a realm client scope.
The dedicated client-roles mapper on each console client handles
role mapping into hypershell.roles independently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: openshift-online/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c04ef530-bed5-49db-86db-b3e85f99b6e2


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jsell-rh
jsell-rh enabled auto-merge August 20, 2026 18:08
@jsell-rh jsell-rh changed the title fix(control-plane): drop invalid Keycloak scopes from console OIDC [HYPERSHELL-125] fix(control-plane): drop invalid Keycloak scopes from console OIDC Aug 20, 2026
@jsell-rh
jsell-rh added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit d39831e Aug 20, 2026
17 of 19 checks passed
@jsell-rh
jsell-rh deleted the fix/console-oauth2-scope branch August 20, 2026 18:54
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.

1 participant