Class KeyVaultClient

java.lang.Object
com.azure.spring.cloud.config.stores.KeyVaultClient

public final class KeyVaultClient extends Object
Client for connecting to and getting secrets from a Key Vault
  • 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 Properties
      uri - Key Vault URI
      tokenCredentialProvider - optional provider of the Token Credential for connecting to Key Vault
      keyVaultClientProvider - optional provider for overriding the Key Vault Client
      keyVaultSecretProvider - 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 Secret
      timeout - How long it waits for a response from Key Vault
      Returns:
      Secret values that matches the secretIdentifier