Class AbstractAuthenticatingVaultTokenCredential

    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials

        com.cloudbees.plugins.credentials.impl.BaseStandardCredentials.BaseStandardCredentialsDescriptor
      • Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials

        com.cloudbees.plugins.credentials.common.IdCredentials.Helpers
      • Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials

        com.cloudbees.plugins.credentials.common.StandardCredentials.NameProvider
    • Constructor Detail

      • AbstractAuthenticatingVaultTokenCredential

        protected AbstractAuthenticatingVaultTokenCredential​(com.cloudbees.plugins.credentials.CredentialsScope scope,
                                                             String id,
                                                             String description)
    • Method Detail

      • getNamespace

        @CheckForNull
        public String getNamespace()
        Get Vault namespace.
        Returns:
        vault namespace or null
      • setNamespace

        @DataBoundSetter
        public void setNamespace​(String namespace)
        Set namespace where auth method is mounted. If set to "/" the root namespace is explicitly forced, otherwise the namespace from the secret credential vault config is used.
        Parameters:
        namespace - vault namespace
      • getToken

        protected abstract String getToken​(@NonNull
                                           com.bettercloud.vault.api.Auth auth)
        Authenticate with vault using this credential and return the token. The auth client will be configured with this credentials namespace.
        Parameters:
        auth - vault auth client
        Returns:
        authentication token
        Throws:
        VaultPluginException - if failed to authenticate with vault