pub enum IdentityCustody {
Keyring,
Passphrase(Passphrase),
InMemory(UserKeypair),
Custom(Arc<dyn DeviceIdentityCustody>),
}Expand description
How a store’s device-signing identity is protected. Selected on the
builder, resolved once per store — the identity sibling of
crate::custody::KeyCustody, same shape.
Variants§
Keyring
The OS keyring — the default, byte-for-byte today’s behavior.
Passphrase(Passphrase)
Argon2id over a memorized passphrase wraps the keypair; the wrapped blob lives in a file in the store directory.
InMemory(UserKeypair)
Supplied for this session, never persisted by coven.
Custom(Arc<dyn DeviceIdentityCustody>)
A host-supplied custody implementation.
Implementations§
Source§impl IdentityCustody
impl IdentityCustody
Sourcepub fn resolve(
self,
store_id: &str,
store_dir: &StoreDir,
) -> Arc<dyn DeviceIdentityCustody>
pub fn resolve( self, store_id: &str, store_dir: &StoreDir, ) -> Arc<dyn DeviceIdentityCustody>
Resolve the selected policy into the trait object the identity-
establishing call sites drive, injecting what each preset needs from
the store’s identity: store_id for IdentityCustody::Keyring (the
keyring account name), store_dir for IdentityCustody::Passphrase
(the wrapped-file path).
Public to match KeyCustody::resolve: the
low-level restore_from_cloud takes the
already-resolved Arc<dyn DeviceIdentityCustody>, so a host restoring by
a directly-supplied key (no restore code) must be able to resolve a preset
itself, the same way it already resolves its KeyCustody.
Auto Trait Implementations§
impl Freeze for IdentityCustody
impl !RefUnwindSafe for IdentityCustody
impl Send for IdentityCustody
impl Sync for IdentityCustody
impl Unpin for IdentityCustody
impl UnsafeUnpin for IdentityCustody
impl !UnwindSafe for IdentityCustody
Blanket Implementations§
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
§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 more