stuntman / providers / identity

Identity

An identity provider with synthetic people: OIDC and OAuth2, SAML, LDAP, password grant and Bot Framework.

Stands in for

  • Microsoft Entra ID (v2)
  • Google
  • Okta
  • Generic OIDC
  • SAML 2.0
  • LDAP / Active Directory
  • Bot Framework (Teams)

Everything Identity gives you

  1. 01

    Four flavours of OIDC

    Entra ID v2, Google, Okta or generic OIDC: discovery, JWKS, authorize, token, userinfo and logout, with the provider's error codes.

  2. 02

    A sign-in page

    Stuntman serves the login page: a person, a test or an agent picks the simulated user, then MFA and consent follow.

  3. 03

    Synthetic people

    Users with tenant, groups, roles, MFA, guest, extra claims, locked or disabled. The next tokens carry the change.

  4. 04

    App registrations

    Web, SPA, daemon or API apps with exact redirect URIs, secrets, permissions, optional claims and admin consent.

  5. 05

    SAML 2.0 IdP

    Metadata, SSO by Redirect or POST, a signed assertion posted to the app's ACS; name ID from email, oid or upn.

  6. 06

    LDAP directory

    Simple bind, search, compare and whoami on :3389. Wrong passwords, locked and disabled accounts answer as Active Directory.

  7. 07

    Password grant

    grant_type=password with AADSTS50126 for a wrong password, AADSTS50076 for MFA and AADSTS50053 for a locked user.

  8. 08

    Bot Framework

    send_bot_activity posts a Teams message or card action to the bot, signed by the Bot Connector; replies land in list_bot_messages.

  9. 09

    OAuth client checks

    Stuntman acts as the client of the app's MCP server and runs ten authorization checks against it.

The screens

Each number is a control or a reading on the real screen. Everything you can click there, your agent can do with a tool.

The sign-in page Stuntman serves

The sign-in page Stuntman serves: the Identity screen in Stuntman
1Pick who signs in

Each synthetic user with groups and MFA. Agents skip the page with sign_in_as.

1 of 5
2Another tenant

A user from another tenant, for apps that must refuse or accept guests.

2 of 5
3MFA, phone lost

A user whose MFA cannot complete, to test the app's error page.

3 of 5
4What the app asked for

Client, redirect, scopes, prompt, PKCE and state, checked against the app registration.

4 of 5
5Cancel

The person cancels: the app gets error=access_denied.

5 of 5
  1. Pick who signs in

    Each synthetic user with groups and MFA. Agents skip the page with sign_in_as.

  2. Another tenant

    A user from another tenant, for apps that must refuse or accept guests.

  3. MFA, phone lost

    A user whose MFA cannot complete, to test the app's error page.

  4. What the app asked for

    Client, redirect, scopes, prompt, PKCE and state, checked against the app registration.

  5. Cancel

    The person cancels: the app gets error=access_denied.

Users and the claims they carry

Users and the claims they carry: the Identity screen in Stuntman
1Users

Synthetic people of the tenant: MFA, guest, another tenant, disabled.

1 of 5
2Groups and roles

Set groups or a number of them: 210 groups takes the app down the overage path.

2 of 5
3MFA required

The next sign-in asks for a code; provoke mfa_fails to make it fail.

3 of 5
4The token

The ID token the app will get, with the claims of this user.

4 of 5
5Revoke consent

The next sign-in asks again and refresh tokens stop working.

5 of 5
  1. Users

    Synthetic people of the tenant: MFA, guest, another tenant, disabled.

  2. Groups and roles

    Set groups or a number of them: 210 groups takes the app down the overage path.

  3. MFA required

    The next sign-in asks for a code; provoke mfa_fails to make it fail.

  4. The token

    The ID token the app will get, with the claims of this user.

  5. Revoke consent

    The next sign-in asks again and refresh tokens stop working.

Older protocols on the same users

Older protocols on the same users: the Identity screen in Stuntman
1SAML 2.0

Metadata, SSO and entity ID per tenant, with signed assertions (RSA-SHA256).

1 of 5
2LDAP provocations

busy (51), unavailable (52) or timeout; normal stops it.

2 of 5
3Password grant

Off by default; on, it answers with the provider's AADSTS errors.

3 of 5
4Bot twists

Send an activity with a bad signature, expired, wrong audience or no token.

4 of 5
5Send to the bot

Posts the activity to the bot's endpoint as Teams would, signed by the connector.

5 of 5
  1. SAML 2.0

    Metadata, SSO and entity ID per tenant, with signed assertions (RSA-SHA256).

  2. LDAP provocations

    busy (51), unavailable (52) or timeout; normal stops it.

  3. Password grant

    Off by default; on, it answers with the provider's AADSTS errors.

  4. Bot twists

    Send an activity with a bad signature, expired, wrong audience or no token.

  5. Send to the bot

    Posts the activity to the bot's endpoint as Teams would, signed by the connector.

Break it on purpose

The failures you need to test, exactly when you ask: from the screen or by a tool call, each one shown on the timeline with who caused it.

  • MFA required or failing

    The next sign-ins ask for MFA, or the code fails

    provoke_sign_in mfa_required | mfa_fails
  • Consent required

    The user must consent again

    provoke_sign_in consent_required
  • User cancels

    The app gets error=access_denied

    provoke_sign_in user_cancels or cancel_login
  • Wrong tenant

    A user from another tenant signs in

    provoke_sign_in wrong_tenant
  • Expired tokens

    Tokens arrive already expired

    provoke_sign_in expired
  • Bad signature

    Tokens or SAML assertions signed wrongly

    provoke_sign_in bad_signature
  • IdP down

    The sign-in fails because the provider is down

    provoke_sign_in idp_down
  • Discovery or JWKS broken

    Discovery 500, wrong issuer, kid missing, token invalid_grant

    provoke_idp
  • Signing key rotated

    Apps that cached the JWKS at start-up reject new tokens

    rotate_signing_key
  • Disabled user

    Sign-ins stop with AADSTS50057; refresh tokens refused

    set_user_state
  • LDAP busy

    Binds answer 51, 52 or time out

    set_provider ldap_provoke
  • Bad bot activity

    bad_signature, expired, wrong_audience, no_token

    send_bot_activity twist

Why not the real sandbox

Your AI agent drives it

Claude Code, Codex or any MCP client connects to /mcp (or calls /api over plain HTTP), sets the stand-in up, breaks it on cue and reads what your app did.

you

Check that the app handles an Entra key rotation without logging everyone out.

sign_in_as{"provider": "entra", "user": "emma.carter", "app": "acme-app"}
→ ok callback http://localhost:3000/signin-oidc?code=… to follow
rotate_signing_key{"provider": "entra"}
list_sign_ins{"provider": "entra", "since": "5m"}
→ ok 2 sign-ins · last token signed with the new key · JWKS fetched again

MCP tools

  • set_providerCreate a provider: flavour, tenant, SAML, LDAP, password grant
  • set_userCreate or change a synthetic user and its claims
  • set_appRegister an app: type, redirect URIs, secret, permissions
  • sign_in_asComplete the login page as a user, through MFA and consent
  • provoke_sign_inMake the next sign-ins fail
  • provoke_idpBreak discovery, JWKS or the token endpoint
  • rotate_signing_keyRotate the token signing key
  • list_sign_insSign-ins and tokens, with AADSTS codes
  • send_bot_activitySend the bot a Teams activity, signed
  • list_bot_messagesBoth sides of the bot conversation

The same over HTTP

  • PUT/api/identity/providers/{name}
  • PUT/api/identity/{provider}/users/{user}
  • POST/api/identity/{provider}/sign-in-as
  • POST/api/identity/{provider}/provoke
  • POST/api/identity/{provider}/keys/rotate
  • GET/api/identity/sign-ins