Class KeyVaultClient
java.lang.Object
com.azure.spring.cloud.config.stores.KeyVaultClient
Client for connecting to and getting secrets from a Key Vault
-
Constructor Summary
ConstructorDescriptionKeyVaultClient
(AppConfigurationProperties properties, URI uri, KeyVaultCredentialProvider tokenCredentialProvider, SecretClientBuilderSetup keyVaultClientProvider, KeyVaultSecretProvider keyVaultSecretProvider) Creates a Client for connecting to Key Vault -
Method Summary
-
Constructor Details
-
KeyVaultClient
public KeyVaultClient(AppConfigurationProperties properties, URI uri, KeyVaultCredentialProvider tokenCredentialProvider, SecretClientBuilderSetup keyVaultClientProvider, KeyVaultSecretProvider keyVaultSecretProvider) Creates a Client for connecting to Key Vault- Parameters:
properties
- AppConfiguration Propertiesuri
- Key Vault URItokenCredentialProvider
- optional provider of the Token Credential for connecting to Key VaultkeyVaultClientProvider
- optional provider for overriding the Key Vault ClientkeyVaultSecretProvider
- optional provider for providing Secrets instead of connecting to Key Vault
-
-
Method Details
-
getSecret
public com.azure.security.keyvault.secrets.models.KeyVaultSecret getSecret(URI secretIdentifier, int timeout) Gets the specified secret using the Secret Identifier- Parameters:
secretIdentifier
- The Secret Identifier to Secrettimeout
- How long it waits for a response from Key Vault- Returns:
- Secret values that matches the secretIdentifier
-