pub enum AuthorityError {
Show 16 variants
EmptyChain,
Digest {
index: usize,
reason: String,
},
NoExpiry {
index: usize,
},
TooDeep {
found: usize,
},
NotAuthority {
index: usize,
found: String,
},
RootNotGoverning {
root_issuer: String,
expected: String,
},
BrokenLink {
index: usize,
named: String,
presented: String,
},
IssuerNotParentSubject {
index: usize,
issuer: String,
subject: String,
},
WidensActions {
index: usize,
action: String,
},
WidensScope {
index: usize,
scope: String,
parent_scope: String,
},
OutlivesParent {
index: usize,
until: DateTime<Utc>,
parent_until: DateTime<Utc>,
},
ScopeMismatch {
granted: String,
requested: String,
},
ActionNotGranted {
action: String,
},
NotThePresenter {
subject: String,
presenter: String,
},
NotValidNow {
index: usize,
at: DateTime<Utc>,
},
NoActions {
index: usize,
},
}Expand description
Why a chain was refused.
Each variant names a specific way of acquiring authority that was not granted, rather than collapsing into one “invalid” — a verifier’s logs are where an escalation attempt becomes visible.
Variants§
EmptyChain
The chain was empty. Nothing to verify.
Digest
A link’s digest could not be computed, or one it carries could not be read.
Distinct from AuthorityError::BrokenLink: a digest that cannot be read is not a digest that disagrees, and a verifier that conflated the two would report a malformed chain as a widening one.
NoExpiry
A link carried no validUntil, which a VAC MUST have.
TooDeep
The chain is longer than MAX_CHAIN_DEPTH.
NotAuthority
A credential in the chain was not an AuthorityCredential.
RootNotGoverning
The chain root was not issued by the party governing the scope.
This is the finding that matters most: a chain that does not reach the governing party is a self-issued grant, however well-formed each link is.
Fields
BrokenLink
A link’s parent did not name the credential presented as its parent.
Fields
IssuerNotParentSubject
A link was issued by someone other than its parent’s subject.
Only the party a grant was made to may attenuate it. Without this check a holder could graft an unrelated grant onto their own chain.
Fields
WidensActions
A link conferred an action its parent did not.
WidensScope
A link named a different scope from its parent.
Fields
OutlivesParent
A link outlived its parent.
Fields
ScopeMismatch
The requested scope is not the one the chain confers on.
ActionNotGranted
The chain does not confer the requested action.
NotThePresenter
The leaf grants to somebody other than the party presenting it.
A VAC is evidence that authority was conferred on somebody. It is not evidence that whoever handed it over is that somebody, and a verifier that conflated the two would authorize every captured presentation.
NotValidNow
A link was outside its validity window at the time of the check.
Fields
NoActions
A link carried an empty actions list.
Trait Implementations§
Source§impl Clone for AuthorityError
impl Clone for AuthorityError
Source§fn clone(&self) -> AuthorityError
fn clone(&self) -> AuthorityError
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 AuthorityError
impl Debug for AuthorityError
Source§impl Display for AuthorityError
impl Display for AuthorityError
impl Eq for AuthorityError
Source§impl Error for AuthorityError
impl Error for AuthorityError
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()