io.modelcontextprotocol/enterprise-managed-authorization (SEP-990).
Issuer
One issuer per Clerk organization:https://api.allternit.com. Under the issuer:
The ID-JAG
- Header:
typ: oauth-id-jag+jwt,alg: ES256,kid= base64url SHA-256 of the public key. - Claims:
iss(the org issuer),sub(Clerk user id),email,email_verified: true,aud(the vendor AS issuer),client_id(Allternit’s client id at that AS),resource,scope,jti,iat,exp(at most 300 seconds afteriat). - Issued only when the user is a member of the org, a managed config for that org and connector is enabled, the member’s role is in its roles, and the user’s primary email is verified. Every issuance is logged (
idjag_issuance_log).
ALLTERNIT_IDJAG_ES256_PEM. When it is unset every issuer endpoint answers 503 idjag_not_configured: it fails closed. To rotate, publish the new key in the JWKS next to the old one, switch the signing key, and drop the old key after the longest token lifetime (300 s) has passed.
Runtime calls (allternit-api to cloud-api)
The user’s runtime asks cloud-api with its device credential (Authorization: Bearer <device token> and x-allternit-runtime-id), the same one its runtime-devices/me/* calls use. The device token belongs to the user the runtime is paired as; the runtime refuses to ask for anyone else.
Errors are
{ "error": { "code", "message" } } with codes not_configured, not_member, role_not_allowed, email_unverified, idjag_not_configured. The runtime shows its own plain wording for each.
The managed connector auth kind
In cmd/allternit-api/src/connector_routes.rs and managed_auth.rs:
POST /api/v1/connectors/:id/connectwith noviachecks the user’s configs (cached one minute). An enabled config for that connector wins over the connector’s own sign-in.via: "managed"asks for it explicitly; any othervia(for example"oauth2") skips it.- The runtime gets an ID-JAG, then posts
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=<ID-JAG>(plusscope) to the vendortoken_endpoint, withclient_secret_basicclient auth, orclient_idin the body for a public client. The token endpoint must be HTTPS. A response withoutexpires_inis treated as one hour so it still renews. - The token set is stored sealed in two places, written together: a
connector_connectionsrow (auth_type = 'managed', account keymanaged:<org id>, made the default account) and anmcp_connectors+mcp_oauth_sessionspair for the vendor’s MCP server (resource), which is what chat turns and the MCP edge serve. The client secret is not stored on the runtime; each renewal fetches it again with the new ID-JAG. - Expiry (60 s early) or a
401from the connector gets a new ID-JAG and a new grant, with no UI. A refresh token, if the AS returns one, is kept but renewal always re-grants. - A refusal answers
409with{ "error": "managed_auth_failed", "code", "message", "fallback": { "via": "oauth2", "label": "Connect with sign-in instead" } }.fallbackis there only when the connector has a normal sign-in. The runtime never falls back by itself.
POST /connectors/:id/refresh re-grants a managed connection. DELETE /connectors/:id/disconnect removes the managed rows and the MCP connector the grant created. A managed connection on a connector served by the open-connector service runs through its MCP server; its REST execute answers 409 managed_use_mcp.
Directory hints
assets/connectors.meta.json may carry "managed": { "as_issuer", "token_endpoint", "resource" } on a connector, which the listing passes on as managed to prefill the admin form. Only add it with a link to the vendor’s docs confirming that its AS accepts outside ID-JAG issuers. None is marked today. The meta file only lists the connectors served in-process, so a hint for an open-connector-served connector belongs in the admin form (“Custom MCP server”) instead.
Local endpoints
gizzi
gizzi’s IdP mode allternit (cmd/gizzi-code/src/runtime/services/mcp/xaaAllternit.ts) is on whenever gizzi is signed in to Allternit (ALLTERNIT_API_URL and a token). Connecting to an MCP server, gizzi asks the local allternit-api for an ID-JAG for that server URL and runs the JWT-bearer step itself, so no browser opens. 404 or 503 means the normal OAuth flow runs; any other failure is an error, never a quiet switch to the consent flow. GIZZI_DISABLE_ALLTERNIT_XAA=1 turns the mode off. GIZZI_ENABLE_XAA still gates only the generic external-IdP mode (oauth.xaa).