terraform-provider-keycloak icon indicating copy to clipboard operation
terraform-provider-keycloak copied to clipboard

Client Scope roles support

Open myardyas opened this issue 2 years ago • 6 comments

Hi, Is there a way to support Roles in Client Scope settings? I mean: Client Scopes -> [Choose One] -> Tab 'Scope'. There are realm/clients roles could be set. Thanks in advance!

myardyas avatar Oct 20 '21 10:10 myardyas

That isn't currently supported. I could see this being a new resource, like keycloak_openid_client_scope_role_scope_mappings, although that is a pretty long name. Let me know if you have any suggestions for the name or the API.

mrparkers avatar Oct 20 '21 14:10 mrparkers

This name keycloak_openid_client_scope_role_scope_mappings sounds good, quite descriptive. Thanks!

myardyas avatar Oct 21 '21 06:10 myardyas

I also have demand on this. Is there any plan for implementation? Otherwise i would try to find some time implementing this.

FlxPeters avatar Nov 14 '21 22:11 FlxPeters

I also have need for that. I would call it keycloak_openid_scope_role_scope_mapper since it can be applied on

  • Client Scopes -> [Choose One] -> Tab 'Scope' -> select a client in 'Client Roles'
  • Clients -> Tab 'Scope' -> select a client in 'Client Roles' (if 'Full Scope Allowed' if 'off')

so like keycloak_openid_audience_protocol_mapperor other mapppers it probably better to implement is for both scenarios.

schmocker avatar Nov 26 '21 15:11 schmocker

I also have a need for this.

My implementation of keycloak heavily uses Role -> Client Scope mappings for mapping roles that come from our IdP into scopes.

I also need it in my case when setting up service accounts to map a service account specific client scope from a service account specific client role.

@FlxPeters have you taken a crack at this yet in any capacity?

nickzelei avatar Jan 03 '22 23:01 nickzelei

Hej, hope finding a suitable name is the only obstacle. We are also in need to configure a client scope's scope mapping to roles. Any idea if this is going to be addressed somewhen soon?

nielsvonstein-8336 avatar Mar 05 '22 20:03 nielsvonstein-8336

Isn't this already supported by generic_client_role_mapper? It took me a little while to find it because I was expecting a name like generic_client_scope_mapping.

kherock avatar Oct 06 '22 18:10 kherock