Okta

Okta identity provider emulation with OAuth 2.0 / OIDC, user management, groups, apps, and authorization servers. Supports both default org server and custom authorization server paths.

OAuth / OIDC

Default org server and custom authorization server paths (/oauth2/:authServerId/...):

  • GET /.well-known/openid-configuration — OIDC discovery (default)
  • GET /oauth2/:authServerId/.well-known/openid-configuration — per-server discovery
  • GET /oauth2/v1/keys — JSON Web Key Set (JWKS)
  • GET /oauth2/v1/authorize — authorization endpoint
  • POST /oauth2/v1/token — token endpoint (authorization code, refresh token, client credentials, RFC 8693 token exchange)
  • GET /oauth2/v1/userinfo — user info
  • POST /oauth2/v1/revoke — token revocation
  • POST /oauth2/v1/introspect — token introspection
  • GET /oauth2/v1/logout — end session

Enterprise-Managed Authorization (ID-JAG)

Okta plays the enterprise IdP in the MCP Enterprise-Managed Authorization profile. The token endpoint accepts grant_type=urn:ietf:params:oauth:grant-type:token-exchange with requested_token_type=urn:ietf:params:oauth:token-type:id-jag and exchanges an ID token or a refresh token for an Identity Assertion JWT Authorization Grant.

curl -s -X POST http://localhost:4006/oauth2/default/v1/token \
  -d grant_type=urn:ietf:params:oauth:grant-type:token-exchange \
  -d requested_token_type=urn:ietf:params:oauth:token-type:id-jag \
  -d audience=http://localhost:4009 \
  -d resource=http://localhost:4009/mcp \
  -d scope="repo read:user" \
  -d subject_token="$ID_TOKEN" \
  -d subject_token_type=urn:ietf:params:oauth:token-type:id_token \
  -d client_id=okta-test-client \
  -d client_secret=okta-test-secret

The grant is signed with the same key as ID tokens, uses the JWT header typ: oauth-id-jag+jwt, and is issued by whichever authorization server minted it. Present it to the MCP server's authorization server with grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer to obtain an MCP access token.

Administrator policy decides which client may act for which user, at which audience and resource, and with which scopes. Seed it under token_exchange_policies or manage it through the management API:

  • GET /api/v1/tokenExchangePolicies — list
  • POST /api/v1/tokenExchangePolicies — create
  • GET /api/v1/tokenExchangePolicies/:policyId — get
  • PUT /api/v1/tokenExchangePolicies/:policyId — update
  • DELETE /api/v1/tokenExchangePolicies/:policyId — delete

Omit a condition to match anything. An empty table allows every exchange; once any policy exists the table is an allowlist and unmatched requests are denied with invalid_target. DENY beats ALLOW, and a non-empty scopes list narrows the scope carried by the grant.

Users

  • GET /api/v1/users — list users
  • POST /api/v1/users — create user
  • GET /api/v1/users/me — current user (from token)
  • GET /api/v1/users/:userId — get user
  • PUT /api/v1/users/:userId — replace user
  • POST /api/v1/users/:userId — partial update
  • DELETE /api/v1/users/:userId — delete user
  • GET /api/v1/users/:userId/groups — list user groups
  • POST /api/v1/users/:userId/lifecycle/activate — activate
  • POST /api/v1/users/:userId/lifecycle/deactivate — deactivate
  • POST /api/v1/users/:userId/lifecycle/suspend — suspend
  • POST /api/v1/users/:userId/lifecycle/unsuspend — unsuspend
  • POST /api/v1/users/:userId/lifecycle/reactivate — reactivate

Groups

  • GET /api/v1/groups — list groups
  • POST /api/v1/groups — create group
  • GET /api/v1/groups/:groupId — get group
  • PUT /api/v1/groups/:groupId — update group
  • DELETE /api/v1/groups/:groupId — delete group
  • GET /api/v1/groups/:groupId/users — list group members
  • PUT /api/v1/groups/:groupId/users/:userId — add user to group
  • DELETE /api/v1/groups/:groupId/users/:userId — remove user from group

Apps

  • GET /api/v1/apps — list apps
  • POST /api/v1/apps — create app
  • GET /api/v1/apps/:appId — get app
  • PUT /api/v1/apps/:appId — update app
  • DELETE /api/v1/apps/:appId — delete app
  • GET /api/v1/apps/:appId/users — list assigned users
  • PUT /api/v1/apps/:appId/users/:userId — assign user
  • DELETE /api/v1/apps/:appId/users/:userId — unassign user
  • POST /api/v1/apps/:appId/lifecycle/activate — activate app
  • POST /api/v1/apps/:appId/lifecycle/deactivate — deactivate app

Authorization Servers

  • GET /api/v1/authorizationServers — list
  • POST /api/v1/authorizationServers — create
  • GET /api/v1/authorizationServers/:authServerId — get
  • PUT /api/v1/authorizationServers/:authServerId — update
  • DELETE /api/v1/authorizationServers/:authServerId — delete
  • POST /api/v1/authorizationServers/:authServerId/lifecycle/activate — activate
  • POST /api/v1/authorizationServers/:authServerId/lifecycle/deactivate — deactivate