Skip to content

Commit cb81020

Browse files
committed
Add scoped authorization receipt extension example
1 parent 2e0a4e5 commit cb81020

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

docs/topics/extensions.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,115 @@ The following is an example of an Agent Card with an extension:
120120
}
121121
```
122122

123+
### Example: Scoped Authorization Receipt Extension
124+
125+
Some enterprise deployments need a client to prove that a runtime policy system
126+
admitted a high-impact action before an agent processes it. For example,
127+
transport authentication can show that a client is allowed to reach an A2A
128+
server, while a scoped authorization receipt can show that a specific
129+
client-requested action was admitted for a particular task, resource, request
130+
digest, policy version, and expiry. The A2A server or downstream provider still
131+
needs to enforce its own business authorization before mutating state.
132+
133+
An extension can advertise those requirements through the Agent Card without
134+
changing the core Agent Card schema. The extension URI identifies the extension
135+
specification, and the `params` object carries extension-defined metadata:
136+
137+
```json
138+
{
139+
"name": "Expense Approval Agent",
140+
"description": "An agent that can prepare and submit expense approvals.",
141+
"version": "1.0.0",
142+
"supportedInterfaces": [
143+
{
144+
"url": "https://example.com/agents/expense-approval",
145+
"protocolBinding": "HTTP+JSON",
146+
"protocolVersion": "1.0"
147+
}
148+
],
149+
"capabilities": {
150+
"extensions": [
151+
{
152+
"uri": "https://example.com/ext/scoped-authorization-receipts/v1",
153+
"description": "Requires scoped authorization receipts for high-impact actions.",
154+
"required": true,
155+
"params": {
156+
"authority_manifest_uri": "https://example.com/.well-known/authority-manifest.json",
157+
"authorization_contract_uri": "https://example.com/contracts/expense-approval/v1",
158+
"receipt_required_for": [
159+
"expense.submit",
160+
"expense.approve"
161+
],
162+
"receipt_transport": {
163+
"type": "http_header",
164+
"name": "Authorization-Receipt"
165+
},
166+
"receipt_binds": [
167+
"agent_card_digest",
168+
"task_id",
169+
"message_id",
170+
"action",
171+
"resource",
172+
"request_digest",
173+
"policy_version",
174+
"expires_at",
175+
"audience"
176+
],
177+
"receipt_verification": {
178+
"format": "JWS",
179+
"canonicalization": "profile-defined",
180+
"algorithms": ["ES256"],
181+
"jwks_uri": "https://example.com/.well-known/authorization-receipts/jwks.json"
182+
},
183+
"receipt_profile_uri": "https://example.com/profiles/payment-compliance-receipt/v1"
184+
}
185+
}
186+
]
187+
},
188+
"defaultInputModes": ["application/json"],
189+
"defaultOutputModes": ["application/json"],
190+
"skills": [
191+
{
192+
"id": "expense_approval",
193+
"name": "Expense approval",
194+
"description": "Prepare and submit expense approvals.",
195+
"tags": ["expenses", "approvals"]
196+
}
197+
]
198+
}
199+
```
200+
201+
In this example, `receipt_profile_uri` points to a separate profile that defines
202+
the receipt's outcome vocabulary and verifier rules. Keeping the profile outside
203+
the Agent Card lets one extension advertise the generic transport and binding
204+
requirements while domain-specific profiles define closed categorical outcomes,
205+
such as a payment-compliance verdict and basis enumeration. Implementations
206+
should avoid relying on open-ended receipt status strings for decisions that
207+
must be independently audited.
208+
209+
The referenced profile should define how a verifier reaches the same answer as
210+
the receipt issuer. At minimum, this includes the closed outcome vocabulary,
211+
canonical request digest construction, which fields are signed and which are
212+
referenced, freshness and replay handling, verifier key discovery, and profile
213+
versioning. Where a verdict basis or policy rationale contains sensitive
214+
details, the profile can use a categorical value or reference instead of placing
215+
the full rationale in signed receipt bytes. The `JWS` format and `ES256`
216+
algorithm above are illustrative; profiles should define their supported
217+
verification formats and algorithms, and may use other trust or attestation
218+
mechanisms.
219+
220+
Receipt-consuming agents should reject receipts that are expired, intended for a
221+
different audience, or bound to a different task, message, action, resource,
222+
request digest, or policy version before executing the requested action. This
223+
helps prevent receipt replay and scope drift when a client retries a request or
224+
changes the requested operation.
225+
226+
This extension only advertises receipt metadata and verification requirements.
227+
It does not prove that the requested action was executed, that an external
228+
system accepted the receipt outcome, that a profile's outcome vocabulary is
229+
normative for all A2A agents, or that private policy basis is exposed in the
230+
Agent Card.
231+
123232
## Required Extensions
124233

125234
While extensions generally offer optional functionality, some agents may have

0 commit comments

Comments
 (0)