Class KubernetesAuthenticationFactory

java.lang.Object
com.atlassian.secrets.vault.auth.kubernetes.KubernetesAuthenticationFactory

public class KubernetesAuthenticationFactory extends Object
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
  • 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 a KubernetesAuthentication instance based on the provided VaultConfig.

      This method attempts to retrieve the necessary values for role, Kubernetes authentication path, and JWT path, from environment variables.

      Parameters:
      config - the VaultConfig containing the endpoint of Vault server for creating KubernetesAuthentication.
      Returns:
      a KubernetesAuthentication instance based on the provided parameters.
      Throws:
      SecretStoreException - if there is any problem in retrieving the necessary values or creating the KubernetesAuthentication.