Package com.atlassian.secrets.vault.auth
Class DefaultVaultAuthenticationProvider
java.lang.Object
com.atlassian.secrets.vault.auth.DefaultVaultAuthenticationProvider
- All Implemented Interfaces:
VaultAuthenticationProvider
public class DefaultVaultAuthenticationProvider
extends Object
implements VaultAuthenticationProvider
A default class for providing Vault authentication instance.
Currently, KubernetesAuthentication and TokenAuthentication methods are supported.
Currently, KubernetesAuthentication and TokenAuthentication methods are supported.
- Since:
- 3.2
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultVaultAuthenticationProvider(KubernetesAuthenticationFactory kubernetesAuthenticationFactory, TokenAuthenticationFactory tokenAuthenticationFactory) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.vault.authentication.ClientAuthenticationgetAuthentication(VaultConfig params) Retrieves the appropriate authentication method based on the provided authentication type.
-
Constructor Details
-
DefaultVaultAuthenticationProvider
public DefaultVaultAuthenticationProvider(KubernetesAuthenticationFactory kubernetesAuthenticationFactory, TokenAuthenticationFactory tokenAuthenticationFactory) -
DefaultVaultAuthenticationProvider
public DefaultVaultAuthenticationProvider()
-
-
Method Details
-
getAuthentication
public org.springframework.vault.authentication.ClientAuthentication getAuthentication(VaultConfig params) Retrieves the appropriate authentication method based on the provided authentication type.- Specified by:
getAuthenticationin interfaceVaultAuthenticationProvider- Parameters:
params- The parameters to configure Vault client.- Returns:
- The authentication object corresponding to the provided authentication type or Token method if method is not specified in the parameters
- Throws:
SecretStoreException- if the authentication configuration is not found for provided authentication method.
-