Replies: 1 comment
-
|
Just found my problem 😅 When creating the IAT via the UI, Changing to curl -X POST http://localhost:8888/admin/realms/acme/clients-initial-access -H 'Authorization: Bearer <ACCESS_TOKEN>' -H 'Content-type: application/json' -d '{"expiration": 86400, "count": 2}' -vsaved my day ;-) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I've got a strange behavior regarding the dynamic registration of an OIDC client using Initial Access Token on Keycloak 26.3.0.
When accessing the Keycloak console as
adminand managing myacmestream, I can create an Initial Access Token and then register a new Client using the following curl command:Everything works fine! 🎉
Now I'm trying to do the same thing, in an automated way using a Service Account. To be sure to not face privilege issue, I've assigned the
realm-management realm-adminrole to this service (I can restrict this later on).Using this service account, I can retrieve an access token using:
I can then create an Initial Access Token using:
But when I'm registering a client using the same curl command as the one used with IAT delivered with the console, I now have:
{"error":"invalid_token","error_description":"Failed decode token"}On the server side, I can only see this line in the logs:
I've inspected the IAT (provided by the console and the service account) in tools like jwt.io but cannot see any differences on the headers and payload parts...
I've also turned
DEBUGlog level on the server side but cannot see any relevant logs (just a lot of ORM related traces).Can someone please help and provide some guidance on how to further troubleshoot this?
Beta Was this translation helpful? Give feedback.
All reactions