Repository navigation
Signed JWT - Federated #50225
Replies: 1 comment 5 replies
|
I think there are two separate things here. For Signed JWT - Federated, Keycloak does not map the Entra token sub to the Keycloak client id via normal protocol mappers. The lookup is: So the Keycloak client can keep its own local client id, but in the client credentials configuration you need to set: The Federated Subject is the external client id / external subject. It does not have to be the same string as the Keycloak client id, but it must match the incoming assertion’s sub. For the audience, the assertion should normally have aud set to the Keycloak realm issuer URL, for example: or, if you enable “Allows Client ID for audience for assertions”, then Keycloak can also accept the external client id as audience. I would first try the realm issuer URL as audience if you can control the Entra token audience. The jti problem is different. The error: means Keycloak is validating the incoming JWT client assertion and expects a real jti claim in that assertion. Mapping Entra’s uti to jti with identity-provider mappers or client-scope mappers will not help here, because those mappers are applied when Keycloak issues/links tokens, not before the incoming client_assertion is validated for client authentication. So if the Entra token really has no jti, you probably have only a few options:
I would not rename the sub claim or rename the Keycloak client to match it. The cleaner setup is to leave the Keycloak client id as your local client id and put the Entra token’s actual sub value into Federated Subject. So my suggested checklist would be:
My current guess is that your subject mapping can be fixed by setting Federated Subject to the Entra sub, but the remaining blocker is the missing jti claim in the assertion. |
Uh oh!
There was an error while loading. Please reload this page.
Am using version 26.6.1. I am testing the signed jwt- federated client authentication, with identity provider and federated subject as entra token claim “aud”. I have used the entra token as client assertion with grant type client_credentials with keycloak client id. It’s giving error invalid client. Then I renamed the “sub” claim value from entra token and renamed the client name with the “sub” value and provided sub claim value in federated subject. Now am getting the error “Token jti claim is required”
And checked in entra token which is not sending JTI claim in the token.
Am having few questions,
Note: I have enabled supports client assertion and Allows Client ID for audience for assertions.( Tested without Allows Client ID for assertions also).
Do we have any insight on what can we do to make signed jwt - federated working.
All reactions