pub enum DenyReason {
MissingScope {
scope: String,
},
TenantBoundary,
NotAccepted,
MissingGrant {
grant: String,
scope: String,
roles: Vec<String>,
held_on: Vec<String>,
},
NotNeeded {
method: String,
},
}Expand description
Why an authenticated caller was refused. Flattened into
RemoteError::Forbidden under the reason key.
Each variant carries at most the single fact the caller already failed (AUTHZ-CORE-1/5, rendered per AUTHZ-PRIVACY-4): the first unmet scope, never the method’s full requirement set or the registry’s taxonomy.
Variants§
MissingScope
The caller’s scopes do not include scope — the first unmet one.
TenantBoundary
The call reaches across the caller’s tenant boundary.
NotAccepted
The call was not accepted in the caller’s action context.
MissingGrant
AUTH-2: the grant gate’s refusal — the caller does not hold grant
on scope. Names what was needed and where the caller does hold it
(owner, 2026-10-10: “return the grants required to hit an
endpoint”).
Fields
NotNeeded
NEST-16: a child called its service for method, which is neither
the standard upward interface (host.schema, host.whoami,
host.log, host.notify) nor one of the methods its schema says it
needs. Not in the JSON Schema (schemars(skip)): it would move
the hash of every service’s call, whose items carry this type.