KeyVaultLoadStoreParameter Class
- java.
lang. Object - com.
azure. security. keyvault. jca. KeyVaultLoadStoreParameter
- com.
Implements
public final class KeyVaultLoadStoreParameter
implements java.security.KeyStore.LoadStoreParameter
The Azure Key Vault configuration used to load the KeyStoreSpi.
Create an instance explicitly for programmatic configuration, or use fromSystemProperties() to capture the supported system properties in a configuration snapshot.
Constructor Summary
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| void |
disableAiaDownload()
Disables AIA certificate downloads. |
| void |
disableChallengeResourceVerification()
Disables verifying if the authentication challenge resource matches the Key Vault or Managed HSM domain. |
|
static
Key |
fromSystemProperties()
Creates a load-store parameter that captures all supported system properties and their defaults. |
| String |
getAccessToken()
Get the access token. |
| Set<String> |
getCertificateAliasFilterPatterns()
Gets the certificate alias filter patterns. |
| Duration |
getCertificatesRefreshInterval()
Gets the certificate refresh interval. |
| String |
getCertPathCustom()
Gets the custom certificate path. |
| String |
getCertPathWellKnown()
Gets the well-known certificate path. |
| String |
getClientId()
Get the client id. |
| String |
getClientSecret()
Get the client secret. |
| String |
getManagedIdentity()
Get the Managed Identity. |
| java.security.KeyStore.ProtectionParameter |
getProtectionParameter()
Get the protection parameter. |
| String |
getTenantId()
Get the tenant id. |
| String |
getUri()
Get the Azure Key Vault URI. |
| boolean |
isAiaDownloadDisabled()
Gets whether AIA certificate downloads are disabled. |
| boolean |
isDisableChallengeResourceVerification()
Gets whether challenge resource verification is disabled. |
| boolean |
isRefreshCertificatesWhenHaveUnTrustCertificate()
Gets whether certificates are refreshed when an untrusted certificate is encountered. |
|
Key |
setAccessToken(String accessToken)
Set the access token. |
|
Key |
setCertificateAliasFilterPatterns(Set<String> certificateAliasFilterPatterns)
Sets the certificate alias filter patterns. |
|
Key |
setCertificatesRefreshInterval(Duration certificatesRefreshInterval)
Sets the certificate refresh interval. |
|
Key |
setCertPathCustom(String certPathCustom)
Sets the custom certificate path. |
|
Key |
setCertPathWellKnown(String certPathWellKnown)
Sets the well-known certificate path. |
|
Key |
setRefreshCertificatesWhenHaveUnTrustCertificate(boolean refreshCertificatesWhenHaveUnTrustCertificate)
Sets whether certificates are refreshed when an untrusted certificate is encountered. |
Methods inherited from java.lang.Object
Constructor Details
KeyVaultLoadStoreParameter
public KeyVaultLoadStoreParameter(String keyVaultUri)
Constructor.
Parameters:
KeyVaultLoadStoreParameter
public KeyVaultLoadStoreParameter(String keyVaultUri, String managedIdentity)
Constructor.
Parameters:
KeyVaultLoadStoreParameter
public KeyVaultLoadStoreParameter(String keyVaultUri, String tenantId, String clientId, String clientSecret)
Constructor.
Parameters:
KeyVaultLoadStoreParameter
public KeyVaultLoadStoreParameter(String keyVaultUri, String tenantId, String clientId, String clientSecret, String managedIdentity)
Constructor.
Parameters:
Method Details
disableAiaDownload
public void disableAiaDownload()
Disables AIA certificate downloads.
disableChallengeResourceVerification
public void disableChallengeResourceVerification()
Disables verifying if the authentication challenge resource matches the Key Vault or Managed HSM domain. This verification is performed by default.
fromSystemProperties
public static KeyVaultLoadStoreParameter fromSystemProperties()
Creates a load-store parameter that captures all supported system properties and their defaults.
Returns:
getAccessToken
public String getAccessToken()
Get the access token.
Returns:
getCertificateAliasFilterPatterns
public Set<String> getCertificateAliasFilterPatterns()
Gets the certificate alias filter patterns.
Returns:
getCertificatesRefreshInterval
public Duration getCertificatesRefreshInterval()
Gets the certificate refresh interval.
Returns:
getCertPathCustom
public String getCertPathCustom()
Gets the custom certificate path.
Returns:
getCertPathWellKnown
public String getCertPathWellKnown()
Gets the well-known certificate path.
Returns:
getClientId
public String getClientId()
Get the client id.
Returns:
getClientSecret
public String getClientSecret()
Get the client secret.
Returns:
getManagedIdentity
public String getManagedIdentity()
Get the Managed Identity.
Returns:
getProtectionParameter
public KeyStore.ProtectionParameter getProtectionParameter()
Get the protection parameter.
Returns:
null.getTenantId
public String getTenantId()
Get the tenant id.
Returns:
getUri
public String getUri()
Get the Azure Key Vault URI.
Returns:
isAiaDownloadDisabled
public boolean isAiaDownloadDisabled()
Gets whether AIA certificate downloads are disabled.
Returns:
true if AIA certificate downloads are disabled; otherwise, false.isDisableChallengeResourceVerification
public boolean isDisableChallengeResourceVerification()
Gets whether challenge resource verification is disabled.
Returns:
true if challenge resource verification is disabled; otherwise, false.isRefreshCertificatesWhenHaveUnTrustCertificate
public boolean isRefreshCertificatesWhenHaveUnTrustCertificate()
Gets whether certificates are refreshed when an untrusted certificate is encountered.
Returns:
true if certificates are refreshed; otherwise, false.setAccessToken
public KeyVaultLoadStoreParameter setAccessToken(String accessToken)
Set the access token.
Parameters:
Returns:
setCertificateAliasFilterPatterns
public KeyVaultLoadStoreParameter setCertificateAliasFilterPatterns(Set<String> certificateAliasFilterPatterns)
Sets the certificate alias filter patterns.
Parameters:
Returns:
setCertificatesRefreshInterval
public KeyVaultLoadStoreParameter setCertificatesRefreshInterval(Duration certificatesRefreshInterval)
Sets the certificate refresh interval. Zero or negative intervals disable periodic refresh.
Parameters:
Duration.parse("PT30S").
Returns:
setCertPathCustom
public KeyVaultLoadStoreParameter setCertPathCustom(String certPathCustom)
Sets the custom certificate path.
Parameters:
Returns:
setCertPathWellKnown
public KeyVaultLoadStoreParameter setCertPathWellKnown(String certPathWellKnown)
Sets the well-known certificate path.
Parameters:
Returns:
setRefreshCertificatesWhenHaveUnTrustCertificate
public KeyVaultLoadStoreParameter setRefreshCertificatesWhenHaveUnTrustCertificate(boolean refreshCertificatesWhenHaveUnTrustCertificate)
Sets whether certificates are refreshed when an untrusted certificate is encountered.
Parameters:
Returns: