pub enum GrantError {
Chain(ChainError),
OverCeiling {
requested: Capability,
},
InsufficientClearance,
MissingSenderBinding,
UnlabeledSubject,
EmptyGrant,
AuditUnavailable,
}Expand description
Why a grant request was denied. Every variant is fail-closed; there is no “best-effort” or “narrow-and-continue” outcome. The cardinal rule of #547: authority-unreachable ⇒ deny, never downgrade.
Variants§
Chain(ChainError)
The UCAN chain failed S5 validation (bad signature, broken linkage, widening, window escape, expired/not-yet-valid, or over-depth). Wrapped verbatim from S5 so the failure mode is auditable.
OverCeiling
The request exceeds the grant’s ceiling — an escalation attempt. This is routed to the (deferred) escalation tier; until that lands it is a denial. S6 never auto-escalates. The offending requested capability (the one no grant capability authorizes) is included for diagnostics.
Fields
requested: CapabilityInsufficientClearance
The principal’s MAC clearance does not dominate the request’s label — the S1 floor denies. This is independent of the ceiling: a principal may hold a valid grant for an object whose label they are not cleared for. Both gates must pass.
MissingSenderBinding
No sender-binding (DPoP proof) was supplied. ZSP: the minted token MUST be sender-bound — a bearer token minted from a grant would re-introduce standing access, defeating the whole model.
UnlabeledSubject
The subject carried no derivable clearance at all (unlabeled subject). Per S1, an unlabeled subject has no context and the monitor denies — there is no default clearance.
EmptyGrant
The grant carries no capabilities at all, so there is no ceiling to request a subset of. An empty grant mints nothing.
B2 (#674): the request would otherwise Permit, but the decision
could not be durably audited (the audit sink’s record failed, or its
signer cannot sign under the enforced crypto policy). Mirrors S7’s
AuditedAvc fail-closed rule at the grant path: a decision that cannot
be audited is never allowed through. See audited_evaluate_grant.
Trait Implementations§
Source§impl Clone for GrantError
impl Clone for GrantError
Source§fn clone(&self) -> GrantError
fn clone(&self) -> GrantError
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 GrantError
impl Debug for GrantError
Source§impl Display for GrantError
impl Display for GrantError
Source§impl Error for GrantError
impl Error for GrantError
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 GrantError
impl PartialEq for GrantError
Source§fn eq(&self, other: &GrantError) -> bool
fn eq(&self, other: &GrantError) -> bool
self and other values to be equal, and is used by ==.impl Eq for GrantError
impl StructuralPartialEq for GrantError
Auto Trait Implementations§
impl Freeze for GrantError
impl RefUnwindSafe for GrantError
impl Send for GrantError
impl Sync for GrantError
impl Unpin for GrantError
impl UnsafeUnpin for GrantError
impl UnwindSafe for GrantError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> JaggedSlice<T> for T
impl<T> JaggedSlice<T> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more