Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Okta Developer 10 min read How-to mediumAdept

Add Cross App Access to Your OIDC Requesting Application

Cross App Access (XAA) lets an OIDC-federated app reach third-party APIs by exchanging the refresh token from sign-in for an Identity Assertion Authorization Grant (ID-JAG) at the IdP via RFC 8693 token exchange, then redeeming that short-lived JWT for an access token at the resource app's authorization server via the RFC 7523 jwt-bearer grant. The guide shows the exact token requests and how to handle expiry: re-mint ID-JAGs from the long-lived refresh token, and send the user back through sign-in on invalid_grant. It then walks through configuring Okta app integrations, an AI Agent with a resource connection, and end-to-end conformance testing against xaa.dev.

Assumes: OAuth 2.0 grant typesOpenID Connect sign-in flowJSON Web Tokens

Related posts

  • Implement Secure Cross App Access (XAA) in Go

    Okta Developer mediumAdept

    Cross App Access (XAA) lets an app or AI agent reach another app's API on a signed-in user's behalf without a second sign-in or consent screen. The enterprise IdP issues a signed Identity Assertion Authorization Grant (ID-JAG) via RFC 8693 token exchange, and the resource's authorization server redeems it through an RFC 7523 JWT bearer grant for a scoped access token. A Go sample app walks the four steps against the xaa.dev playground: OIDC sign-in with hand-built PKCE, state and nonce kept in a short-lived cookie, the two token exchanges, then calling a ToDo MCP server with a bearer-token transport.

  • Build a Secure TypeScript MCP Client with Cross App Access (XAA)

    Okta Developer mediumAdept

    Cross App Access (XAA) lets an enterprise IdP vouch for a signed-in user across app boundaries, replacing per-app OAuth consent screens and shared service accounts with admin-set policy. The tutorial builds a TypeScript MCP client that signs in via OIDC with PKCE and exchanges the ID token for an ID-JAG (RFC 8693). It then trades the ID-JAG for an access token via the JWT bearer grant (RFC 7523) and calls a protected MCP server, using the MCP SDK's CrossAppAccessProvider against the xaa.dev playground. Key pitfalls: keep separate client credentials for the IdP and the resource authorization server, avoid trailing slashes in audience URLs, and make sure the ID-JAG's resource claim matches the access token's aud.

  • SSO-Backed kubectl Access Across Many Clusters

    Teleport mediumAdept

    When development, staging and production Kubernetes API servers all trust the same OIDC issuer and audience, a single cached kubectl token authenticates to every cluster, leaving RBAC as the only barrier and making a leaked token usable against production. A hands-on walkthrough with Dex and kubelogin shows how the API server authenticates (checking iss, aud and the username claim) before RBAC authorizes, how merged kubeconfig contexts end up sharing one OIDC client ID, and how 401 differs from 403. The fix is per-environment OIDC client IDs, configuring each API server's accepted audiences so production rejects development and non-production tokens at the authentication step.

  • JSON Web Keys (JWK): Rotating Cryptographic Keys at Zalando

    Zalando Engineering mediumAdept

    Zalando's OIDC identity provider rotates its JWT signing keys automatically on a schedule, using a phased process so clients are never disrupted. A new key pair is generated and its public key is published on the JWK endpoint, with a grace period so clients can refresh cached key sets. The new key is then promoted to active signer, while the retired key stays published until every token it signed has expired. Removal time is computed as retirement time plus maximum token lifetime plus a safety margin, using the key ID embedded in each JWT.

  • Build "Sign in with Your App" using Supabase Auth

    Supabase mediumAdept

    Supabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with [Your App]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO. It uses the authorization code flow with PKCE, issues JWT access tokens carrying a client_id claim alongside the usual user_id and role, and also provides ID tokens, a UserInfo endpoint, refresh tokens, a JWKS endpoint and discovery documents at /.well-known/oauth-authorization-server and /.well-known/openid-configuration. MCP clients can register themselves through dynamic client registration. Existing login methods, Custom Access Token Hooks and Row Level Security all apply to OAuth tokens, so RLS policies can limit each client to specific data by checking the client_id claim. Granular scopes are planned but not yet available.

The quest for software engineering knowledge.

Look:
Layout: