pub struct VerificationPolicy {
pub validate_body_schema: bool,
pub allow_unknown_status: bool,
pub receipts: ReceiptPolicy,
pub historical_keys: HistoricalKeyPolicy,
}Expand description
Consumer-tunable strictness for VerifiedContext::fetch_with_policy.
For ACDP v0.1.0 the verification profile is always strict:
did:webis required for every producer identity — enforced unconditionally byverify_signature_envelope(RFC-ACDP-0001 §5.4), regardless of any policy field.- Embedded
DataRefhashes are verified byacdp_validation::validate_bodywhenevervalidate_body_schemais set.
Only the fields below have real effect in this version; there are no
relaxed-mode did:web or embedded-hash knobs.
Fields§
§validate_body_schema: boolIf true, run acdp_validation::validate_body (structural
schema checks plus embedded-DataRef hash verification) before
any cryptographic check. Default true. Set false only in
diagnostic paths that want to attempt signature verification
despite a body known to fail structural checks.
allow_unknown_status: boolIf true, accept Status::Other values (degrade to active per
RFC-ACDP-0004 §4.1). When false, reject unknown statuses.
Default true.
receipts: ReceiptPolicyRegistry-receipt handling (ACDP 0.2, RFC-ACDP-0010).
Default ReceiptPolicy::VerifyIfPresent.
historical_keys: HistoricalKeyPolicyHistorical-key handling (ACDP 0.2, WS-B). Default
HistoricalKeyPolicy::AcceptWithReceipt.
Implementations§
Source§impl VerificationPolicy
impl VerificationPolicy
Sourcepub fn strict_v0_1_0() -> Self
pub fn strict_v0_1_0() -> Self
The v0.1.0 strict verification profile (RFC-ACDP-0001 §5.11, §9.2).
Runs the full §5.11 pipeline: body schema validation, content_hash
recomputation, did:web key resolution, signature verification, and
embedded data_ref.content_hash checks. Returns on the first failure.
This is the only mode covered by the acdp-consumer conformance
profile. Relaxed modes (Diagnostic, UnsafeForTests) are NOT
available in this crate in v0.1.0 — they would be separately-named
opt-ins per §9.2, and are not currently implemented.
NOT identical to Default::default() as of 0.2: the default
policy is receipt-aware (VerifyIfPresent + AcceptWithReceipt),
while this named profile preserves the exact v0.1.0 semantics —
receipts inert (ReceiptPolicy::Ignore) and only
assertionMethod keys accepted
(HistoricalKeyPolicy::Reject). Callers pinned to this
constructor keep v0.1.0 behavior across the 0.2 upgrade.
Trait Implementations§
Source§impl Clone for VerificationPolicy
impl Clone for VerificationPolicy
Source§fn clone(&self) -> VerificationPolicy
fn clone(&self) -> VerificationPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerificationPolicy
impl Debug for VerificationPolicy
Source§impl Default for VerificationPolicy
impl Default for VerificationPolicy
impl Eq for VerificationPolicy
Source§impl PartialEq for VerificationPolicy
impl PartialEq for VerificationPolicy
Source§fn eq(&self, other: &VerificationPolicy) -> bool
fn eq(&self, other: &VerificationPolicy) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VerificationPolicy
Auto Trait Implementations§
impl Freeze for VerificationPolicy
impl RefUnwindSafe for VerificationPolicy
impl Send for VerificationPolicy
impl Sync for VerificationPolicy
impl Unpin for VerificationPolicy
impl UnsafeUnpin for VerificationPolicy
impl UnwindSafe for VerificationPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.