pub enum CredentialRef {
Path(SecretPath),
Sentinel(String),
}Expand description
What a source needs to be operational.
Per ADR-021 §4: a Vault source needs a Vault token, a 1Password source needs a signed-in account session, etc. The credential reference is either:
- A path under the reserved
__sources/namespace pointing at the credential value in the credential store, or - A source-defined sentinel string (
biometric,default-profile,oauth) that the source plugin interprets itself.
The router uses this on configuration load to enforce the
recursion invariant (P5.5): a source-credential must resolve
through a source whose own SecretSource::requires_credential
is None. That’s why this enum exists — sources need a way to
say “my credential lives at this path” or “my credential lives
inside me; ask my native unlock”. Without the distinction the
recursion check would reject 1Password’s biometric session as a
missing credential.
Variants§
Path(SecretPath)
A path under the reserved __sources/ namespace. The router
fetches the value from the credential store and hands it to
the source’s init step.
Sentinel(String)
A source-specific sentinel like biometric or
default-profile. Opaque to the router; meaningful only to
the source plugin.
Trait Implementations§
Source§impl Clone for CredentialRef
impl Clone for CredentialRef
Source§fn clone(&self) -> CredentialRef
fn clone(&self) -> CredentialRef
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 CredentialRef
impl Debug for CredentialRef
impl Eq for CredentialRef
Source§impl PartialEq for CredentialRef
impl PartialEq for CredentialRef
Source§fn eq(&self, other: &CredentialRef) -> bool
fn eq(&self, other: &CredentialRef) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CredentialRef
Auto Trait Implementations§
impl Freeze for CredentialRef
impl RefUnwindSafe for CredentialRef
impl Send for CredentialRef
impl Sync for CredentialRef
impl Unpin for CredentialRef
impl UnsafeUnpin for CredentialRef
impl UnwindSafe for CredentialRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.