Class ConfigVaultProvider
- java.lang.Object
-
- io.helidon.security.providers.config.vault.ConfigVaultProvider
-
- All Implemented Interfaces:
EncryptionProvider<ConfigVaultProvider.EncryptionConfig>
,SecretsProvider<ConfigVaultProvider.SecretConfig>
,SecurityProvider
public class ConfigVaultProvider extends Object implements SecretsProvider<ConfigVaultProvider.SecretConfig>, EncryptionProvider<ConfigVaultProvider.EncryptionConfig>
Security provider to retrieve secrets directly from configuration and to encrypt/decrypt data using config's security setup.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigVaultProvider.Builder
Fluent API builder forConfigVaultProvider
.static class
ConfigVaultProvider.EncryptionConfig
Configuration of encryption.static class
ConfigVaultProvider.SecretConfig
Configuration of a secret.-
Nested classes/interfaces inherited from interface io.helidon.security.spi.EncryptionProvider
EncryptionProvider.EncryptionSupport
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConfigVaultProvider.Builder
builder()
Create a new builder to configure this provider.static ConfigVaultProvider
create()
Creates the provider with default configuration, supporting encryption if it is configured using environment variables or system properties.static ConfigVaultProvider
create(Config config)
Creates the provider from configuration, supporting encryption if its configuration is found.EncryptionProvider.EncryptionSupport
encryption(Config config)
Create encryption support from configuration.EncryptionProvider.EncryptionSupport
encryption(ConfigVaultProvider.EncryptionConfig providerConfig)
Create encryption support from configuration object.Supplier<Single<Optional<String>>>
secret(Config config)
Create secret supplier from configuration.Supplier<Single<Optional<String>>>
secret(ConfigVaultProvider.SecretConfig providerConfig)
Create secret supplier from configuration object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.security.spi.SecurityProvider
supportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjects
-
-
-
-
Method Detail
-
builder
public static ConfigVaultProvider.Builder builder()
Create a new builder to configure this provider.- Returns:
- a new builder
-
create
public static ConfigVaultProvider create()
Creates the provider with default configuration, supporting encryption if it is configured using environment variables or system properties.- Returns:
- new security provider
-
create
public static ConfigVaultProvider create(Config config)
Creates the provider from configuration, supporting encryption if its configuration is found.- Parameters:
config
- configuration of this provider- Returns:
- new security provider
-
secret
public Supplier<Single<Optional<String>>> secret(Config config)
Description copied from interface:SecretsProvider
Create secret supplier from configuration.- Specified by:
secret
in interfaceSecretsProvider<ConfigVaultProvider.SecretConfig>
- Parameters:
config
- config located on the node of the specific secretconfig
node- Returns:
- supplier to retrieve the secret
-
secret
public Supplier<Single<Optional<String>>> secret(ConfigVaultProvider.SecretConfig providerConfig)
Description copied from interface:SecretsProvider
Create secret supplier from configuration object.- Specified by:
secret
in interfaceSecretsProvider<ConfigVaultProvider.SecretConfig>
- Parameters:
providerConfig
- configuration of a specific secret- Returns:
- supplier to retrieve the secret
-
encryption
public EncryptionProvider.EncryptionSupport encryption(Config config)
Description copied from interface:EncryptionProvider
Create encryption support from configuration.- Specified by:
encryption
in interfaceEncryptionProvider<ConfigVaultProvider.EncryptionConfig>
- Parameters:
config
- config located on the node of the specific encryptionconfig
node- Returns:
- encryption support to encrypt/decrypt
-
encryption
public EncryptionProvider.EncryptionSupport encryption(ConfigVaultProvider.EncryptionConfig providerConfig)
Description copied from interface:EncryptionProvider
Create encryption support from configuration object.- Specified by:
encryption
in interfaceEncryptionProvider<ConfigVaultProvider.EncryptionConfig>
- Parameters:
providerConfig
- configuring a specific encryption- Returns:
- encryption support to encrypt/decrypt
-
-