Warm tip: This article is reproduced from stackoverflow.com, please click
keycloak oauth oauth-2.0 openid-connect security

Is there a way to add a realm level protocol mapper in keycloak?

发布于 2020-04-20 10:01:29

Keycloak allows to add custom attributes to users. However, in order for these attributes to appear in access token, we have to add a protocol mapper in the "client". If you have many clients and all clients are interested in those attributes, it becomes more effort to add these protocol mappers in all the clients. I was wondering if it is possible to add a protocol mapper on realm level so the attribute is always present in access tokens for all clients?


creating protocol mapper

Questioner
Bilal Fazlani
Viewed
151
Jan Garaj 2020-02-05 15:28

I would try to create Client Scope with mapper, which will be Assigned Default Client Scope on the realm level.