[keycloak-dev] Spring Security Adapter resource_access roles missing
Daniel Teixeira
ddtxra at gmail.com
Mon Jul 16 11:26:38 EDT 2018
My bad, I forgot to set the keycloak property !
keycloak.use-resource-role-mappings=true
It is well set in here:
https://github.com/keycloak/keycloak/blob/master/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/AdapterUtils.java#L46
And the documentation describes it as well:
https://www.keycloak.org/docs/latest/securing_apps/index.html#_spring_security_adapter
On Wed, Jul 11, 2018 at 8:19 PM, Daniel Teixeira <ddtxra at gmail.com> wrote:
> Hello,
> I have noticed that roles belonging to realm_access are present in the
> Authentication object. But roles belonging to other client applications
> (resource_access) are missing in the Authentication Java object.
>
> Would it make sense to include them?
>
> I am not sure if it makes sense to change it in
> KeycloakAuthenticationProvider
> https://github.com/keycloak/keycloak/blob/master/adapters/
> oidc/spring-security/src/main/java/org/keycloak/adapters/
> springsecurity/authentication/KeycloakAuthenticationProvider.java#L51
>
> Or when creating the SimpleKeycloakAccount using AdapterUtils?
> https://github.com/keycloak/keycloak/blob/master/adapters/
> oidc/adapter-core/src/main/java/org/keycloak/adapters/
> AdapterUtils.java#L52
>
> Cheers,
> Daniel
>
--
Daniel Teixeira
More information about the keycloak-dev
mailing list