Skip to main content
Version: 1.16.0-dev

Set up MCP sign-in from an identity provider preset, and ask users for consent

From 1.14.0 you set up the identity providers whose access tokens MCP clients may use in Flightdeck, on the MCP Sign-in page. Pick Okta, Microsoft Entra ID, Auth0 or Keycloak, type your domain or tenant, and Flightdeck fills the rest. Flightdeck checks the settings against the provider before it saves them, and every gateway gets them within seconds. No gateway restart is needed.

You can also turn on consent for a provider. Then each user must allow each MCP client before it may use a server or tool for them. The user allows it once, on a Flightdeck page, after signing in with the same provider.

Enterprise only

Not included in DVARA Open Source.

Before you start​

Token sign-in stays a gateway setting. A gateway accepts tokens from the providers set in Flightdeck only when both of these are set on it:

dvara:
mcp-gateway:
oauth:
enabled: true
resource: https://gateway.example.com/mcp

resource is the gateway's MCP address. Every token's aud claim must name it (or an extra audience you set on the provider). The gateway no longer needs an issuer of its own in authorization-servers: the issuers can all come from Flightdeck. See Authenticate MCP clients with OAuth 2.1 for the other gateway settings.

You also need an app, or API, registered with your identity provider for the gateway. For consent, you need a second registration: a public client (no secret) with the redirect address https://<flightdeck-address>/mcp-consent/callback.

Add a provider from a preset​

  1. Open MCP → Sign-in in Flightdeck.
  2. Click Add Okta, Add Microsoft Entra ID, Add Auth0, Add Keycloak or Add Other provider.
  3. Type the values the preset asks for (see the table below) and click Fill from preset.
  4. Give the provider an ID (1 to 63 lower-case letters, digits and -, such as okta-corp) and a Name. The ID appears in consent links.
  5. Check the filled fields. You can change every one of them.
  6. Click Check against the provider to try the settings without saving, or Check and save.

A preset only fills fields. It changes nothing at run time.

PresetWhat you typeIssuer it fillsScopes are read fromUser claim
OktaOkta domain, such as example.okta.com; optional authorization server ID (default when empty)https://<domain>/oauth2/<server>scpuid
Microsoft Entra IDDirectory (tenant) ID and API application (client) ID, both GUIDshttps://login.microsoftonline.com/<tenant>/v2.0scp and roles; MCP.Read maps to mcp:read, MCP.Call to mcp:calloid
Auth0Auth0 domain, the API identifier, and an optional claim namespacehttps://<domain>/ (with the slash)scope and permissionssub
KeycloakKeycloak address, such as https://sso.example.com (add /auth for Keycloak 16 and older), and the realm<address>/realms/<realm>scope and realm_access.roles; roles mcp-read and mcp-call map to mcp:read and mcp:callsub
Other providerNothing; you type every fieldscope and scpsub

Notes for each provider:

  • Okta. Use a custom authorization server. The preset fills the key set at /v1/keys and the metadata at /.well-known/oauth-authorization-server under the issuer.
  • Microsoft Entra ID. Use the tenant's own ID. common, organizations and consumers are refused, because a token's issuer always names one tenant. A v2 access token carries the API application's client ID as its audience, so the preset adds that ID as an extra audience. Expose two permissions, MCP.Read and MCP.Call, on the API app. The user is named by oid, because sub is different for every application.
  • Auth0. Create an API whose identifier is best set to the gateway's MCP address; tokens carry it as their audience. If an Action adds custom claims under a namespace, such as https://example.com/, type it: the workspace claim becomes https://example.com/dvara_workspace.
  • Keycloak. Give users the realm roles mcp-read and mcp-call.

The provider's fields​

FieldWhat it does
OnOff keeps the settings, but gateways accept no token from this provider.
IssuerCompared with a token's iss claim, character for character. HTTPS only (HTTP only for localhost).
Metadata addressThe provider's OpenID or OAuth metadata. Used to check the settings, and for consent.
Key set addressWhere the signing keys are. Empty reads it from the metadata.
Workspace claimThe claim naming the workspace. dvara_workspace when empty. A name with dots is a path into nested claims, unless a claim has that exact name.
WorkspaceOptional. Binds every token from this provider to one workspace instead.
User claimThe access-token claim that names the user for consent: sub, oid on Entra ID, uid on Okta.
Extra audiencesOne a line, at most 10. Accepted besides the gateway's MCP address.
Scope claimsOne a line, at most 10. The claims that hold scopes or roles. Empty means scope and scp.
Scope mappingsOne a line, at most 50: value = scope, such as MCP.Read = mcp:read. Map only to mcp:read or mcp:call. A value with no mapping counts as it is, so mcp:read works on any provider.
ConsentAsk each user before a client uses a server or tool for them. See Ask users for consent.
Consent client IDThe public client Flightdeck signs users in with on the consent page.
ID token user claimThe ID-token claim that names the same user as the user claim: sub, or oid on Entra ID.

Two providers cannot share an ID or an issuer.

What the check does​

On every save, Flightdeck reads the provider's metadata and keys and compares them with the fields:

  • the metadata can be read, and its issuer is the one you typed;
  • the key set address is the one the metadata publishes, and holds at least one RSA, EC or OKP signing key;
  • with consent on, the metadata names an authorization endpoint and a token endpoint.

When a check fails, the page marks the field that is wrong (issuer, key set address, metadata address or consent) and saves nothing. A provider that does not say it supports PKCE with S256 gets a warning, not a refusal: MCP clients need PKCE, and most providers support it anyway (Entra ID does without listing it).

Flightdeck reaches the provider under the platform pages' egress rule, so a loopback, link-local or cloud metadata address is refused before anything is sent. Check on a saved provider runs the same check again, and changes and records nothing.

When the gateways use it​

Each save is a new version. Gateways take it with their next configuration fetch, within seconds. The protected-resource metadata at /.well-known/oauth-protected-resource/mcp then lists the provider's issuer in authorization_servers, beside any the gateway's own settings name. While no issuer is set anywhere, that address returns 404.

An issuer named in the gateway's own authorization-servers keeps working as before. If a provider in Flightdeck has the same issuer, the gateway's own settings win for it. Remove stops the gateways accepting the provider's tokens at their next fetch.

With consent on for a provider, a client's call with that provider's token needs the user's grant for that client, in that workspace:

  • a tool call needs the tool, or every tool on the server;
  • any other use of a server, such as listing its tools, needs the server.

API keys, tokens from issuers the gateway's own settings name, and tokens from providers with consent off are never asked.

On MCP → Sign-in, under Consent page, type the address users reach Flightdeck on, such as https://flightdeck.example.com, and click Save address. Only /mcp-consent needs to be reachable for MCP users; they do not need a Flightdeck account. You must set the address before you turn consent on for a provider.

Then register https://flightdeck.example.com/mcp-consent/callback as a redirect address of the provider's consent client, and register that client as a public client. Flightdeck signs users in with it by the authorization code flow with PKCE, and no secret.

If you serve every console from one address, the console router keeps /mcp-consent for Flightdeck. No product console may use that path.

What a client and its user see​

  1. The client calls a server or tool the user has not allowed. The gateway refuses the call with a link to the consent page.
  2. The user opens the link and signs in with the same provider. Flightdeck checks the ID token itself (signature, issuer, audience, expiry and nonce). The link only says what is asked, never who the user is: a grant is always for the user who signed in.
  3. The page shows the client, the workspace, the server and its tools. When the call named a tool, the user chooses Only that tool or Every tool on the server.
  4. The user clicks Allow or Deny. Allowing stores the grant; gateways take it within seconds and the client's next call goes through, for what was allowed only. Denying stores nothing, and the next call asks again.

Until a gateway has the grant, the same refusal repeats. A client should try again after the user has allowed it.

On native /mcp the refusal is MCP's URL elicitation error, code -32042. The consent page is one url-mode elicitation in data.elicitations, so a client that supports URL elicitation opens it for the user:

{
"jsonrpc": "2.0",
"id": 7,
"error": {
"code": -32042,
"message": "Allow this client to use the tool search on notes for you first: open the consent page.",
"data": {
"dvara_code": "MCP_CONSENT_REQUIRED",
"consent_url": "https://flightdeck.example.com/mcp-consent?provider=okta-corp&client_id=claude-desktop&workspace=ws-payments&server=notes&tool=search",
"elicitations": [
{
"mode": "url",
"elicitationId": "6f1c…",
"url": "https://flightdeck.example.com/mcp-consent?provider=okta-corp&client_id=claude-desktop&workspace=ws-payments&server=notes&tool=search",
"message": "Allow this client to use the tool search on notes for you first: open the consent page."
}
]
}
}
}

On the REST surface the refusal is HTTP 403:

{
"error": {
"message": "Allow this client to use the tool search on notes for you first: open the consent page.",
"type": "mcp_consent",
"code": "mcp_consent_required",
"consent_url": "https://flightdeck.example.com/mcp-consent?provider=okta-corp&client_id=claude-desktop&workspace=ws-payments&server=notes&tool=search",
"elicitation_id": "6f1c…"
}
}
CodeWhen
MCP_CONSENT_REQUIREDThe user has not allowed this client this server or tool. The answer carries the consent link.
MCP_CONSENT_UNAVAILABLEConsent cannot be asked: the token has no user claim, names no client, or no consent page address is set. There is no link.

The client is read from the token's client_id, or else azp, cid or appid.

See and revoke grants​

  • Users see what they allowed on the consent page, under What you allowed, and revoke it there. To open it without a pending request, go to https://flightdeck.example.com/mcp-consent/manage?provider=<provider-id>.
  • Admins use the MCP Consents page in Flightdeck. It lists each grant's workspace, provider, user, client, what was allowed, and when.
RoleMCP Sign-inMCP Consents
ownerRead and changeEvery workspace: read and revoke
policy-adminReadEvery workspace: read and revoke
billing-adminNo accessNo access
admin, developer (workspace)No accessOwn workspace: read and revoke
viewer (workspace)No accessOwn workspace: read only

A revoked grant is gone from the gateways at their next fetch, and the client's next call asks the user again. Deleting a workspace deletes its grants.

What the audit trail records​

EventWhenMain fields
MCP_SIGN_IN_PROVIDER_CREATED, MCP_SIGN_IN_PROVIDER_UPDATED, MCP_SIGN_IN_PROVIDER_DELETEDThe owner adds, changes or removes a providerWhat the provider trusts and how (issuer, addresses, audiences, claims, scope mappings, consent), and the new version. A provider holds no secret.
MCP_SIGN_IN_CONSENT_PAGE_UPDATEDThe owner sets or clears the consent page addressconsent_page_url, version
MCP_CONSENT_GRANTEDA user allows a clientprovider_id, auth_issuer, user_id, client_id, server_id, grant_id, all_tools, tool when only one tool, servers (everything the grant now covers)
MCP_CONSENT_DENIEDA user denies a clientprovider_id, auth_issuer, user_id, client_id, server_id, tool when one was asked
MCP_CONSENT_REVOKEDA user or an admin revokes a grantgrant_id, auth_issuer, user_id, client_id, servers, revoked_by (user or admin)
MCP_AUTH_REFUSEDA gateway refuses a call for consentreason (MCP_CONSENT_REQUIRED or MCP_CONSENT_UNAVAILABLE), auth_issuer, provider_id, user_id, client_id, server_id, operation, tool, trace_id

Consent decisions are written in the grant's workspace. As for other MCP refusals, one caller retrying the same refusal writes one MCP_AUTH_REFUSED event a minute.