Repository navigation
|
I'm trying to authenticate my client (not user) using JWT Bearer token. Problem is that token is not accepted by keycloak (same instance as generated it). First I generated the token using equivalent to: I receive the token in format Then I try to use the token to send request against keycloak and receive HTTP status 401 and error: According to #15688 this is not a bug but a feature.
I'm sorry if I'm missing something obvious but how can these two ever be same? (in my case "iss" = "http://localhost:32900/realms/test-realm", "sub" = "57a112b7-6f38-415e-8ef5-bfd5d62e7aa1"). Or to help my problem - how can I generate an access token that keycloak will actually accept? |
Replies: 2 comments
|
To put this in a perspective. I'm trying to authenticate keycloak client using token. E.g. for token introspection.
Result is What is wrong in this flow? How can I make it work? |
|
Eventually we figured out that above mentioned workflow is not supported in keycloak. If we want to access keycloak using token as |
Eventually we figured out that above mentioned workflow is not supported in keycloak. If we want to access keycloak using token as
client_assertionwe need to use signed JWT, not tokens generated by keycloak. In case of signed JWT it actually has same "issuer" and "subject" claims as in this case client is signing token for himself.