Class BaseAzureKeyVaultCredentialsProvider
java.lang.Object
hudson.model.Descriptor<com.cloudbees.plugins.credentials.CredentialsProvider>
com.cloudbees.plugins.credentials.CredentialsProvider
org.jenkinsci.plugins.azurekeyvaultplugin.provider.BaseAzureKeyVaultCredentialsProvider
- All Implemented Interfaces:
ExtensionPoint,Describable<com.cloudbees.plugins.credentials.CredentialsProvider>,Saveable,Loadable,OnMaster,IconSpec
- Direct Known Subclasses:
AzureCredentialsProvider,FolderAzureCredentialsProvider
public abstract class BaseAzureKeyVaultCredentialsProvider
extends com.cloudbees.plugins.credentials.CredentialsProvider
Common parent of the providers that serve credentials from Azure Key Vault.
The Azure credential types in this plugin are only applicable to subclasses, see isAzureKeyVaultProvider(CredentialsProvider).
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class com.cloudbees.plugins.credentials.CredentialsProvider
CREATE, DELETE, GROUP, MANAGE_DOMAINS, NONE, UPDATE, USE_ITEM, USE_OWN, VIEWFields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static <K> com.github.benmanes.caffeine.cache.CacheLoader<K, Map<String, com.cloudbees.plugins.credentials.common.IdCredentials>> credentialsLoader(Function<K, Map<String, com.cloudbees.plugins.credentials.common.IdCredentials>> fetch) Wraps a fetch of a vault's credentials for the cache, which treats failures differently on the first load and on a refresh.static booleanisAzureKeyVaultProvider(com.cloudbees.plugins.credentials.CredentialsProvider provider) protected static booleanisLookupSupported(Class<?> type) Key Vault can't hold the Azure credentials used to connect to it, and answering a lookup for them would re-enter the provider while it is connecting to the vault.newCacheBuilder(long maximumSize) Creates the builder for a provider's credentials cache, so all providers expire and refresh on the same schedule.Methods inherited from class com.cloudbees.plugins.credentials.CredentialsProvider
_isApplicable, all, allCredentialsDescriptors, enabled, enabled, findCredentialById, findCredentialById, findCredentialById, findCredentialByIdInItem, findCredentialByIdInItemGroup, getCredentialByIdInItem, getCredentialByIdInItemGroup, getCredentialIds, getCredentialIds, getCredentialIdsInItem, getCredentialIdsInItemGroup, getCredentials, getCredentials, getCredentials, getCredentials, getCredentialsDescriptors, getCredentialsInItem, getCredentialsInItemGroup, getDescriptor, getDisplayName, getFingerprintOf, getOrCreateFingerprintOf, getScopes, getStore, hasCredentialsDescriptors, hasStores, isApplicable, isApplicable, isEnabled, isEnabled, listCredentials, listCredentials, listCredentialsInItem, listCredentialsInItemGroup, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentialsInItem, lookupCredentialsInItem, lookupCredentialsInItemGroup, lookupCredentialsInItemGroup, lookupScopes, lookupStores, saveAll, snapshot, snapshot, track, track, track, trackAll, trackAll, trackAll, trackAll, trackAll, trackAllMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
BaseAzureKeyVaultCredentialsProvider
public BaseAzureKeyVaultCredentialsProvider()
-
-
Method Details
-
isAzureKeyVaultProvider
public static boolean isAzureKeyVaultProvider(com.cloudbees.plugins.credentials.CredentialsProvider provider) -
newCacheBuilder
protected static com.github.benmanes.caffeine.cache.Caffeine<Object,Object> newCacheBuilder(long maximumSize) Creates the builder for a provider's credentials cache, so all providers expire and refresh on the same schedule. Metadata is refreshed every 10 minutes and dropped if it can't be refreshed for 2 hours. -
credentialsLoader
protected static <K> com.github.benmanes.caffeine.cache.CacheLoader<K,Map<String, credentialsLoadercom.cloudbees.plugins.credentials.common.IdCredentials>> (Function<K, Map<String, com.cloudbees.plugins.credentials.common.IdCredentials>> fetch) Wraps a fetch of a vault's credentials for the cache, which treats failures differently on the first load and on a refresh.- A failed first load caches no credentials until the next refresh, so lookups while the vault is unavailable don't each block on retrying it.
- A failed refresh is rethrown, so the cache keeps the last credentials loaded until they expire, rather than replacing them with none.
-
isLookupSupported
Key Vault can't hold the Azure credentials used to connect to it, and answering a lookup for them would re-enter the provider while it is connecting to the vault. -
getIconClassName
- Specified by:
getIconClassNamein interfaceIconSpec- Overrides:
getIconClassNamein classcom.cloudbees.plugins.credentials.CredentialsProvider
-