Class AzureKeyVaultKeysReactiveServiceDev
- All Implemented Interfaces:
AzureKeyVaultKeysReactiveService
This implementation is used when application.properties
has
azure-key-vault-keys.emulator.enabled=true
. In this case the Azure Key Vault APIs will be
emulated.
Don't use this in production!
- Author:
- Antonio Tarricone
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni
<KeyBundle> createKey
(String keyName, KeyCreateParameters keyCreateParameters) Creates a new key, stores it, then returns key parameters and attributes to the client.io.smallrye.mutiny.Uni
<KeyOperationResult> decrypt
(String keyName, String keyVersion, KeyOperationParameters keyOperationParameters) Decrypts a single block of encrypted data.io.smallrye.mutiny.Uni
<DeletedKeyBundle> Deletes a key of any type from storage in Azure Key Vault.io.smallrye.mutiny.Uni
<KeyOperationResult> encrypt
(String keyName, String keyVersion, KeyOperationParameters keyOperationParameters) Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.io.smallrye.mutiny.Uni
<KeyBundle> Returns the public part of a stored key.io.smallrye.mutiny.Uni
<KeyListResult> getKeys()
Lists keys in the specified vault.io.smallrye.mutiny.Uni
<KeyListResult> Lists keys in the specified vault.io.smallrye.mutiny.Uni
<KeyListResult> getKeyVersions
(String keyName) Returns a list of individual key versions with the same key name.io.smallrye.mutiny.Uni
<KeyListResult> getKeyVersions
(String keyName, String skiptoken) Returns a list of individual key versions with the same key name.(package private) void
reset()
Clear all keys.io.smallrye.mutiny.Uni
<KeyOperationResult> sign
(String keyName, String keyVersion, KeySignParameters keySignParameters) Creates a signature from a digest using the specified key.io.smallrye.mutiny.Uni
<KeyVerifyResult> verify
(String keyName, String keyVersion, KeyVerifyParameters keyVerifyParameters) Verifies a signature using a specified key.
-
Field Details
-
keyVault
-
SUPPORTED_KEY_TYPES
-
SUPPORTED_SIGN_ALGS
-
SUPPORTED_ENC_ALGS
-
UNSUPPORTED_OP_BY_THE_KEY
- See Also:
-
UNSUPPORTED_BY_DEV_IMPL
- See Also:
-
-
Constructor Details
-
AzureKeyVaultKeysReactiveServiceDev
AzureKeyVaultKeysReactiveServiceDev()Constructor.
-
-
Method Details
-
createKey
public io.smallrye.mutiny.Uni<KeyBundle> createKey(String keyName, KeyCreateParameters keyCreateParameters) Description copied from interface:AzureKeyVaultKeysReactiveService
Creates a new key, stores it, then returns key parameters and attributes to the client.
- Specified by:
createKey
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
keyName
- The name for the new key. Regex pattern: ^[0-9a-zA-Z-]+$keyCreateParameters
-KeyCreateParameters
- Returns:
KeyBundle
- See Also:
-
getKeys
Description copied from interface:AzureKeyVaultKeysReactiveService
Lists keys in the specified vault.
- Specified by:
getKeys
in interfaceAzureKeyVaultKeysReactiveService
- Returns:
KeyListResult
- See Also:
-
getKeys
Description copied from interface:AzureKeyVaultKeysReactiveService
Lists keys in the specified vault.
- Specified by:
getKeys
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
skiptoken
- Token to handle paging.- Returns:
KeyListResult
- See Also:
-
getKey
Description copied from interface:AzureKeyVaultKeysReactiveService
Returns the public part of a stored key.
- Specified by:
getKey
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
keyName
- The name of the key to get.keyVersion
- The version of the key.- Returns:
KeyBundle
- See Also:
-
getKeyVersions
Description copied from interface:AzureKeyVaultKeysReactiveService
Returns a list of individual key versions with the same key name.
- Specified by:
getKeyVersions
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
keyName
- The name of the key.- Returns:
KeyListResult
- See Also:
-
getKeyVersions
Description copied from interface:AzureKeyVaultKeysReactiveService
Returns a list of individual key versions with the same key name.
- Specified by:
getKeyVersions
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
keyName
- The name of the key.skiptoken
- Token to handle paging.- Returns:
KeyListResult
- See Also:
-
sign
public io.smallrye.mutiny.Uni<KeyOperationResult> sign(String keyName, String keyVersion, KeySignParameters keySignParameters) Description copied from interface:AzureKeyVaultKeysReactiveService
Creates a signature from a digest using the specified key.
- Specified by:
sign
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
keyName
- The name of the key.keyVersion
- The version of the key.keySignParameters
-KeySignParameters
- Returns:
KeyOperationResult
- See Also:
-
verify
public io.smallrye.mutiny.Uni<KeyVerifyResult> verify(String keyName, String keyVersion, KeyVerifyParameters keyVerifyParameters) Description copied from interface:AzureKeyVaultKeysReactiveService
Verifies a signature using a specified key.
- Specified by:
verify
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
keyName
- The name of the key.keyVersion
- The version of the key.keyVerifyParameters
-KeyVerifyParameters
- Returns:
KeyVerifyResult
- See Also:
-
encrypt
public io.smallrye.mutiny.Uni<KeyOperationResult> encrypt(String keyName, String keyVersion, KeyOperationParameters keyOperationParameters) Description copied from interface:AzureKeyVaultKeysReactiveService
Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.
- Specified by:
encrypt
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
keyName
- The name of the key.keyVersion
- The version of the key.keyOperationParameters
-KeyOperationParameters
- Returns:
KeyOperationResult
- See Also:
-
decrypt
public io.smallrye.mutiny.Uni<KeyOperationResult> decrypt(String keyName, String keyVersion, KeyOperationParameters keyOperationParameters) Description copied from interface:AzureKeyVaultKeysReactiveService
Decrypts a single block of encrypted data.
- Specified by:
decrypt
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
keyName
- The name of the key.keyVersion
- The version of the key.keyOperationParameters
-KeyOperationParameters
- Returns:
KeyOperationResult
- See Also:
-
deleteKey
Description copied from interface:AzureKeyVaultKeysReactiveService
Deletes a key of any type from storage in Azure Key Vault.
- Specified by:
deleteKey
in interfaceAzureKeyVaultKeysReactiveService
- Parameters:
keyName
- The name of the key to delete.- Returns:
DeletedKeyBundle
- See Also:
-
reset
void reset()Clear all keys.
-