Question: execution-time revalidation of mandate-bound checkout/payment actions #277
Replies: 4 comments
-
|
This is the gate AlgoVoi runs in production, at admission time, just before a mandate-bound action is accepted. Mapping your checklist to a live implementation may help. The pattern: the action is admitted through a compliance gate that re-checks the live evidence and emits a signed compliance receipt recording the decision. The receipt is Point by point against your list, all live:
So the answer to "where should an implementation verify": at an admission-time gate that revalidates against current evidence and emits a signed, independently verifiable receipt of the decision. Probeable against the agent card at AlgoVoi (chopmob-cloud) -- docs.algovoi.co.uk/protocols/ap2 |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @chopmob-cloud — this is a useful concrete implementation example, and it is directionally aligned with verifying as close as possible to execution. I want to preserve one distinction for the record: AlgoVoi’s implementation and proposed extensions versus what AP2 v0.2 currently specifies. My reading of the current AP2 text is that the closest AP2-native boundary is the Verifier’s Action Authorization step together with the role-specific verification requirements:
The acceptance or rejection can then be represented by a signed AP2 Mandate Receipt. That is directionally consistent with an admission-time gate. However, I do not see AP2 v0.2 defining one generic “Compliance Gate” object, a Compliance Receipt, or ALLOW / REFER / DENY outcome semantics. The current AP2-native receipt surface appears to use success / error with a mandate reference and error fields. The compliance-receipt and HTTP-signature bindings referenced here also appear to remain open AlgoVoi-authored extension proposals rather than merged AP2 text. A few details would help clarify how the implementation resolves the specific execution-time drift / TOCTOU boundary:
What exact object is bound into the decision: the received or final SD-JWT, the merchant-signed Those are distinct binding targets. In particular, JCS-canonical bytes are not necessarily the exact original wire bytes. Could you also point to the exact receipt schema containing
An RFC 9421 signature covering an RFC 9530 It does not by itself establish that the request semantically satisfies the Checkout or Payment Mandate. What deterministic comparison is performed between the live action and the mandate evidence? Are the compared inputs, applicable policy or rule version, and decision all bound into the signed evidence?
Is the gate decision transactionally coupled to the actual checkout or payment commit, and is verification mandatory on every execution and provider path? Otherwise, a post-gate mutation or an alternate path that does not invoke the gate would leave the original execution-time drift problem open. A signed receipt provides evidence of a decision, but does not by itself ensure that only the checked action is committed.
What creates consume-once semantics across concurrent requests and different provider paths? For example, how are audience binding, expiry, nonce uniqueness, idempotency namespace, atomic reservation/commit, retention, retries, and concurrent attempts handled? A nonce and idempotency key are useful, but their security depends on the verifier and executor enforcing the associated state transition atomically.
Which status or revocation source is evaluated, what freshness rule applies, and is stale or unavailable status evidence handled fail-open or fail-closed? Are REFER or hold outcomes purely an AlgoVoi extension, and if so, how are they mapped to AP2’s native receipt and error model? So I would treat this as a useful implementation datapoint showing that admission-time revalidation can be implemented, but not yet as the AP2 protocol-boundary answer I was seeking. The remaining question for AP2 maintainers is which final checks AP2 normatively assigns to each verifier, which checks are intentionally delegated to the commerce protocol, payment rail, credential profile, or implementation, and what AP2-native evidence and error pattern is recommended for stale, revoked, replayed, or execution-drifted mandates. Maintainer guidance on that division would still be very welcome. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the feedback. This is the most careful reading the proposal has had, and the distinctions you are drawing are the useful kind. As the ecosystem evolves so will the requirements and the variables. Execution-time revalidation is not a settled problem anywhere in this space, and what counts as sufficient evidence at admission time will keep moving as rails, credential profiles and verifier roles change. Separating what is specified today from what is implementation is how that stays tractable, which is why your framing is worth adopting rather than arguing with. Taking the correction first, because you are right and it matters more than the rest of the reply. On On the distinction you are preserving. It is the right one and I should have drawn it myself. What is proposed to AP2 in #269 is the Compliance Receipt format and its ALLOW / REFER / DENY enumeration. Both are AlgoVoi-authored, both are open, and neither is AP2 v0.2 normative text. Nothing in my earlier comment should be read as claiming otherwise. The gate that produces the verdict is a separate thing and is not part of that proposal. It is a commercial implementation. That separation is worth stating plainly, because it also answers part of what you ask later: a published format and a deployed enforcement engine are different objects, and only the first is something I can point you at. Binding target. The receipt binds one thing: Your parenthetical is the load-bearing part and it is correct: JCS-canonical bytes are not necessarily the original wire bytes. Those are distinct anchors. A signed token has to be anchored over the signed bytes as issued; canonicalisation is the rule for unsigned objects, which is what mandate content is here. A verifier that re-canonicalises a decoded signed payload and hashes that is binding something the issuer never signed. It is an under-specified boundary across this whole ecosystem, and the receipt schema does not resolve it for you. Semantic comparison. Your reading is correct and I will not argue it. An RFC 9421 signature over an RFC 9530 Content-Digest establishes integrity and authenticity of the covered content. It does not establish that the request semantically satisfies the Checkout or Payment Mandate. The receipt records a verdict and the policy version it was reached under; it does not encode the comparison that produced the verdict. On commit coupling, consume-once state, and revocation freshness, I think the questions are pointed at the wrong object. Every one of those is a relation between positions: the admission decision, the action actually executed, and the outcome. A receipt is a single point. You cannot express a relation at a point regardless of how many members you add to it, which is why adding Where it is expressible is composition: a content-addressed chain in which the gate verdict, the execution record and the final verdict are separate positions bound to each other by hash. That is published, and it recomputes from the public corpus without importing any AlgoVoi package. The canonicalisation comes from third-party JCS implementations, deliberately, so the corpus is not its own oracle: Python and Node agree byte for byte. Every reference is recomputed from its raw fields rather than read back from the trace, and the compliance gate set additionally carries tamper cases that must diverge, including one where a REFER verdict is substituted for the ALLOW the decision was admitted under. What I am not going to do is describe the transaction boundaries, reservation semantics or fail-open behaviour of the commercial implementation that enforces this. Those are product internals, and a partial answer would invite exactly the scrutiny this reply just failed. But I would separate two claims that are easy to run together: whether the evidence structure can express the property, and whether a given deployment enforces it. The first is answerable from published artifacts. The second is not answerable from any receipt or chain, by anyone, including AP2. Which is why your closing question is the right one and is for the maintainers. A signed receipt is evidence that a decision was made. It is not a guarantee that only the checked action was committed, and no receipt format will make it one. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you. The correction and the explicit separation of the open format proposal from the commercial enforcement implementation resolve the principal ambiguity in the earlier comment. I agree with the narrower conclusion: the published artifacts can demonstrate deterministic, tamper-evident linkage among declared records, while the enforcement properties of a particular deployment remain a separate assurance question. I would frame two points slightly differently. First, a receipt is not unable to express a relation merely because it is one record. A signed record can commit to multiple referenced objects and attest a relationship among them; a content-addressed chain can instead keep lifecycle positions separate. Both are legitimate evidence models. Their common limit is evidentiary rather than structural: cryptographic linkage shows what was attested and how records are connected. By itself, it does not establish that the live semantic comparison was correct, that a recorded execution corresponds to the external effect that actually occurred, or that decision, replay-state consumption, and commit were atomically and exclusively coupled. Second, “not provable from a receipt or chain alone” is not the same as “not addressable by AP2.” AP2 can still assign the verification duty, define the exact comparison inputs and binding target, require freshness, replay, and failure behavior, and specify the receipt and error evidence expected from a conforming implementation. A specification cannot make an arbitrary deployment non-bypassable by text alone; that remains a separate conformance and assurance question. One scope note on the cited reproduction commands: I read them as useful but complementary fixtures rather than a first-principles reconstruction of every lifecycle position.
Using third-party JCS implementations strengthens byte-level reproducibility. It does not independently validate the semantic comparison or the deployment-enforcement claim. That leaves the maintainer question:
I think the implementation example and its limits are now clear. Thank you again for correcting the record. I will leave the remaining normative allocation question with the AP2 maintainers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello AP2 maintainers and community,
I am looking for pointers on a narrow protocol-boundary question related to mandate-bound checkout and payment flows.
AP2 already defines important concepts around Intent Mandates, Checkout/Cart Mandates, Payment Mandates, verifiable credentials, mandate chaining, payment authorization, and transaction accountability.
My question is not whether AP2 can bind user intent, cart contents, or payment authorization. I am trying to understand the intended boundary for execution-time revalidation: just before a mandate-bound payment-adjacent action is accepted or acted upon, where should an implementation verify that the final action still matches the current mandate evidence?
Concretely, suppose a mandate chain is structurally valid, signatures verify, and the agent is an authorized participant. Before the payment-adjacent action is executed, is there an AP2-level object, lifecycle event, verification step, or recommended implementation pattern for checking evidence such as:
The failure mode I am thinking about is not simply an invalid signature or invalid credential.
It is a valid mandate / valid agent / valid payment flow where the final action has drifted before execution, for example:
I am not proposing a mechanism or specification text here. I am trying to understand the intended AP2 boundary:
For context only, I have been exploring a related external-effect authorization problem in an individual IETF Internet-Draft and a small public synthetic reference evaluation:
https://datatracker.ietf.org/doc/draft-lee-orprg-permit-receipts/
https://github.com/meridianverity/permit-receipt
This is a request for technical guidance and pointers only, not a request to incorporate code, schema, or specification text.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions