pub enum DelegationError {
ScopeWidened {
from: String,
to: String,
widened: String,
},
ValidityWidened {
from: String,
to: String,
delegator_until: String,
delegate_until: String,
},
AudienceWidened {
from: String,
to: String,
delegator_audience: String,
delegate_audience: String,
},
TooDeep {
depth: usize,
max: usize,
},
Empty,
Expired {
subject: String,
not_after: String,
at: String,
},
WrongAudience {
subject: String,
audience: String,
plane: String,
},
}Expand description
Why a delegation was refused.
Variants§
ScopeWidened
The delegate asked for authority the delegator does not hold.
Rejected at construction, not detected in review: this is the escalation the whole mechanism exists to make unrepresentable.
ValidityWidened
The delegate would outlive its delegator.
The same rule as scope, on the time axis: a link that expires later than the one above it holds authority its delegator will no longer have, which is how a short-lived credential buys a long-lived one.
AudienceWidened
The delegate names a plane its delegator was not issued for.
An audience is a bound on where a chain may be spent. A delegate naming a different one would carry its delegator’s authority to a plane the delegator never held it at.
TooDeep
The chain is longer than the manifest allows.
A depth cap is not about scope; it bounds how far a request can travel from the human who authorized it before nobody can reason about it.
Empty
A chain arrived with no links, or with no owner at its root.
Expired
The chain’s validity ended before this run was admitted.
A refusal at admission only — never on replay, where the recorded chain is history rather than a credential being presented.
WrongAudience
The chain was issued for another plane.
Nothing about the chain is wrong; it is being spent where it must not be. The presented credential names an audience, and this is not it.
Trait Implementations§
Source§impl Clone for DelegationError
impl Clone for DelegationError
Source§impl Debug for DelegationError
impl Debug for DelegationError
Source§impl Display for DelegationError
impl Display for DelegationError
impl Eq for DelegationError
Source§impl Error for DelegationError
impl Error for DelegationError
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 From<DelegationError> for RuntimeError
impl From<DelegationError> for RuntimeError
Source§fn from(source: DelegationError) -> Self
fn from(source: DelegationError) -> Self
Source§impl PartialEq for DelegationError
impl PartialEq for DelegationError
impl StructuralPartialEq for DelegationError
Auto Trait Implementations§
impl Freeze for DelegationError
impl RefUnwindSafe for DelegationError
impl Send for DelegationError
impl Sync for DelegationError
impl Unpin for DelegationError
impl UnsafeUnpin for DelegationError
impl UnwindSafe for DelegationError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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