Repository navigation
Replies: 2 comments 2 replies
|
You probably should not try to make this work with the normal A SPIRE JWT-SVID is not the same shape as a normal RFC 7523 For SPIRE/SPIFFE, use Keycloak federated client authentication with a SPIFFE identity provider/trust relationship instead of
The token request should be closer to this shape: If you stay on the regular Keycloak's own federated client auth write-up calls out this exact SPIFFE distinction: SPIFFE JWT-SVIDs lack If this solves it, please mark this comment as the answer so other people can find it faster. |
|
The The audience in the SPIRE token can still be the realm issuer ( For the later So Keycloak is failing before it successfully maps the federated assertion to a configured client. I would check these in order:
In short: the endpoint should be the OIDC token endpoint; the issuer URL is for audience/trust matching; and |
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 Guys, I am setting SPIFFE pattern using SPIRE on my local machine using docker.
However, I am having some issue with
issfield from Keyclock to authenticate me and give a token.Please see the entire flow from AI Agent perspective
The decoded value of the token is:
{ "aud": [ "http://keycloak:8080/realms/master/protocol/openid-connect/token" ], "exp": 1779951229, "iat": 1779947629, "sub": "spiffe://example.org/ai-agent" }Logs from keyclock
As you can see it does not have an issuer. I don't know how to add this when token is given by SPIRE.
The keyclock configurations are set as
{ "id" : "0d319471-d3cf-437f-af80-58aa3dae38ae", "clientId" : "spiffe://example.org/ai-agent", "name" : "", "description" : "", "rootUrl" : "", "adminUrl" : "", "baseUrl" : "", "surrogateAuthRequired" : false, "enabled" : true, "alwaysDisplayInConsole" : false, "clientAuthenticatorType" : "client-jwt", "secret" : "TRVttg6tzKudENbIZ6DaxkCQAQpOmE6I", "redirectUris" : [ ], "webOrigins" : [ ], "notBefore" : 0, "bearerOnly" : false, "consentRequired" : false, "standardFlowEnabled" : false, "implicitFlowEnabled" : false, "directAccessGrantsEnabled" : false, "serviceAccountsEnabled" : true, "publicClient" : false, "frontchannelLogout" : false, "protocol" : "openid-connect", "attributes" : { "logout.confirmation.enabled" : "false", "jwt.credential.sub" : "spiffe://example.org/ai-agent", "standard.token.exchange.enabled" : "false", "oauth2.jwt.authorization.grant.enabled" : "false", "token.endpoint.auth.signing.alg" : "ES256", "oauth2.device.authorization.grant.enabled" : "false", "use.jwks.url" : "true", "backchannel.logout.revoke.offline.tokens" : "false", "realm_client" : "false", "oidc.ciba.grant.enabled" : "false", "backchannel.logout.session.required" : "true", "jwks.url" : "http://spire-oidc-provider:8002/keys", "jwt.credential.issuer" : "spiffe", "display.on.consent.screen" : "false", "client.secret.jwt.issuer.validation" : "false", "dpop.bound.access.tokens" : "false" }, "authenticationFlowBindingOverrides" : { }, "fullScopeAllowed" : true, "nodeReRegistrationTimeout" : -1, "protocolMappers" : [ { "id" : "c4896e70-b3a9-4b47-87f5-026c24596c36", "name" : "Client ID", "protocol" : "openid-connect", "protocolMapper" : "oidc-usersessionmodel-note-mapper", "consentRequired" : false, "config" : { "user.session.note" : "clientId", "id.token.claim" : "true","access.token.claim" : "true",
"claim.name" : "clientId",
"jsonType.label" : "String"
}
}, {
"id" : "5fa81d89-c066-426e-8754-aadfd2f36456",
"name" : "Client IP Address",
"protocol" : "openid-connect",
"protocolMapper" : "oidc-usersessionmodel-note-mapper",
"consentRequired" : false,
"config" : {
"user.session.note" : "clientAddress",
"id.token.claim" : "true",
"access.token.claim" : "true",
"claim.name" : "clientAddress",
"jsonType.label" : "String"
}
}, {
"id" : "19703f60-c80f-4ea0-a0a9-1493a9ac7617",
"name" : "Client Host",
"protocol" : "openid-connect",
"protocolMapper" : "oidc-usersessionmodel-note-mapper",
"consentRequired" : false,
"config" : {
"user.session.note" : "clientHost",
"id.token.claim" : "true",
"access.token.claim" : "true",
"claim.name" : "clientHost",
"jsonType.label" : "String"
}
} ],
"defaultClientScopes" : [ "service_account", "web-origins", "acr", "profile", "roles", "basic", "email" ],
"optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ],
"access" : {
"view" : true,
"configure" : true,
"manage" : true
}
} You can see these two properties
AI Says
How can I make it a success so that it can issue a token?
All reactions