Create roles for client during client registration?

165 views
Skip to first unread message

Jurrie

unread,
Jul 7, 2021, 2:55:55 PM7/7/21
to Keycloak User

Hello everyone,

I’m basically stuck by KEYCLOAK-18311 1. I have a setup utility that is used to configure my clients in a Keycloak instance. This is done using the client registration API with an initial access token. Each client has one ore more roles. Previously, I added those roles to the client using default roles. This is no longer working as of Keycloak 13.1.

How can I create roles for clients using the client registration API?

I think it can be done using the admin API, but I think I need to pass admin credentials to use that API. As my utility program is run automatically without admin intervention, I rather not depend on admin credentials.

Hope anyone can give me advice in how to tackle this!

With kind regards,

Jurrie

PS: I realize this is cross-posted on Discourse as well. Sorry for that.

C R

unread,
Jul 8, 2021, 1:18:54 PM7/8/21
to Jurrie, Keycloak User

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/afe9dad4-5209-4b86-a67c-a87ff40889f4n%40googlegroups.com.

Jurrie

unread,
Jul 8, 2021, 1:22:51 PM7/8/21
to Keycloak User
Thanks for replying!

Unfortunately, an initial access token is what I currently already use; that's the thing that I use for the client registration API. And that's what got broken/changed in Keycloak 13.

With kind regards,

Jurrie

C R

unread,
Jul 8, 2021, 3:12:28 PM7/8/21
to Jurrie, Keycloak User
Oh, so another thing broken in 13 :( (see the thread about the client secret).

C.

Vlasta Ramik

unread,
Jul 9, 2021, 6:54:46 AM7/9/21
to Jurrie, Keycloak User

Hello,

just fyi ... I've just sent PR https://github.com/keycloak/keycloak/pull/8254 with fix. 

Regards

Reply all
Reply to author
Forward
0 new messages