pub enum ChainError {
Signature(UcanError),
Structure(UcanError),
BrokenLinkage {
delegate_issuer: String,
delegator_audience: String,
},
Widening {
link: usize,
},
WindowEscape {
link: usize,
},
Expired {
link: usize,
},
DepthExceeded {
depth: usize,
},
MissingProof,
}Expand description
Why a delegation chain was rejected. Every variant is a fail-closed denial.
Variants§
Signature(UcanError)
A signature failed to verify (wraps UcanError).
Structure(UcanError)
Structural malformation (wraps UcanError).
BrokenLinkage
The delegate’s issuer is not the delegator’s audience — broken linkage.
Fields
Widening
The delegate claims a capability its delegator does not authorize — an attempt to WIDEN authority across a delegation. The cardinal violation.
WindowEscape
The child’s validity window is not contained within its delegator’s (a child cannot be valid when its parent is not).
Expired
A link is not live at the validation instant now: it has expired
(now > expiration) or is not yet valid (now < not_before). Absolute
time check — independent of relative window containment. Fail-closed: an
expired chain MUST deny.
DepthExceeded
The proof chain is nested deeper than MAX_PROOF_DEPTH. A DoS guard
against stack exhaustion from a maliciously deep chain — not an
authority-widening concern, but rejected fail-closed all the same.
MissingProof
A non-root UCAN carried no proofs (cannot be authorized) — only a root may have an empty proof set, and a root is the top of the chain.
Trait Implementations§
Source§impl Clone for ChainError
impl Clone for ChainError
Source§fn clone(&self) -> ChainError
fn clone(&self) -> ChainError
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 ChainError
impl Debug for ChainError
Source§impl Display for ChainError
impl Display for ChainError
Source§impl Error for ChainError
impl Error for ChainError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ChainError
impl PartialEq for ChainError
Source§fn eq(&self, other: &ChainError) -> bool
fn eq(&self, other: &ChainError) -> bool
self and other values to be equal, and is used by ==.impl Eq for ChainError
impl StructuralPartialEq for ChainError
Auto Trait Implementations§
impl Freeze for ChainError
impl RefUnwindSafe for ChainError
impl Send for ChainError
impl Sync for ChainError
impl Unpin for ChainError
impl UnsafeUnpin for ChainError
impl UnwindSafe for ChainError
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more