Draft
Conversation
Context / Closes #135. Defines a layered signature architecture: SHARED FOUNDATION ├── Canonicalization: JCS (RFC 8785) ├── Algorithms: ES256 (required), ES384, ES512 ├── Key Format: JWK (RFC 7517) ├── Key Discovery: signing_keys[] in /.well-known/ucp └── Replay Protection: idempotency-key (business layer) │ ├── REST BINDING (RFC 9421) │ Headers: Signature, Signature-Input, UCP-Content-Digest-JCS │ └── MCP BINDING (RFC 7515 Appendix F) Fields: meta.signature, meta.idempotency-key, meta.ucp-agent JCS canonicalization (RFC 8785): - Deterministic JSON serialization before signing - Avoids whitespace/key-ordering verification failures - Custom header `UCP-Content-Digest-JCS` (not RFC 9530 Content-Digest) because we hash canonicalized JSON, not raw bytes Transport-specific formats: - REST uses RFC 9421 HTTP Message Signatures (modern standard) - MCP uses detached JWS (RFC 7515 Appendix F) in meta.signature - Both sign the full message; MCP excludes only meta.signature field Changes to OpenAPI: - `Request-Signature` header → `Signature` + `Signature-Input` headers - `X-Detached-JWT` response header → `Signature` + `Signature-Input` - `UCP-Content-Digest-JCS` header for body digest Other updates: - checkout-rest.md, checkout-mcp.md: Added Message Signing sections - order.md: Rewrote webhook signing to use RFC 9421 - ap2-mandates.md: Now references signatures.md for crypto primitives - openrpc.json: Added signature field to meta, added meta to cart methods - mkdocs.yml: Added signatures.md to nav and llmstxt sections
drewolson-google
approved these changes
Feb 5, 2026
Collaborator
drewolson-google
left a comment
There was a problem hiding this comment.
Generally looks very good to me. I've included a few small comments.
- Separate "Implementation requirements" (MUST verify ES256) from
"Usage guidance" (SHOULD use ES256 for compatibility)
- Removed "Signers: use newest key" - no way to determine key age
from JWK spec, and verifiers accept any key in signing_keys[]
| For signature computation over JSON payloads, implementations **MUST** use | ||
| **JSON Canonicalization Scheme (JCS)** as defined in | ||
| [RFC 8785](https://datatracker.ietf.org/doc/html/rfc8785). | ||
| All JSON payloads **MUST** be canonicalized using **JSON Canonicalization |
There was a problem hiding this comment.
AIUI canonicalized JSON is generally considered much more problematic than signing the body bytes of the serialized JSON. I would highly recommend we avoid doing so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context / Closes #135. Defines a layered signature architecture:
JCS canonicalization (RFC 8785):
UCP-Content-Digest-JCS(not RFC 9530 Content-Digest)because we hash canonicalized JSON, not raw bytes
Transport-specific formats:
Changes to OpenAPI:
Request-Signatureheader →Signature+Signature-InputheadersX-Detached-JWTresponse header →Signature+Signature-InputUCP-Content-Digest-JCSheader for body digestOther updates:
Checklist