Skip to content
Workforce IdentityMarkdown

Identity assertion grant

A client turns a trusted partner's signed statement about a user into a token here, for a user you have linked to that partner's account.

AvailableAPIRFC 7523 §2.1, Identity Assertion JWT Authorization Grant (draft)

Your users sign in at a partner’s identity provider: a workforce provider, or a parent company. With this grant, that provider can give a client a signed statement about a user, addressed to your realm, and the client trades it here for an access token about the same user in your realm, without them signing in again.

Use it for enterprise apps and MCP clients whose users already signed in at your workforce provider. The realm trusts a partner only if you list it as a trusted issuer, and finds the user only through a link you made between the partner’s account and the user here. The reverse direction, where the realm vouches for its own users to a partner, is issuing identity assertions.

  • Who can do it: a realm administrator (a group holding RealmOwner) trusts the partner and links its users; RealmViewer can read both. The client then redeems assertions itself.
  • Where: today this is done through the API (Call the API shows how to get $CVYUH_SESSION).
  • First: the partner’s issuer name and its keys (inline or at a public https address), and its id for each of your users.

An identity assertion is a short-lived signed token (a JWT) that says “this is user X at our side”. The realm never matches it on email or any other shared detail, because an email can be reassigned at the partner. It matches only on a foreign identity link: the partner’s identifier for the user, tied to one user here.

1. You list the partner and link the user. The partner is an oauth2TrustedIssuer:

{ "issuer": "https://idp.partner.example/", "jwksUri": "https://idp.partner.example/jwks",
"status": "active", "accepts": ["idJag"] }

Each user who arrives from it has a foreignIdentity. The link is the partner’s issuer, a space, and the partner’s sub for the user. personId is the user’s id here:

{ "link": "https://idp.partner.example/ fay-at-idp",
"personId": "6f1c2a9e-3b4d-4e8f-9a01-7c2d5e6f8a90",
"person": [{ "id": "6f1c2a9e-3b4d-4e8f-9a01-7c2d5e6f8a90" }] }

2. The client presents the assertion at the token endpoint, authenticating as itself:

Terminal window
curl https://foobar.cvyuh.com/oauth2/token \
-u 'expense-app:<secret>' \
-d grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer \
-d assertion=eyJ0eXAiOiJvYXV0aC1pZC1qYWcrand0Ii… \
-d scope=expenses:read

The assertion’s header has typ oauth-id-jag+jwt. Its claims, as the partner signed them:

{ "iss": "https://idp.partner.example/", "sub": "fay-at-idp", "aud": "https://foobar.cvyuh.com",
"client_id": "expense-app", "jti": "9b2e41c0-…", "iat": <unix time>, "exp": <iat + 300>,
"scope": "expenses:read expenses:write", "resource": "https://api.example.com/expenses" }

The answer is a normal token response, with an access token about the linked user. When the assertion names a resource, that sets the token’s audience. Otherwise the request’s own resource, or the client’s default audience, does. While the grant is offered, the discovery document lists it in authorization_grant_profiles_supported, so clients learn it from the metadata.

These steps use the admin API; Call the API shows how to get a session.

  1. Add urn:ietf:params:oauth:grant-type:jwt-bearer to the realm’s grantTypes (PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2Settings) and to the client’s (https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Client). Read the realm’s settings first with GET on the same address, and send back the whole list with the new value added: a list you send replaces the realm’s list.
  2. Create an oauth2TrustedIssuer object for the partner, with accepts including idJag.
  3. Create a foreignIdentity object for each user who arrives from the partner.
WhereSettingWhat it does
Realm and clientgrantTypes include urn:ietf:params:oauth:grant-type:jwt-bearerOff by default
oauth2TrustedIssuerissuer, jwks or jwksUri, status, displayNameA partner you trust. issuer is matched exactly against the assertion’s iss. jwksUri is fetched over public https only
oauth2TrustedIssueracceptsWhat you redeem from it: idJag, chaining or both (default ["idJag"])
foreignIdentitylink, personId, personOne user’s link to the partner: link is "<issuer> <their id for the user>", personId the user’s id; both required. The realm finds the user by personId. One link belongs to one user only
RealmtokenEndpointAuthSigningAlgsThe algorithms an assertion may be signed with (default ES256, RS256)
RealmclientAssertionMaxLifetimeSecsHow far ahead an assertion’s exp may lie (default 300)
Setting or limitDefaultRange
clientAssertionMaxLifetimeSecs: how far ahead an assertion may expire3001 to 3,600
tokenEndpointAuthSigningAlgsES256, RS256add PS256
accepts on a trusted issuer["idJag"]idJag, chaining or both
Redemptions per assertiononefixed
What it buysan access token, no refresh tokenfixed
SymptomCauseFix
invalid_grant for every assertion from a partnerThe issuer isn’t listed, is inactive, doesn’t accept idJag, or its issuer differs from the assertion’s issCheck the oauth2TrustedIssuer: exact issuer, status active, accepts holding idJag
invalid_grant for one user onlyNo foreignIdentity links the partner’s id for them, or they’re inactive hereCreate the link with their personId
unauthorized_clientThe client is public, an agent’s, or lacks the grantUse a confidential client with urn:ietf:params:oauth:grant-type:jwt-bearer

Each redemption, allowed or refused, is a TOKEN_ISSUED record with grantType urn:ietf:params:oauth:grant-type:jwt-bearer. An issued one names the partner in assertionIssuer and is under the linked user; a refused one is under the client and names the issuer the assertion claimed (claimedAssertionIssuer). Changes to trusted issuers and links are in Audit → Config.

  • The assertion’s header names its type, oauth-id-jag+jwt. It is signed with one of the realm’s tokenEndpointAuthSigningAlgs, under a key of an active trusted issuer whose accepts includes idJag. An issuer that isn’t listed, isn’t active, or doesn’t accept identity assertions is refused alike.
  • It is addressed to this realm (aud is the realm’s issuer, as a string or a one-element array), names the redeeming client in client_id, and is fresh: it carries a jti and an exp, and exp lies no further ahead than clientAssertionMaxLifetimeSecs.
  • An assertion bound to a key (cnf.jkt) is redeemed only under a DPoP proof of that key.
  • Every resource it names is one this realm serves, or the assertion is refused invalid_grant.
  • Scopes and resources only. An authorization_details claim in the assertion isn’t read, a known limit against the identity-assertion draft.
  • An assertion this realm made itself is refused. It is redeemed at the partner, not here.
  • Each assertion is redeemed once.
  • The user must still be active here, and be found through a link whose personId names them.
  • Only a confidential client may redeem one, and never an agent’s client. An agent acts for a user through token exchange or backchannel authentication, never by signing in as them.
  • An access token only, never a refresh token. Its scopes lie within the assertion’s scope, the client’s and the realm’s. With no scope in the request, it carries every scope in the assertion that the client and the realm allow. It is also held to the realm’s governed scopes.
  • Every redemption is recorded. Allowed or refused, it is on the audit trail.
ErrorWhen
invalid_grantThe assertion is malformed, of another type, from an issuer you don’t trust for it, or doesn’t verify; it isn’t addressed to this realm, has expired or reaches too far ahead; it names another client; it was already redeemed; it names no linked, active user; it was made by this realm; it is bound to a key the request didn’t prove; or it names a resource this realm doesn’t serve
invalid_requestNo assertion is sent, or a parameter is repeated
unauthorized_clientA public client, an agent’s client, or a client without the grant
invalid_scopeA scope beyond the assertion’s, the client’s or the realm’s
invalid_targetA resource the client may not name, or none named when the client has no default audience