Configuring the same application across Tenants

Configuring the same application across Tenants

Solution 1:? If we have all clients in the same realm, the same client is shared across the tenants.

The tenants are managed using user attributes. Add user attribute “TenantId” which will be a multi-valued string.

Adding tenant attribute to a user

?

Value can be provided for each user.

In client scopes, we can add a mapper for this attribute and set scope as default, to be added in token scope

Adding user attribute to client scope


Add mapper for the client scope

.

Then for each client, we can add this to the client scope

.

Then this value would be added to each user token.


We can add it in a default scope:

Then we can view it in the access token

Check for attribute in access token


Solution2:

Same Clients in different Realms/ Tenants:

We can create a client in a realm and use the same config in other realms/ Tenant config.

In order to set the client credentials to be same across the realms, we can call the create client api and pass the secret. That too works well.


要查看或添加评论,请登录

payal bansal的更多文章

社区洞察

其他会员也浏览了