Skip to main content

UnavailableCredentialResolver

Struct UnavailableCredentialResolver 

Source
pub struct UnavailableCredentialResolver;
Expand description

Fail-closed resolver used when no live claustrum route is available.

Trait Implementations§

Source§

impl CredentialResolver for UnavailableCredentialResolver

Source§

fn resolve<'a>( &'a self, _raw_handle: &'a str, _min_ttl_ms: Option<u64>, _force_refresh: bool, ) -> CredentialResolverFuture<'a, Result<ResolvedCredential, CredentialResolverError>>

raw_handle is the capability stored only in module configuration. Callers must use the config’s public credential name in reports and diagnostics.
Source§

fn get_scoped<'a>( &'a self, _credential_id: &'a str, ) -> CredentialResolverFuture<'a, Result<ResolvedCredential, CredentialResolverError>>

Reads a credential by its vault ID under the route’s reserved principal. Unlike resolve, this never accepts a raw capability handle.
Source§

fn get_scoped_with_min_ttl<'a>( &'a self, _credential_id: &'a str, _min_ttl_ms: u64, ) -> CredentialResolverFuture<'a, Result<ResolvedCredential, CredentialResolverError>>

Reads a scoped credential only when the served token has at least this much remaining lifetime. Implementations that cannot enforce the bound fail closed.
Source§

fn report_auth_failure<'a>( &'a self, _credential_id: &'a str, _record_version: u64, _provider_status: u16, ) -> CredentialResolverFuture<'a, Result<bool, CredentialResolverError>>

Reports a provider auth failure for the credential ID and served version. The vault accepts only provider status 401 or 403; any other status is rejected locally before a request is sent. accepted means the vault accepted the report, not that it changed state: a stale record_version is accepted and ignored. Read again after reporting; if the version has not moved, stop rather than retrying in a loop. For a static API key, a 401 means the key is dead.
Source§

fn status_scoped<'a>( &'a self, _credential_id: &'a str, ) -> CredentialResolverFuture<'a, Result<CredentialStatus, CredentialResolverError>>

Returns status for a vault ID under the reserved principal without minting.
Source§

fn sign<'a>( &'a self, _credential_id: &'a str, _payload: &'a [u8], ) -> CredentialResolverFuture<'a, Result<CredentialSignature, CredentialResolverError>>

Source§

fn public_key<'a>( &'a self, _credential_id: &'a str, ) -> CredentialResolverFuture<'a, Result<CredentialPublicKey, CredentialResolverError>>

Source§

fn seal<'a>( &'a self, _request: SealRequest<'a>, ) -> CredentialResolverFuture<'a, Result<CredentialSeal, CredentialResolverError>>

Seals one message under a vault-held KEM key (credential.seal). Makes exactly one attempt, even on a retryable error: every seal is a fresh ciphertext with its own audit row, so retrying is the caller’s decision (its own backoff, its own record of what was sent), never something the client does silently.
Source§

fn watch_scoped<'a>( &'a self, _enrollment_token: Option<&'a str>, ) -> CredentialResolverFuture<'a, Result<ScopedWatch, CredentialResolverError>>

Opens a dedicated scoped watch. The caller owns reconnection and re-reading.
Source§

fn list_scoped( &self, ) -> CredentialResolverFuture<'_, Result<ScopedCredentialListing, CredentialResolverError>>

Lists the vault rows covered by this principal’s own grants, metadata only.
Source§

impl Debug for UnavailableCredentialResolver

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for UnavailableCredentialResolver

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.