Class DefaultKeyVaultKeySigner
java.lang.Object
io.micronaut.azure.secretmanager.signing.DefaultKeyVaultKeySigner
- All Implemented Interfaces:
KeyVaultKeySigner
@Singleton
@Requires(beans=KeyVaultSigningClient.class) @Requires(property="azure.key-vault.keys.enabled",value="true") @Requires(property="azure.key-vault.keys.signing.enabled",value="true")
public class DefaultKeyVaultKeySigner
extends Object
implements KeyVaultKeySigner
Default implementation of
KeyVaultKeySigner.
Constructs key identifiers from the configured vault URL and key name,
delegating the actual signing operation to Azure Key Vault via KeyVaultSigningClient.
- Since:
- 5.13.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultKeyVaultKeySigner(KeyVaultSigningClient keyVaultSigningClient, AzureKeyVaultConfigurationProperties configurationProperties) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Sign the supplied data with the provided key using the default algorithm configured for signing.byte[]sign(@NonNull String keyName, @NonNull com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm algorithm, @NonNull byte[] data) Sign the supplied data with the provided key using the specified algorithm.
-
Constructor Details
-
DefaultKeyVaultKeySigner
public DefaultKeyVaultKeySigner(KeyVaultSigningClient keyVaultSigningClient, AzureKeyVaultConfigurationProperties configurationProperties) - Parameters:
keyVaultSigningClient- Signing client abstractionconfigurationProperties- Configuration properties
-
-
Method Details
-
sign
public byte[] sign(@NonNull @NonNull String keyName, @NonNull @NonNull com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm algorithm, @NonNull @NonNull byte[] data) Description copied from interface:KeyVaultKeySignerSign the supplied data with the provided key using the specified algorithm.- Specified by:
signin interfaceKeyVaultKeySigner- Parameters:
keyName- the key namealgorithm- the signature algorithmdata- the data to sign- Returns:
- the signature bytes
-
sign
Description copied from interface:KeyVaultKeySignerSign the supplied data with the provided key using the default algorithm configured for signing.- Specified by:
signin interfaceKeyVaultKeySigner- Parameters:
keyName- the key namedata- the data to sign- Returns:
- the signature bytes
-