Developer Search
Press ⌘K or Ctrl+K to jump through guides and public API docs for user-owned master key and scoped credential flows.
Developer Docs
MCP Broker Security Model
Production authentication and authorization model for MCP credential brokerage: workload identity, nonce replay protection, control-plane SPIFFE bootstrap, sender-constrained access, token lifecycle controls, tenant/principal isolation, audit-driven detections, and data ownership boundaries where user-held key material remains outside platform access.
AuthN
Workload Proof
Exchange workload identity proof for short-lived broker tokens with strict proof type and nonce checks, without transferring user master keys.
AuthZ
Scope + Principal Bound
Enforce allowlisted scopes and bind leases to both tenant and principal to prevent cross-workload reuse.
Audit
Detect + Respond
Emit broker lifecycle events and alert on replay attempts, denial spikes, and abnormal redemption patterns.
Required Controls
- Authenticate MCP as workload principal via OIDC federation or mTLS.
- For user-driven broker flow, mint with `MintUserApiToken` using specific credential selectors.
- Call `ExchangeWorkloadToken` with one-time nonce and PoP key identifier.
- Bootstrap SPIFFE identity using `BeginSpiffeBootstrap` + `CompleteSpiffeBootstrap` with CSR.
- Issue short-lived token (default 10m, capped at 15m).
- Verify DPoP signatures using JWKS public keys bound to `pop_key_id` (`kid`).
- For mTLS exchange, require `pop_key_id` to match provisioned SPIFFE cert fingerprint.
- Send `request_proof` on every create/redeem/revoke call (DPoP JWT or mTLS fingerprint mode).
- Reject replayed workload nonces and cross-principal lease access.
- Write immutable audit event for each broker action.
Exchange Claims
{
"sub": "mcp:desktop-broker:host-01",
"tenant_id": "business-default",
"aud": "aegis-api",
"scope": [
"credential.lease.create:provider:gcp:app:billing-prod:account:deploy-bot",
"credential.lease.redeem:provider:gcp:app:billing-prod:account:deploy-bot"
],
"role": "org_admin",
"jti": "2c8e6a96-78dc-4da3-8ab9-6f012b4c2a32"
}Lease Request Proof
Lease endpoints enforce sender-constrained proofs. For DPoP mode, include `request_proof.dpop_jwt` with `ath`, `htm`, `htu`, `jti`, `iat`, and `nonce` claims. For mTLS mode, use bootstrap-provisioned `mtls_fingerprint`.
{
"proof_type": "dpop_jwt",
"dpop_jwt": "<signed_jwt_with_htm_htu_ath_jti_iat_nonce>",
"nonce": "nonce-create-0001"
}Scope Matrix
credential.lease.create: create short-lived credential leasescredential.lease.redeem: redeem lease into ephemeral credential materialcredential.lease.revoke: revoke active lease immediatelybroker.audit.read: read broker audit event stream
Token Lifecycle
- Bootstrap token: SPIFFE scopes only, target TTL <= 5 minutes.
- Broker access token: lease scopes, default TTL 10 minutes, hard cap 15 minutes.
- Lease artifact: single-use or low redemption, short expiry, target-bound.
- Revocation: explicit revoke path for compromised key, host, or principal.
- Storage: keep in memory and avoid durable local bearer token storage.
Scoped Credential Selectors
Scope is capability + resource selector. Authorization evaluates tenant, principal, action, and target resource together.
credential.lease.create:provider:gcp:app:billing-prod:account:deploy-bot
credential.lease.redeem:provider:aws:app:payments:account:ci-role
credential.lease.revoke:provider:gcp:app:analytics:account:breakglass- Grant create/redeem/revoke scopes independently (no implicit action inheritance).
- Allow wildcard selectors only under explicit elevated policy.
- `MintUserApiToken` rejects wildcard selectors; user tokens are credential-specific.
- Deny and audit scope escalation attempts by default.
- Selector-scoped checks are enforced at runtime for lease create/redeem/revoke operations.
Extended Doc
Full architecture and threat model are documented in docs/api/mcp-broker-security-model.md.
API Surface
Use `BeginMcpOauthDeviceAuthorization`, `ApproveMcpOauthDeviceAuthorization`, `ExchangeMcpOauthDeviceAuthorization`, `MintUserApiToken`, `ExchangeWorkloadToken`, `BeginSpiffeBootstrap`, `CompleteSpiffeBootstrap`, `CreateCredentialLease`, `RedeemCredentialLease`, `RevokeCredentialLease`, and `ListBrokerAuditEvents` for the broker lifecycle.
Open API Explorer