pub enum AzureKeyVaultAuthOptions {
RuntimeConfigValues {
client_id: String,
client_secret: String,
tenant_id: String,
authority_host: AzureAuthorityHost,
},
Environmental,
}
Expand description
Azure Cosmos Key / Value enumeration for the possible authentication options
Variants§
RuntimeConfigValues
Runtime Config values indicates the service principal credentials have been supplied
Environmental
Environmental indicates that the environment variables of the process should be used to create the TokenCredential for the Cosmos client. This will use the Azure Rust SDK’s DefaultCredentialChain to derive the TokenCredential based on what environment variables have been set.
Service Principal with client secret:
AZURE_TENANT_ID
: ID of the service principal’s Azure tenant.AZURE_CLIENT_ID
: the service principal’s client ID.AZURE_CLIENT_SECRET
: one of the service principal’s secrets.
Service Principal with certificate:
AZURE_TENANT_ID
: ID of the service principal’s Azure tenant.AZURE_CLIENT_ID
: the service principal’s client ID.AZURE_CLIENT_CERTIFICATE_PATH
: path to a PEM or PKCS12 certificate file including the private key.AZURE_CLIENT_CERTIFICATE_PASSWORD
: (optional) password for the certificate file.
Workload Identity (Kubernetes, injected by the Workload Identity mutating webhook):
AZURE_TENANT_ID
: ID of the service principal’s Azure tenant.AZURE_CLIENT_ID
: the service principal’s client ID.AZURE_FEDERATED_TOKEN_FILE
: TokenFilePath is the path of a file containing a Kubernetes service account token.
Managed Identity (User Assigned or System Assigned identities):
AZURE_CLIENT_ID
: (optional) if using a user assigned identity, this will be the client ID of the identity.
Azure CLI:
AZURE_TENANT_ID
: (optional) use a specific tenant via the Azure CLI.
Common across each:
AZURE_AUTHORITY_HOST
: (optional) the host for the identity provider. For example, for Azure public cloud the host defaults to"https://login.microsoftonline.com"
.
See also: https://github.com/Azure/azure-sdk-for-rust/blob/main/sdk/identity/README.md
Trait Implementations§
Source§impl Clone for AzureKeyVaultAuthOptions
impl Clone for AzureKeyVaultAuthOptions
Source§fn clone(&self) -> AzureKeyVaultAuthOptions
fn clone(&self) -> AzureKeyVaultAuthOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AzureKeyVaultAuthOptions
impl Debug for AzureKeyVaultAuthOptions
Auto Trait Implementations§
impl Freeze for AzureKeyVaultAuthOptions
impl RefUnwindSafe for AzureKeyVaultAuthOptions
impl Send for AzureKeyVaultAuthOptions
impl Sync for AzureKeyVaultAuthOptions
impl Unpin for AzureKeyVaultAuthOptions
impl UnwindSafe for AzureKeyVaultAuthOptions
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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