pub enum BindingMode {
DirectWitness,
DelegatedWitness,
Unrecognized(String),
}Expand description
The attestation-binding mode a receipt was produced under.
§Why this is in the payload
-02 required a Verifier to obtain this from a document the Issuer
published separately, and simultaneously declined to specify that document.
Two problems followed. The obligation could not be discharged, because there
was nothing to fetch. And even had there been, a per-receipt fact would have
been resolved from a document that describes an Issuer rather than a
receipt, so the introduction’s non-extractability property stopped being
checkable from the presented bytes.
The mode was fixed at the instant the receipt was signed and was known to the signer. Carrying it costs one string.
§Why an unrecognised value is rejected here and preserved in AckProvenance
The two members answer different questions and the difference is not
stylistic. adapter.ackProvenance qualifies a record of something that
already happened, so refusing to parse it destroys the reconstruction the
receipt exists for, and the honest move is to surface the unknown.
attestation.bindingMode selects which security property a reader is
entitled to rely on. There is no safe reading of an unrecognised value: it
cannot be treated as direct-witness without asserting a property nobody
claimed, and treating it as delegated-witness invents a delegation
credential to go looking for. So the profile closes the set and this rejects.
Variants§
DirectWitness
The signing key is the TEE signing key. Wire value DIRECT_WITNESS.
DelegatedWitness
The signing key is the Issuer’s own, authorised by a TEE-issued
delegation credential. Wire value DELEGATED_WITNESS.
A reader of such a receipt obtains a weaker property than the
non-extractability one, and the delegation credential is resolved out of
band. Nothing in this repository resolves it; see KNOWN-LIMITATIONS.md.
Unrecognized(String)
A value outside the closed set, preserved exactly as it appeared.
Retained rather than dropped so a reader can report what was actually present. A payload carrying this fails validation.
Implementations§
Source§impl BindingMode
impl BindingMode
Sourcepub fn as_wire_str(&self) -> &str
pub fn as_wire_str(&self) -> &str
Returns the wire string for this value.
Sourcepub const fn is_unrecognized(&self) -> bool
pub const fn is_unrecognized(&self) -> bool
Returns true when the value is outside the closed set the profile names.