docs(checkout-rest): cover ucp-agent in the example signed request - #795
Open
vishkaty wants to merge 1 commit into
Open
Conversation
The Example Signed Request in the checkout REST binding carries a UCP-Agent header, but its Signature-Input covers only "@method" "@authority" "@path" "idempotency-key" "content-digest" "content-type". The identity resolution gate in overview/index.md states that a signature MUST cover ucp-agent, signature-agent and idempotency-key when those headers are present, and that a verifier MUST skip a signature whose covered set omits any of them, since a header the signature does not cover is treated as unsigned. The example therefore shows a request whose signature a conformant verifier is required to skip, in the one place an implementer copies from. Adds "ucp-agent" to the covered set, which makes its covered set identical to the canonical REST request example in signatures.md line 515, the document this section links to for the complete signing algorithm. The two examples still differ elsewhere, for instance in their keyid. No normative text changes. validate_examples.py 343 passed, 0 failed, 50 skipped and test_validate_examples.py 52 passed on a test merge into main 1d39948 on 2026-09-01, both unchanged by this commit, because the example is an unannotated http fence that no CI job inspects. cspell clean on the changed file.
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.
Fixes #794
What this changes
Adds
"ucp-agent"to the covered components of the Example Signed Request in the checkout REST binding,docs/specification/shopping/checkout/rest.mdline 1440.Before:
After:
The example already prints a
UCP-Agentheader. The Identity Resolution Algorithm atoverview/index.mdline 2435 requires a signature to coverucp-agentwhen that header is present and requires a verifier to skip a signature that does not, so the example as shipped models a request a conformant verifier will not authenticate.The resulting covered set is identical to the canonical REST request example at
signatures.mdline 515, which is the document this section links to for the complete signing algorithm. The two examples still differ elsewhere, for instance in theirkeyid.Scope
One line. No normative text changes, no schema changes, no new prose.
The linked issue carries the sweep: of 13 fenced blocks under
docs/specificationcontaining aSignature-Input, 2 are excluded because their component list is elided with...and 3 because they are not requests, leaving 8 judged. Six of those cover every gate header they carry and 2 do not. The other violation isshopping/order/index.mdline 751, already addressed by open PR #659, so that pair closes the class.Test plan
scripts/validate_examples.py --schema-base source/schemas/: 343 passed, 0 failed, 50 skipped.scripts/test_validate_examples.py: 52 passed.cspellon the changed file: 0 issues.All three measured on a test merge into main
1d39948on 2026-09-01, and all three are unchanged by this commit. That is expected rather than reassuring: the example is an unannotated```httpfence, sovalidate_examples.pynever inspects it and no CI job here checks a covered set. The mechanical check that does catch it compares, per fenced block, the headers the block carries against the components its ownSignature-Inputnames, and it flags this block before the change and not after. Reverting the one line makes it flag again.