pub enum VaultAuthConfig {
Token {
token: Option<String>,
},
Approle {
role_id: String,
secret_id: String,
},
}Expand description
Authentication method declared in the pull manifest for a HashiCorp Vault source.
When omitted from the YAML, the runtime falls back to environment variables
(VAULT_ROLE_ID + VAULT_SECRET_ID for AppRole, then VAULT_TOKEN for token).
Values that look like ${ENV_VAR} are expanded at parse time via
[expand_env_vars].
Variants§
Token
Static token (reads VAULT_TOKEN at runtime if token is not set here).
Approle
AppRole: exchange role_id + secret_id for a short-lived client token.
Implementations§
Source§impl VaultAuthConfig
impl VaultAuthConfig
Sourcepub fn expand_env_vars(self) -> Self
pub fn expand_env_vars(self) -> Self
Expand ${VAR} placeholders in string fields using the current process
environment. Unknown variables are left as-is (not expanded to empty string).
Trait Implementations§
Source§impl Clone for VaultAuthConfig
impl Clone for VaultAuthConfig
Source§fn clone(&self) -> VaultAuthConfig
fn clone(&self) -> VaultAuthConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VaultAuthConfig
impl Debug for VaultAuthConfig
Source§impl<'de> Deserialize<'de> for VaultAuthConfig
impl<'de> Deserialize<'de> for VaultAuthConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VaultAuthConfig
impl PartialEq for VaultAuthConfig
Source§fn eq(&self, other: &VaultAuthConfig) -> bool
fn eq(&self, other: &VaultAuthConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VaultAuthConfig
Auto Trait Implementations§
impl Freeze for VaultAuthConfig
impl RefUnwindSafe for VaultAuthConfig
impl Send for VaultAuthConfig
impl Sync for VaultAuthConfig
impl Unpin for VaultAuthConfig
impl UnsafeUnpin for VaultAuthConfig
impl UnwindSafe for VaultAuthConfig
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
Mutably borrows from an owned value. Read more