pub enum KeyValueAzureCosmosAuthOptions {
RuntimeConfigValues(KeyValueAzureCosmosRuntimeConfigOptions),
Environmental,
}
Expand description
Azure Cosmos Key / Value enumeration for the possible authentication options
Variants§
RuntimeConfigValues(KeyValueAzureCosmosRuntimeConfigOptions)
Runtime Config values indicates the account and key have been specified directly
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 KeyValueAzureCosmosAuthOptions
impl Clone for KeyValueAzureCosmosAuthOptions
Source§fn clone(&self) -> KeyValueAzureCosmosAuthOptions
fn clone(&self) -> KeyValueAzureCosmosAuthOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for KeyValueAzureCosmosAuthOptions
impl RefUnwindSafe for KeyValueAzureCosmosAuthOptions
impl Send for KeyValueAzureCosmosAuthOptions
impl Sync for KeyValueAzureCosmosAuthOptions
impl Unpin for KeyValueAzureCosmosAuthOptions
impl UnwindSafe for KeyValueAzureCosmosAuthOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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