pub enum EngineError {
CapabilityDenied {
subject: ObjectId,
target: ObjectId,
operation: Operation,
reason: String,
},
ExposureRestriction {
label: ExposureLabel,
target: ObjectId,
},
Identity(String),
Context(String),
Token(TokenError),
TokenOperation(String),
Policy(String),
MissingRequiredDesignation {
target: ObjectId,
operation: Operation,
label: String,
},
UnknownLabelInPolicy {
target: ObjectId,
operation: Operation,
label: String,
},
SchemaPolicyMismatch(String),
Resolver(ResolverError),
ChainCheckFailed {
subject: ObjectId,
ancestor: ObjectId,
target: ObjectId,
operation: Operation,
reason: ChainCheckFailure,
},
}Expand description
Errors from the capability engine.
Variants§
CapabilityDenied
Capability request denied by policy.
ExposureRestriction
Capability request denied due to exposure restriction.
Identity(String)
Identity token operation failed.
Context(String)
Context token operation failed.
Token(TokenError)
Token error from underlying token crate.
TokenOperation(String)
Token creation or verification failed.
Policy(String)
Policy backend error.
MissingRequiredDesignation
A required designation declared in the schema was not supplied at mint time (neither by the policy declaration nor by the caller).
UnknownLabelInPolicy
A static designation declared in policy references a label that does not appear in the target’s schema for the matched operation. Surfaced at engine construction.
SchemaPolicyMismatch(String)
Cross-validation between policy and schema failed at engine construction.
Either a policy-declared static designation references an unknown label
(see EngineError::UnknownLabelInPolicy) or another structural
mismatch was detected.
Resolver(ResolverError)
A designation resolver failed during a mint_with_context call.
ChainCheckFailed
The mint failed the delegated identity chain check: an ancestor of
subject either does not hold a grant for (target, operation), or
holds a grant whose static designations are not all present in the
capability being minted. This enforces “sub-identity capabilities ⊆
parent identity capabilities” transitively, including the per-grant
designation envelope.
Trait Implementations§
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
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()