Class AzureKeyVaultKeysReactiveServiceImpl

java.lang.Object
it.pagopa.swclient.mil.azureservices.keyvault.keys.service.AzureKeyVaultKeysReactiveServiceImpl
All Implemented Interfaces:
AzureKeyVaultKeysReactiveService

@ApplicationScoped public class AzureKeyVaultKeysReactiveServiceImpl extends Object implements AzureKeyVaultKeysReactiveService

This service is a kind of wrapper of AzureKeyVaultKeysReactiveClient which implements:

  • the retrieving, caching (done by means of AzureIdentityReactiveService) and renewal (when it expires or when used the resource API returns 401 or 403) of the access token from Microsoft Entra ID that will be used with Azure Key Vault (by means of AzureKeyVaultKeysReactiveClient);
  • the retrying with exponential back-off in case of 429 from Azure Key Vault.

To use this service, the application.properties should have the definition of the following properties to control the back-off policy:

  • azure-key-vault-keys.backoff.initial-duration
  • azure-key-vault-keys.backoff.jitter
  • azure-key-vault-keys.backoff.number-of-attempts

For production profile, be sure that application.properties has azure-key-vault-keys.emulator.enabled=false or azure-key-vault-keys.emulator.enabled isn't present at all, otherwise the Azure Key Vault emulator will be use

Author:
Antonio Tarricone