Class OracleCloudVaultConfigurationClient
java.lang.Object
io.micronaut.oraclecloud.discovery.vault.OracleCloudVaultConfigurationClient
- All Implemented Interfaces:
io.micronaut.core.naming.Described
,io.micronaut.discovery.config.ConfigurationClient
@Singleton
@Requires(classes={com.oracle.bmc.secrets.Secrets.class,com.oracle.bmc.vault.Vaults.class}) @Requires(beans={com.oracle.bmc.vault.Vaults.class,com.oracle.bmc.secrets.Secrets.class}) @Requires(property="oci.vault")
public class OracleCloudVaultConfigurationClient
extends Object
implements io.micronaut.discovery.config.ConfigurationClient
A
ConfigurationClient
for Oracle Cloud Vault Configuration.- Since:
- 1.4.0
- Author:
- toddsharp
-
Field Summary
Fields inherited from interface io.micronaut.discovery.config.ConfigurationClient
CONFIGURATION_PREFIX, ENABLED, READ_TIMEOUT
-
Constructor Summary
ConstructorDescriptionOracleCloudVaultConfigurationClient
(OracleCloudVaultConfiguration oracleCloudVaultClientConfiguration, @Nullable ExecutorService executorService, com.oracle.bmc.secrets.Secrets secretsClient, com.oracle.bmc.vault.Vaults vaultsClient) Default Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.context.env.PropertySource>
getPropertySources
(io.micronaut.context.env.Environment environment) Retrieves a publisher of property sources from the Oracle Cloud Vault configuration.
This method iterates over the list of vaults defined in the Oracle Cloud Vault configuration, retrieves the secrets from each vault using the Oracle Cloud Vault API, filters the secrets based on the include and exclude patterns defined in the vault configuration, and returns a publisher of property sources containing the filtered secrets.
If the discovery configuration is disabled, an empty publisher is returned.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.naming.Described
getDescription
-
Constructor Details
-
OracleCloudVaultConfigurationClient
public OracleCloudVaultConfigurationClient(OracleCloudVaultConfiguration oracleCloudVaultClientConfiguration, @Named("blocking") @Nullable @Nullable ExecutorService executorService, com.oracle.bmc.secrets.Secrets secretsClient, com.oracle.bmc.vault.Vaults vaultsClient) Default Constructor.- Parameters:
oracleCloudVaultClientConfiguration
- Oracle CloudVault Client ConfigurationexecutorService
- Executor ServicesecretsClient
- The secrets clientvaultsClient
- The vaults client
-
-
Method Details
-
getPropertySources
public org.reactivestreams.Publisher<io.micronaut.context.env.PropertySource> getPropertySources(io.micronaut.context.env.Environment environment) Retrieves a publisher of property sources from the Oracle Cloud Vault configuration.
This method iterates over the list of vaults defined in the Oracle Cloud Vault configuration, retrieves the secrets from each vault using the Oracle Cloud Vault API, filters the secrets based on the include and exclude patterns defined in the vault configuration, and returns a publisher of property sources containing the filtered secrets.
If the discovery configuration is disabled, an empty publisher is returned.- Specified by:
getPropertySources
in interfaceio.micronaut.discovery.config.ConfigurationClient
- Parameters:
environment
- the Micronaut environment- Returns:
- a publisher of property sources containing the filtered secrets
-
getDescription
- Specified by:
getDescription
in interfaceio.micronaut.core.naming.Described
-