Skip to content

docs(order): webhook example must sign ucp-agent (identity otherwise unbound)#568

Open
vishkaty wants to merge 3 commits into
Universal-Commerce-Protocol:mainfrom
vishkaty:fix/webhook-example-sign-ucp-agent
Open

docs(order): webhook example must sign ucp-agent (identity otherwise unbound)#568
vishkaty wants to merge 3 commits into
Universal-Commerce-Protocol:mainfrom
vishkaty:fix/webhook-example-sign-ucp-agent

Conversation

@vishkaty

@vishkaty vishkaty commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

The "Example Webhook Request" in docs/specification/order.md carries a UCP-Agent header but its Signature-Input signs only ("@method" "@authority" "@path" "content-digest" "content-type") — omitting ucp-agent.

This contradicts the normative signed-component rules in signatures.md:

  • The request signed-components table marks ucp-agent "Required if UCP-Agent header is present" (the ** footnote), and there is no separate webhook component table.
  • signatures.md explicitly derives webhook identity from the UCP-Agent header ("Business → Platform webhooks: Profile URL from UCP-Agent header") and requires webhooks to be signed.

Because the example doesn't sign ucp-agent, the sender's identity (the component's documented purpose — "binds identity") is not cryptographically bound in the illustrated signature, and a platform copying the example produces a signature that a table-following verifier would reject.

One-line fix: add ucp-agent to the example's signed components, matching the request example in signatures.md.

Found while building an unofficial UCP conformance test suite (https://spck.dev); verified against main @ 7e5fc42.


Update (class sweep): re-checked every RFC 9421 example in docs/ for this same pattern (UCP-Agent header present but not among the signed components). One more instance: checkout-rest.md's "Example Signed Request" — fixed in the second commit with the same one-line change, matching the component order of the canonical request example in signatures.md. All other examples either already sign ucp-agent, omit the header entirely, or are response/elided examples where the component doesn't apply.

The example webhook request carries a UCP-Agent header but its
Signature-Input omits the ucp-agent component. signatures.md's request
signed-component table requires ucp-agent whenever the UCP-Agent header
is present, and webhook identity is derived from that header — so the
example as written leaves the sender identity cryptographically unbound
and contradicts the table it illustrates.
@vishkaty
vishkaty requested review from a team as code owners July 7, 2026 05:08
@damaz91 damaz91 added the documentation Improvements or additions to documentation label Jul 14, 2026
@damaz91 damaz91 added status:needs-triage Signal that the PR is ready for human triage and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 14, 2026
vishkaty added a commit to vishkaty/ucp that referenced this pull request Jul 16, 2026
…alues

Extends the sweep per review: the response-signing examples used a second
DER shape (MFQCIH..., a 0x30-led SEQUENCE) that the first pass's pattern
missed — now swept by decoding every example signature value's leading byte
rather than pattern-matching. Fixes checkout-mcp.md, checkout-rest.md, and
signatures.md's response-signing example, and aligns the stale
keyid="merchant-2025" with the merchant-2026 used by every sibling example.
order.md's instance remains deferred to avoid overlapping Universal-Commerce-Protocol#568.
Same class as the order.md webhook example fix: the example carries the
UCP-Agent header but omits ucp-agent from the covered components, leaving
the signer identity unbound. checkout-rest.md itself requires the header
on all requests, so per the signatures.md component table it must be
signed. Matches the component order of the canonical request example in
signatures.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants