Understanding Keycloak's default client scopes #37804
Replies: 1 comment 1 reply
|
You can look the definitions for most (all?) claims using the admin console. You can go to the scopes tab on a client's details page and you will see all client scopes that are included, either by default or are set to optional (the client may request them, but are not sent out with every request). To inspect what values are included with the tokens, you can go to the mappers tab of each client scope that is enabled for the client. You can also use the "Evaluate" sub-tab in the client scopes tab to evaluate what values are included in each OIDC token (I don't think this works correctly with SAML, as it will still display OIDC tokens, instead of XML assertions). Implicitly, new clients will have set all client scopes that are defined as default in the client scopes page. Additionally, there is a "dedicated" client scope you can see in the scopes tab of the client, that may add additional mappers for the client specifically; this is also where you can (and probably should) disable the full scope allowed setting for the client (see https://www.keycloak.org/docs/latest/server_admin/index.html#_role_scope_mappings for details). |
Uh oh!
There was an error while loading. Please reload this page.
When a client is created in keycloak, it has by default assigned various client scope, which in effect add various claims into the issued access tokens for the given client.
Example of such tokens, using default client scopes
In my eyes right now, I distinguish here 3 types of claims. The required ones per JWT spec, the custom ones which are obvious and related to user profile (name, email, ... ) and then lastly all the others, which are primarily subject of my question. In particular fields like
realm_access,resource_access,allowed-origins.So here's list of my question about the 3rd category of claims:
In case my very own questions indicate some kind of misconception, please help me to get on the right track how to think about this.
Thank you.
All reactions