Skip to content

docs(auth): scope=commerce selects the commerce consent; the authorization response carries RFC 9207 iss - #404

Merged
r-marques merged 3 commits into
mainfrom
docs/3527-oauth-scope-consent-and-iss
Sep 21, 2026
Merged

r-marques merged 3 commits into
mainfrom
docs/3527-oauth-scope-consent-and-iss

Conversation

@r-marques

@r-marques r-marques commented Sep 15, 2026

Copy link
Copy Markdown
Member

Companion to nevermined-io/nvm-monorepo#3532 (implements nevermined-io/nvm-monorepo#3527, part of epic nevermined-io/nvm-monorepo#3458 — ADR 0077). Documents two AS-side behaviours that PR ships; merge after it deploys so the docs never lead the API.

What changed

  • integrate/authentication/overview.mdx — the RFC 8414 example gains authorization_response_iss_parameter_supported: true, and a new section The authorization response names its issuer (RFC 9207): iss on the ?code= success and the ?error= denial alike, equal to the tier's issuer, compare by plain string equality and reject a mismatch; the device flow has no authorization response.
  • integrate/authentication/oauth-authorization-code.mdx — a prerequisite on which consent you are asking for: agent_id → agent-specific; otherwise account-level, consent_type=commerce for a hand-configured provider (LangSmith Fleet keeps its ?consent_type=commerce), scope=commerce for a discovery-driven client that never saw consent_type; an explicit consent_type wins; consent_type=account_access&scope=commerce or scope=commerce + agent_id is refused, never guessed; scope is not advertised (no scopes_supported, unchanged) and never reaches the API. iss on the hand-off, and the flag in the discovery note.
  • integrate/authentication/for-agents.mdx — the two extra facts the document tells an agent (iss; scope=commerce as the one scope the consent screen honours).
  • integrations/mcp.mdx — a note on consent selection through scope (MCP clients forward the scope from the server's WWW-Authenticate challenge) and on iss, including why ChatGPT cares (stable CIMD client identity).
  • api-reference/oauth-openapi.json (hand-maintained, per the docs CLAUDE.md exception) — the flag in the description and the example, edited as text.

Deliberately not touched: products/catalog/mcp.mdx's "OAuth-connector variant … tracked elsewhere" — that is the Commerce MCP's own challenge/PRM (nvm-monorepo#3459) and the verification matrix (#3460), documented when those land. api-reference/** SDK-sourced trees untouched.

Verification

mintlify broken-linkssuccess no broken links found (run from a worktree off origin/main; no bare <placeholder> in the diff, so the check did run).

🤖 Generated with Claude Code


2026-09-21 — out of draft. Production is enabled and in effect (argocd#646 merged + synced; connect/details["commerce"] on both prod tiers), so the gate these drafts waited on is met. Stacked PR: base = main; #409#411#414 follow. Rebased onto the current pages (main restructured for-agents.mdx / overview.mdx and grew mcp.mdx meanwhile); mintlify broken-links green. Merge in order — GitHub retargets each base to main as the previous one lands.

@aaitor

aaitor commented Sep 15, 2026

Copy link
Copy Markdown
Member

No description provided.

@aaitor aaitor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the current head. One documentation consistency issue is inline.

Comment thread integrate/authentication/oauth-authorization-code.mdx Outdated
…ization response carries RFC 9207 `iss`

Companion to nevermined-io/nvm-monorepo#3532 (nvm-monorepo#3527, epic #3458).

- overview: the RFC 8414 example gains `authorization_response_iss_parameter_supported: true`
  and a section on validating `iss` (equal to the tier's `issuer`; success and denial; the
  device flow has no authorization response).
- oauth-authorization-code: a prerequisite on which consent is being asked for — `agent_id`
  vs account-level, `consent_type=commerce` for a hand-configured provider, `scope=commerce`
  for a discovery-driven client, explicit wins, a contradiction is refused; `iss` on the
  hand-off; the flag in the discovery note.
- for-agents: the two extra facts the document tells an agent (`iss`, and `scope=commerce`
  as the one scope the consent screen honours despite no `scopes_supported`).
- integrations/mcp: a note on consent selection through `scope` and on `iss`.
- api-reference/oauth-openapi.json (hand-maintained): the flag in the description + example,
  edited as text.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@aaitor

aaitor commented Sep 21, 2026

Copy link
Copy Markdown
Member

No description provided.

…nly when scope does not contradict it

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@aaitor aaitor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review at 26240577. My 09-15 should-fix (oauth-authorization-code.mdx:24, "always wins") is folded — the new wording ("kept as long as scope does not contradict it; a contradiction … is refused") matches selectConsentType exactly, so that thread can be resolved.

I re-checked the behavioural claims against nvm-monorepo main: selectConsentType (oauth-scope.ts: contradiction and agent_id both throw, extra scope tokens ignored), iss on the success redirect, on denial (access_denied) and on the authorize error card (buildOAuthCallbackUrl / buildOAuthErrorUrl), issuer = origin of the tier's backendUrl, authorization_response_iss_parameter_supported in the RFC 8414 document, no iss on the device flow, and the #prerequisites anchor. Both OpenAPI JSON files parse. Nothing blocks; one nit inline.

Comment thread integrations/mcp.mdx Outdated

@aaitor aaitor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Approved with comments — no blockers; 0 should-fix, 1 nit(s) left inline.

Inline review: #404 (review)

…-authorization-code.mdx (docs#404 nit)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@r-marques
r-marques merged commit f16b4f2 into main Sep 21, 2026
@r-marques
r-marques deleted the docs/3527-oauth-scope-consent-and-iss branch September 21, 2026 12:36
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.

2 participants