Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/authorized-agents-origin-only-match.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"adcontextprotocol": minor
---

An origin-only `authorized_agents[].url` in `adagents.json` now authorizes the agent at that origin, whatever its path (adcp#8862). An entry whose canonical form has the root path and no query, such as `https://agent.example.com`, matches any agent URL with the same canonical origin, including `https://agent.example.com/mcp`. An entry with a path still matches only that canonical URL, so path-mounted agents on a shared host stay distinct. This aligns `adagents.json` with the accepted DR-0023 (an agent's identity is its origin, one agent per origin), under which `authorized_agents[].url` already matched a Web Bot Auth signer by canonical origin. Matching only widens: no entry that authorized an agent under 3.2 stops authorizing it. Validators, TMP providers and registries that check `authorized_agents[].url` must apply the origin-only rule. Updated: `docs/reference/url-canonicalization.mdx`, the Agent URL matching section of `docs/governance/property/adagents.mdx`, the TMP sync-time validation, the `authorized-agent-base.json` `url` description, both 3.3 migration guides, and R0 in `specs/agent-identity-3-3.md`.
14 changes: 8 additions & 6 deletions docs/governance/property/adagents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Common internal cases:
These internal mappings can produce public `placements[]` entries, but the mapping details themselves remain out of `adagents.json`.

**`authorized_agents`** *(required)*: Array of authorized sales agents. MAY be empty (`[]`) for a **catalog-only community mirror** — a file that publishes `formats`/`properties`/`placements` (typically with a `catalog_etag`) for a platform that has not adopted AdCP, where there is no sales agent to authorize (see [Community mirror lifecycle](#community-mirror-lifecycle)). An empty array asserts **no sales authorization**: validators MUST NOT read it as deny-all, authorize-all, or a revocation, MUST NOT treat its presence as an error, and MUST still consume the catalog arrays. A file with neither sales authorization nor catalog content is invalid. The per-entry fields below apply only when the array is non-empty:
- **`url`** *(required)*: Agent's protocol endpoint URL, including the path (for example `https://agent.example.com/mcp`). See [Agent URL matching](#agent-url-matching)
- **`url`** *(required)*: The authorized agent's URL. An origin-only URL (`https://agent.example.com`) authorizes the agent at that origin, whatever its path. A URL with a path (`https://platform.example/tenants/acme/mcp`) authorizes that agent URL only. See [Agent URL matching](#agent-url-matching)
- **`authorized_for`** *(required)*: Human-readable authorization description
- **`authorization_type`** *(required)*: Discriminator naming which selector field carries the scope. One of `property_ids`, `property_tags`, `inline_properties`, `publisher_properties` (for properties) or `signal_ids`, `signal_tags` (for signal providers). The corresponding selector field must be present and non-empty — see [Authorization Patterns](#authorization-patterns) below.
- **`delegation_type`** *(optional)*: Commercial relationship for this path: `direct`, `delegated`, or `ad_network`
Expand Down Expand Up @@ -962,12 +962,14 @@ This lets a publisher say "buy host reads directly from us in some markets, but

## Agent URL Matching

`authorized_agents[].url` identifies the agent by its protocol endpoint: the exact agent URL buyers are given and send AdCP requests to, including the path. Buyers check authorization by comparing that URL with the agent URL they connect to, so publishers should copy the URL the agent operator gives them rather than shortening it to a host.
`authorized_agents[].url` names the agent the publisher authorizes. Buyers, TMP providers, and registries check authorization by comparing the agent URL they connect to, or are given, with each entry. Both sides are canonicalized first with the [AdCP URL canonicalization](/docs/reference/url-canonicalization) rules. How an entry matches depends on its path. These rules follow [DR-0023](https://github.com/adcontextprotocol/adcp/blob/main/governance/decisions/DR-0023-agent-identity-is-an-origin.md): an origin hosts one agent, and the origin is that agent's identity.

- **Include the path.** `https://agent.example.com` does not match `https://agent.example.com/mcp`. A bare origin is correct only when the agent serves AdCP at the root.
- **Distinct paths are distinct agents.** Multi-tenant platforms that serve each seller at its own path (for example `https://platform.example/tenants/acme/mcp`) are authorized per path. Authorizing one tenant's URL does not authorize another tenant on the same host.
- **One entry per agent URL.** An agent that serves MCP and A2A at different URLs needs one `authorized_agents[]` entry for each URL, usually with the same scope. A buyer that connects to a URL with no entry fails the check.
- **Comparison is canonical, not byte-for-byte.** Validators canonicalize both sides with the [AdCP URL canonicalization](/docs/reference/url-canonicalization) rules, so letter case in the scheme and host, default ports, dot segments, and percent-encoding of unreserved characters do not matter. The scheme (`http` vs `https`), path case, a trailing slash (`/mcp` vs `/mcp/`), and the query string do matter. Publish `https://` URLs with no trailing slash, query, or fragment unless the agent operator's URL includes them.
- **An origin-only entry authorizes the agent at that origin, whatever its path.** An entry whose canonical form has the root path and no query (`https://agent.example.com` or `https://agent.example.com/`) matches every agent URL with the same canonical origin: `https://agent.example.com/mcp`, `https://agent.example.com/a2a`, and `https://agent.example.com` itself. One origin-only entry covers an agent that serves MCP and A2A at different paths.
- **An entry with a path matches that agent URL only.** An entry such as `https://platform.example/tenants/acme/mcp` matches only an agent URL with the same canonical URL. Multi-tenant platforms that serve each seller at its own path are authorized per path, so authorizing one tenant's URL does not authorize another tenant on the same host. An agent reachable at more than one path-bearing URL needs one entry per URL, usually with the same scope.
- **List a shared host by path, never by bare origin.** A host that serves several tenants' agents at different paths and lists its bare origin authorizes all of them. Under DR-0023 such a host is not one agent identity; list each tenant's full agent URL instead.
- **Comparison is canonical, not byte-for-byte.** Letter case in the scheme and host, default ports, dot segments, and percent-encoding of unreserved characters do not matter. The scheme (`http` vs `https`), host, and port always matter. For an entry with a path, path case, a trailing slash (`/mcp` vs `/mcp/`), and the query string also matter. Publish `https://` URLs with no trailing slash, query, or fragment unless the agent operator's URL includes them.

A Web Bot Auth signer matches an entry by canonical origin whatever the entry's path. See [URL canonicalization](/docs/reference/url-canonicalization#where-it-applies).

## Domain Matching Rules

Expand Down
4 changes: 4 additions & 0 deletions docs/reference/migration/3-2-to-3-3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ On a `"3.2"` pin the fail-closed rule remains opt-in [interim guidance](/docs/bu

**Sellers.** Accept a 3.3-served request without the block and sign its deliveries as for `push_notification_config`. On a request served at 3.3 or later, the downgrade and injection rules in [Webhook callbacks](/docs/building/by-layer/L1/security#webhook-callbacks) now cover both registrations. A request served below 3.3 still requires the block. Sending it remains valid everywhere in 3.x, and the block is removed in 4.0 ([#4288](https://github.com/adcontextprotocol/adcp/issues/4288)).

### Origin-only `authorized_agents[].url` entries authorize the agent at that origin

An `authorized_agents[].url` whose canonical form has the root path and no query, such as `https://agent.example.com`, now matches any agent URL with the same canonical origin, so it authorizes an agent connected at `https://agent.example.com/mcp`. Under 3.2 it matched only an agent served at the root. An entry with a path still matches only that canonical URL. Buyers, TMP providers, and registries that check `authorized_agents[].url` MUST apply the origin-only rule. No entry that authorized an agent under 3.2 stops authorizing it. This aligns `adagents.json` with [DR-0023](https://github.com/adcontextprotocol/adcp/blob/main/governance/decisions/DR-0023-agent-identity-is-an-origin.md), under which an origin hosts one agent. A host that serves several tenants' agents at different paths lists each tenant's full agent URL, not its bare origin, which would authorize all of them. See [Agent URL matching](/docs/governance/property/adagents#agent-url-matching).

### Advertise only the measurement terms you accept

A seller MUST NOT advertise, in a product's `measurement_terms`, a `measurement_window` or other term value that it would reject with `TERMS_REJECTED` when a buyer replays those terms unchanged on `create_media_buy`. An advertised window MUST reference a `window_id` declared in `reporting_capabilities.measurement_windows`. The `measurement_terms_accepted` storyboard grades a rejection of replayed advertised terms as a seller failure. See [Advertise only what you accept](/docs/media-buy/task-reference/get_products#advertise-only-what-you-accept).
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/migration/agent-identity-3-3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Once a trust record lists your origin, JWS artifacts your origin signed under th

### Publisher

`adagents.json` is unchanged. A `signing_keys` pin still narrows keys by RFC 7638 thumbprint, which is also the Web Bot Auth key ID. An `authorized_agents[].url` stays a canonical URL under the RFC 9421 profile, and matches a Web Bot Auth signer by canonical origin.
The `adagents.json` schema is unchanged. A `signing_keys` pin still narrows keys by RFC 7638 thumbprint, which is also the Web Bot Auth key ID. An `authorized_agents[].url` matches a Web Bot Auth signer by canonical origin. For an agent identified by the URL it is connected at, an origin-only entry (`https://agent.example.com`) authorizes the agent at that origin whatever its path, and an entry with a path matches that canonical URL only. See [Agent URL matching](/docs/governance/property/adagents#agent-url-matching).

## SDK support

Expand Down
10 changes: 6 additions & 4 deletions docs/reference/url-canonicalization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ The **canonical origin** of a URL is its scheme and authority after steps 1 to 4

Use the canonical origin only where the table below says a comparison is by origin. Everywhere else, compare the full canonical URL.

A URL is **origin-only** when its canonical form has the root path `/` and no query. `https://agent.example.com` and `https://agent.example.com/` are origin-only; `https://agent.example.com/mcp` and `https://agent.example.com/?tenant=acme` are not.

## Where it applies

| Surface | Comparison | Form | Reference |
|---|---|---|---|
| Request signing | `@target-uri` canonical output signed and verified | Canonical URL | [Signed Requests (Transport Layer)](/docs/building/by-layer/L1/security#signed-requests-transport-layer) |
| Signed-Agent identity | Candidate Agent URL vs operator `brand.json` `agents[].url`; the verified canonical URL is the stable Agent subject | Canonical URL | [Agent key publication](/docs/building/by-layer/L1/security#agent-key-publication) |
| TMP seller authorization | `seller_agent.agent_url` vs `authorized_agents[].url` | Canonical URL | [TMP Sync-Time Validation](/docs/trusted-match/specification#sync-time-validation) |
| TMP seller authorization | `seller_agent.agent_url` vs `authorized_agents[].url`. An origin-only entry matches by canonical origin | Canonical URL; canonical origin for an origin-only entry | [TMP Sync-Time Validation](/docs/trusted-match/specification#sync-time-validation), [Agent URL matching](/docs/governance/property/adagents#agent-url-matching) |
| TMP provider resolution | `ProviderEntry.agent_url` vs router's registered provider endpoint | Canonical URL | [TMP Product Integration](/docs/trusted-match/specification#product-integration) |
| `adagents.json` lookups | Any caller asking "is this agent authorized for this property?" | Canonical URL | [adagents.json schema](https://adcontextprotocol.org/schemas/v3/adagents.json) |
| `adagents.json` lookups | Any caller asking "is this agent authorized for this property?" An origin-only `authorized_agents[].url` matches any agent URL with the same canonical origin; an entry with a path matches that canonical URL only. Supply-path verification semantics version 1 still compares exact canonical URLs; see its [corpus README](https://github.com/adcontextprotocol/adcp/blob/main/static/compliance/source/test-vectors/supply-path/README.md) | Canonical URL; canonical origin for an origin-only entry | [Agent URL matching](/docs/governance/property/adagents#agent-url-matching), [adagents.json schema](https://adcontextprotocol.org/schemas/v3/adagents.json) |
| `format-id` resolution | `format-id.agent_url` against the URL an agent publishes for its formats | Canonical URL | [format-id schema](https://adcontextprotocol.org/schemas/v3/core/format-id.json) |
| `adagents.json` `authoritative_location` indirection | Following the pointer; the target URL MUST canonicalize the same way | Canonical URL | [Managed networks](/docs/governance/property/managed-networks#security-considerations) |
| Provenance verifier allowlist | `verify_agent.agent_url` vs `creative_policy.accepted_verifiers[].agent_url` | Canonical URL | [Provenance Verification](/docs/governance/creative/provenance-verification#the-verifier-contract-seller-publishes-buyer-represents-seller-confirms) |
Expand All @@ -55,7 +57,7 @@ Use the canonical origin only where the table below says a comparison is by orig
| trust.json agents (experimental) | `agents[].url` uniqueness, grant `agents[].url` narrowing, and acknowledgement `agent_url`: one agent per origin | Canonical origin | [trust.json](/docs/reference/trust-json#identity-and-keys) |
| WBA identity (proposed, 3.3) | The origin named by the covered `Signature-Agent` member, compared with a bound identity or a trust.json agent entry | Canonical origin | [`specs/agent-identity-3-3.md` R0](https://github.com/adcontextprotocol/adcp/blob/main/specs/agent-identity-3-3.md#r0-canonical-origin-p1-url-canonicalizationmdx) |
| `format-id.agent_url` and a WBA signer (proposed, 3.3) | A WBA signer matches when the canonical origin of `agent_url` equals the signer's origin. The `format-id` resolution row above stays a canonical URL | Canonical origin | [`specs/agent-identity-3-3.md` R0](https://github.com/adcontextprotocol/adcp/blob/main/specs/agent-identity-3-3.md#r0-canonical-origin-p1-url-canonicalizationmdx) |
| `authorized_agents[].url` and a WBA signer (proposed, 3.3) | A WBA signer matches by canonical origin. The `adagents.json` rows above stay canonical URLs for the 3.2 profile | Canonical origin | [`specs/agent-identity-3-3.md` R0](https://github.com/adcontextprotocol/adcp/blob/main/specs/agent-identity-3-3.md#r0-canonical-origin-p1-url-canonicalizationmdx) |
| `authorized_agents[].url` and a WBA signer (proposed, 3.3) | A WBA signer matches by canonical origin, whatever the entry's path. An agent identified by the URL it is connected at follows the `adagents.json` rows above | Canonical origin | [`specs/agent-identity-3-3.md` R0](https://github.com/adcontextprotocol/adcp/blob/main/specs/agent-identity-3-3.md#r0-canonical-origin-p1-url-canonicalizationmdx) |

Canonicalization is for matching, not safe reflection. A disclosed governance-agent rejection derives `attempted_agent_origin` from the parsed URL and strips userinfo, path, query, and fragment. It never returns the raw candidate URL; an opaque rejection returns no attempted endpoint at all.

Expand All @@ -78,6 +80,6 @@ The [`canonicalization.json`](https://adcontextprotocol.org/compliance/latest/te
- **Collapsing consecutive slashes.** `/admin//foo` and `/admin/foo` are different canonical forms. A producer that collapses and a comparer that doesn't (or vice versa) opens a path-confusion attack.
- **Re-encoding the query.** Query-string normalization looks tempting but is forbidden. `?x=1&y=2` and `?y=2&x=1` are different canonical forms.
- **Trailing `?` with empty query.** `https://host/p?` and `https://host/p` are different. Preserve whichever the producer sent. Publishers registering URLs in `adagents.json` or similar registries should paste them without a trailing `?` unless they intend the empty-query form.
- **Registering an origin for a path-mounted agent.** Canonicalization removes only dot segments, never real path segments. This applies to every canonical-URL comparison in the table above; only the rows marked canonical origin compare by origin. An `authorized_agents[].url` of `https://agent.example.com` does not match a buyer connected to `https://agent.example.com/mcp`. Register the full agent URL, and list each agent URL separately when MCP and A2A are served at different paths. See [Agent URL matching](/docs/governance/property/adagents#agent-url-matching).
- **Registering an origin for a path-mounted agent.** Canonicalization removes only dot segments, never real path segments, so canonical-URL comparisons treat `https://agent.example.com` and `https://agent.example.com/mcp` as different URLs. `authorized_agents[].url` is the exception: following [DR-0023](https://github.com/adcontextprotocol/adcp/blob/main/governance/decisions/DR-0023-agent-identity-is-an-origin.md), an origin hosts one agent, so an origin-only entry of `https://agent.example.com` authorizes the agent at that origin whatever its path, including a buyer connected to `https://agent.example.com/mcp`. An entry with a path matches only that canonical URL, which keeps path-mounted agents on a shared host distinct. A shared host lists each tenant's full agent URL, never its bare origin. See [Agent URL matching](/docs/governance/property/adagents#agent-url-matching).
- **Forgetting the fragment strip.** Fragments never participate in identifier comparison.
- **Mixing `http://` and `https://`.** Scheme is preserved, not coerced. Publishers registering an `authorized_agents[].url` MUST use `https://` for anything meant to be reachable on the public internet — an `http://` entry will fail to match an `https://` caller and vice versa, and non-HTTPS URLs have no transport-integrity guarantee.
Loading
Loading