KeyStore Config Source#
This Config Source allows to use a Java KeyStore to load configuration values. It uses an ordinal of 100.
The following dependency is required in the classpath to use the KeyStore Config Source:
<dependency>
<groupId>io.smallrye.config</groupId>
<artifactId>smallrye-config-source-keystore</artifactId>
<version>3.10.0</version>
</dependency>
Create a KeyStore#
The following command creates a simple KeyStore
The -alias my.secret stores the configuration property name my.secret in the KeyStore. The command will
interactively ask for the value to be stored in the KeyStore.
Read the KeyStore#
The KeyStore Config Source supports reading multiple keystore files:
smallrye.config.source.keystore.one.path=keystore-one
smallrye.config.source.keystore.one.password=password
smallrye.config.source.keystore.two.path=keystore-two
smallrye.config.source.keystore.two.password=password
The names are arbitrary and can be any name. The name one and two are used to distinguish both KeyStores.
If a stored configuration property requires a Secret Handler to decode a value, set
the handler name with smallrye.config.source.keystore."name".handler.
Configuration#
| Configuration Property | Type | Default |
|---|---|---|
smallrye.config.source.keystore."name".pathThe KeyStore path. |
String | |
smallrye.config.source.keystore."name".passwordThe KeyStore password. |
String | |
smallrye.config.source.keystore."name".typeThe KeyStore type. |
String | PKCS12 |
smallrye.config.source.keystore."name".handlerAn Optional secret keys handler. |
String | |
smallrye.config.source.keystore."name".aliases."key".nameAn Optional aliases key name. |
String | |
smallrye.config.source.keystore."name".aliases."key".passwordAn Optional aliases key password. |
String | |
smallrye.config.source.keystore."name".aliases."key".handlerAn Optional aliases key secret keys handler. |
String |