Skip to content

Remove groups claim from access tokens in Keycloak clients from the KeycloakAuthManager cli - #71093

Merged
potiuk merged 1 commit into
apache:mainfrom
stephen-bracken:keycloak-cli-groups
Aug 6, 2026
Merged

Remove groups claim from access tokens in Keycloak clients from the KeycloakAuthManager cli#71093
potiuk merged 1 commit into
apache:mainfrom
stephen-bracken:keycloak-cli-groups

Conversation

@stephen-bracken

Copy link
Copy Markdown
Contributor

related #61771

Remove groups claim from access tokens in Keycloak clients from the KeycloakAuthManager cli

With the KeycloakAuthManager the groups mapper in Keycloak is only used for evaluating RBAC policy enforcements on the server side, not the client side. In large organisations users can be members of hundreds or thousands of Keycloak groups, which significantly increases the size of the Keycloak access_token JWT, which risks going over the browser's 4KB cookie size limit. In the keycloak provider cli, we should set these group claims to be excluded from user refresh tokens and access tokens to avoid overloading the browser cookies.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
  • No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants