SshAgentBackend

Struct SshAgentBackend 

Source
pub struct SshAgentBackend;
Expand description

SSH-agent backed vault authentication.

Connects to $SSH_AUTH_SOCK, signs a BLAKE3-derived challenge with the enrolled key, derives a KEK from the deterministic signature, and unwraps the master key from the enrollment blob.

Implementations§

Source§

impl SshAgentBackend

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Default for SshAgentBackend

Source§

fn default() -> Self

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

impl VaultAuthBackend for SshAgentBackend

Source§

fn factor_id(&self) -> AuthFactorId

Which auth factor this backend provides.
Source§

fn name(&self) -> &str

Human-readable name for audit logs and overlay display.
Source§

fn backend_id(&self) -> &str

Short identifier for IPC messages and config.
Source§

fn is_enrolled(&self, profile: &TrustProfileName, config_dir: &Path) -> bool

Check whether this backend has a valid enrollment for the profile.
Source§

fn can_unlock<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, profile: &'life1 TrustProfileName, config_dir: &'life2 Path, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Check whether this backend can currently perform an unlock. Must be fast (< 100ms).
Source§

fn requires_interaction(&self) -> AuthInteraction

What kind of user interaction this backend requires.
Source§

fn unlock<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, profile: &'life1 TrustProfileName, config_dir: &'life2 Path, salt: &'life3 [u8], ) -> Pin<Box<dyn Future<Output = Result<UnlockOutcome, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Attempt to derive/unwrap the master key for a profile.
Source§

fn enroll<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, profile: &'life1 TrustProfileName, master_key: &'life2 SecureBytes, config_dir: &'life3 Path, salt: &'life4 [u8], selected_key_index: Option<usize>, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Enroll this backend for a profile. Requires the master key. Read more
Source§

fn revoke<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, profile: &'life1 TrustProfileName, config_dir: &'life2 Path, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Remove enrollment for this backend.

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more