Class KubernetesAuthenticationFactory
java.lang.Object
com.atlassian.secrets.vault.auth.kubernetes.KubernetesAuthenticationFactory
The KubernetesAuthenticationFactory class is responsible for creating instances of the KubernetesAuthentication class.
It retrieves the necessary values for the role, Kubernetes authentication path, and JWT path to configure the instance.
- Since:
- 3.2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNames of the environmental variables that are used for Kubernetes Vault Authentication.static classNames of the system properties that are used for Kubernetes Vault Authentication -
Constructor Summary
ConstructorsConstructorDescriptionKubernetesAuthenticationFactory(KubernetesServiceAccountTokenFileFactory kubernetesServiceAccountTokenFileFactory) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.vault.authentication.KubernetesAuthenticationgetAuthentication(VaultConfig config) Retrieves aKubernetesAuthenticationinstance based on the providedVaultConfig.
-
Constructor Details
-
KubernetesAuthenticationFactory
public KubernetesAuthenticationFactory() -
KubernetesAuthenticationFactory
public KubernetesAuthenticationFactory(KubernetesServiceAccountTokenFileFactory kubernetesServiceAccountTokenFileFactory)
-
-
Method Details
-
getAuthentication
public org.springframework.vault.authentication.KubernetesAuthentication getAuthentication(VaultConfig config) throws SecretStoreException Retrieves aKubernetesAuthenticationinstance based on the providedVaultConfig.This method attempts to retrieve the necessary values for role, Kubernetes authentication path, and JWT path, from environment variables.
- Parameters:
config- theVaultConfigcontaining the endpoint of Vault server for creatingKubernetesAuthentication.- Returns:
- a
KubernetesAuthenticationinstance based on the provided parameters. - Throws:
SecretStoreException- if there is any problem in retrieving the necessary values or creating theKubernetesAuthentication.
-