Class AzureKeyVaultCredentialsAdapter

java.lang.Object
org.jenkinsci.plugins.azurekeyvaultplugin.credentials.AzureKeyVaultCredentialsAdapter
All Implemented Interfaces:
ExtensionPoint
Direct Known Subclasses:
AzureCertificateCredentialsAdapter, AzureSecretFileCredentialsAdapter, AzureSecretStringCredentialsAdapter, AzureSSHUserPrivateKeyCredentialsAdapter, AzureUsernamePasswordCredentialsAdapter, GitHubAppCredentialsAdapter

public abstract class AzureKeyVaultCredentialsAdapter extends Object implements ExtensionPoint
Turns an Azure Key Vault secret into a Jenkins credential.

The adapter is selected by the secret's type tag, see getType(). Other plugins can contribute adapters for their own credential types by registering an implementation as an Extension.

Credentials should resolve their secret lazily through AzureKeyVaultSecretContext.getSecret(), and provide a CredentialsSnapshotTaker if they hold on to that supplier, see Snapshot.

  • Constructor Details

    • AzureKeyVaultCredentialsAdapter

      public AzureKeyVaultCredentialsAdapter()
  • Method Details

    • getType

      @NonNull public abstract String getType()
      Returns:
      the value of the secret's type tag this adapter handles, e.g. string
    • adapt

      @CheckForNull public abstract com.cloudbees.plugins.credentials.common.IdCredentials adapt(@NonNull AzureKeyVaultSecretContext context) throws Exception
      Returns:
      the credential, or null to skip this secret (implementations should log why)
      Throws:
      Exception
    • forType

      @CheckForNull public static AzureKeyVaultCredentialsAdapter forType(@NonNull String type)
      Returns:
      the highest-ordinal adapter handling the given type, or null if there is none