Skip to content

docs(mcp): document delegated tokens, correct verified claims - #90

Merged
lakhansamani merged 4 commits into
mainfrom
docs/mcp-delegated-tokens
Aug 15, 2026
Merged

docs(mcp): document delegated tokens, correct verified claims#90
lakhansamani merged 4 commits into
mainfrom
docs/mcp-delegated-tokens

Conversation

@lakhansamani

Copy link
Copy Markdown
Contributor

New: agent delegation section

/mcp accepts RFC 8693 delegated tokens as of authorizerdev/authorizer#773. Documents the exchange, and the three things that actually bite:

  • resource=<url>/mcp, not <url>. A 401 from /mcp is far more often this than a permissions problem.
  • The answers are the agent's, not the user'sperms(agent) ∩ perms(user). An explicit user cannot shed the agent half; naming another subject is refused.
  • 5-minute TTL, no refresh token. An MCP client cannot refresh its way out; the agent has to redo the exchange.

Verified against a real Claude Code client (2.1.233) — ✔ Connected, and check_permissions came back allowed: false for a document the delegating user can read but the agent was never granted. The same token bound to the bare <url> fails with invalid_token. Added as a verified row in the client table.

Corrections from auditing the page against main

Claim Reality
Protected-resource metadata has 4 fields Also carries jwks_uri and resource_documentation
--url is required "with --mcp-enabled" Required to start the server at all; MCP additionally requires a usable http(s) origin
CIMD client_id is "an HTTPS URL" Must have a path — a bare origin falls through to a registry lookup
FGA auto-reuse: SQLite/Postgres/MySQL Also MariaDB; CockroachDB, YugabyteDB, libSQL, PlanetScale and SQL Server need explicit --fga-store
"fga is not enabled" "fine-grained authorization is not enabled"

Everything else on the page checked out — flags and defaults, the exact tool set, WWW-Authenticate byte-for-byte, scopes_supported, the audience binding in both directions, CSRF exemption, and all five DCR/CIMD mitigation-table rows.

Three blocks could not boot as written:

- sso-guide: no --jwt-*, --client-id/secret or --admin-secret. Fails on
  `missing jwt type` after --encryption-key passes.
- rate-limiting compose: no --jwt-* or --admin-secret.
- mcp: no --jwt-*. `authorizer mcp` validates the bearer itself, so it
  needs the same JWT settings as the server that minted it — without them
  every tool call returns Unauthenticated.

Verified the corrected sso-guide flag set boots against a build of main.

Also documents persisting SQLite across restarts with a named volume; the
Docker quick start writes the database inside the container, so every
restart began from an empty one.
The server exits at boot without --url (authorizerdev/authorizer#764).
These commands could not start as written.
Adds the RFC 8693 section: /mcp accepts delegated tokens, the resource
must be <url>/mcp rather than the bare URL, answers are the agent's
authority and not the user's, and the 5-minute TTL has no refresh.

Corrections from checking the page against main:

- protected-resource metadata also carries jwks_uri and
  resource_documentation
- --url is required to start the server at all, not only with
  --mcp-enabled; MCP additionally requires a usable http(s) origin
- a CIMD client_id must be an https URL WITH a path; a bare origin
  falls through to a registry lookup
- FGA auto-reuse covers MariaDB; CockroachDB, YugabyteDB, libSQL,
  PlanetScale and SQL Server need an explicit --fga-store
- the FailedPrecondition message is "fine-grained authorization is not
  enabled"
Verified on Claude Code 2.1.233: connects, calls check_permissions,
and gets the agent's intersected answer. A token bound to the bare
<url> instead of <url>/mcp fails with invalid_token.
@netlify

netlify Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploy Preview for authorizerdev-docs ready!

Name Link
🔨 Latest commit d462344
🔍 Latest deploy log https://app.netlify.com/projects/authorizerdev-docs/deploys/6a801e7402c72a0009608d3b
😎 Deploy Preview https://deploy-preview-90--authorizerdev-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@lakhansamani
lakhansamani merged commit a2396b0 into main Aug 15, 2026
4 checks passed
@lakhansamani
lakhansamani deleted the docs/mcp-delegated-tokens branch August 15, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant