Accept a partner's identity
Let a client turn a trusted partner's signed statement about a user into access here, for users you've linked to their partner account.
APIRFC 7523, Identity Assertion JWT Authorization Grant (draft)
Your users sign in at a partner’s workforce identity provider, and the apps, MCP clients or agents they use there need access in this realm for them. A client they use at the partner obtains a signed identity assertion about them, addressed to this realm, and exchanges it here for an access token about the same user. They don’t sign in again, and you decide exactly which partners and which users.
Before you start:
- Who can do it: a realm administrator (a group holding
RealmOwner). - Where: today this is set through the API; Call the API shows how to get a session.
- What you need: the partner’s issuer address, where it publishes its keys, and each user’s identifier at the partner.
Trust the partner
Section titled “Trust the partner”-
Offer the grant. Read the realm’s settings with
GET https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2Settings, then send itsgrantTypesback with the grant added:Terminal window curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2Settings \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{ "grantTypes": ["…existing grant types","urn:ietf:params:oauth:grant-type:jwt-bearer"] }'Do the same on the client (
https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Client/<client-id>). -
Trust the partner, with its keys inline (
jwks) or where it publishes them (jwksUri):Terminal window curl 'https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2TrustedIssuer?id=workforce' \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{"issuer": "https://login.partner.example","jwksUri": "https://login.partner.example/keys","status": "active","displayName": "Partner workforce sign-in"}' -
Link each user to their partner identity.
linkis the partner’s issuer and its identifier for the user, separated by one space. The user’s id is their permanent id in the realm (a UUID), the samesubtheir own tokens carry, and it goes in bothpersonandpersonId:Terminal window curl 'https://foobar.cvyuh.com/api/v0/am/objects/v1/foreignIdentity?id=<link-name>' \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{"link": "https://login.partner.example 00u8a7b6c5d4","person": [{ "id": "<user-id>" }],"personId": "<user-id>"}'A link matches exactly, letter case included. Each partner identifier links to one user.
-
Register the client with a key or a secret, as in Choose how a client proves itself. A public client is refused.
Check it worked
Section titled “Check it worked”The client posts the assertion to https://foobar.cvyuh.com/oauth2/token, proving itself as a confidential client:
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=<the identity assertion>It receives an access token about the linked user, and no refresh token: when the token expires, it gets a fresh assertion from the partner. The realm refuses the assertion if:
- the partner isn’t trusted, or is disabled;
- it isn’t addressed to this realm, or not to this client;
- it was used before, or is out of date;
- no user here is linked to the partner’s identifier for them, or that user is inactive.
Each attempt is a TOKEN_ISSUED record: an issued token on the user’s trail, naming the partner as its assertion’s
issuer; a refusal keyed by the client, with the issuer the assertion claimed and the error.
Undo it
Section titled “Undo it”Set the partner’s status to inactive (PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2TrustedIssuer/workforce) to refuse every
assertion it signs, or delete one user’s foreignIdentity link to stop it for that user alone.
Related
Section titled “Related”- Identity assertion grant: every check the realm makes.
- Accept apps identified by a URL: third-party apps with no registration.
- Share security signals: let a partner’s events end access here.