Class SecretStorePropertySource

java.lang.Object
org.apache.juneau.commons.secret.SecretStorePropertySource
All Implemented Interfaces:
SensitivePropertySource, PropertySource

Opt-in bridge that exposes a chosen SecretStore as a PropertySource, so a secret can be resolved through the property/$P{...}/@Value machinery only where a consumer deliberately wires it in.

By default a SecretStore is intentionally not part of the general config/SVL namespace — that is what keeps a secret one careless Settings dump or debug log away from disclosure. This adapter is the conscious, greppable exception: attach it as a caller-scoped source (for example a session-scoped PropertySource[] bean on a VarResolverSession) and its bridged keys become resolvable there, and nowhere else.

It implements SensitivePropertySource so any dump/log path that honors that marker redacts its values, and its own toString() never reveals the wrapped store or any secret.

Materialization trade-off. The PropertySource contract returns values as String, so this bridge necessarily converts the retrieved char[] into a String that cannot be explicitly zeroed and may linger in the string pool. That reintroduced exposure is precisely why bridging is opt-in and marked sensitive rather than being the default way to reach a secret.

Since:
10.0.0