Class FileSystemSecretStore.FileSystemSecretStoreBuilder
- java.lang.Object
-
- org.forgerock.secrets.propertyresolver.FileSystemSecretStore.FileSystemSecretStoreBuilder
-
- Enclosing class:
- FileSystemSecretStore
public static final class FileSystemSecretStore.FileSystemSecretStoreBuilder extends Object
A builder for more fluently creating a FileSystemSecretStore.
-
-
Method Summary
-
-
-
Method Detail
-
withSuffix
public FileSystemSecretStore.FileSystemSecretStoreBuilder withSuffix(String suffix)
Sets the file suffix to use when retrieving properties. Defaults to an empty string indicating no suffix.- Parameters:
suffix
- the file suffix- Returns:
- the builder
-
withDirectoryWatcher
public FileSystemSecretStore.FileSystemSecretStoreBuilder withDirectoryWatcher(DirectoryWatcher directoryWatcher)
Sets theDirectoryWatcher
used by the property resolver. Defaults to no directory watcher.- Parameters:
directoryWatcher
- the directory watcher- Returns:
- the builder
-
withDefaultSecretPropertyFormat
public FileSystemSecretStore.FileSystemSecretStoreBuilder withDefaultSecretPropertyFormat(SecretPropertyFormat defaultFormat)
Sets the defaultSecretPropertyFormat
for the secret store. Defaults to the base64-encoded format.- Parameters:
defaultFormat
- the default secret property format- Returns:
- the builder
-
withSecretMappings
public FileSystemSecretStore.FileSystemSecretStoreBuilder withSecretMappings(Map<String,SecretPropertyFormat> secretMappings)
Sets the secrets mapping which is allows specifying individual secret property formats for purposes. Defaults to no overrides and all secrets will use the default secret property format.- Parameters:
secretMappings
- the mapping of secret purposes to their secret property formats- Returns:
- the builder
-
withExpiryDuration
public FileSystemSecretStore.FileSystemSecretStoreBuilder withExpiryDuration(Duration expiryDuration)
Sets the amount of time to allow secrets to be reused until they must be refreshed. Defaults to a duration of 0. Note that this value will be ignored if no Clock is provided.- Parameters:
expiryDuration
- the expiration duration- Returns:
- the builder
-
withClock
public FileSystemSecretStore.FileSystemSecretStoreBuilder withClock(Clock clock)
Sets the clock to determine the expiry deadline. Defaults to null which to disable expiring secrets.- Parameters:
clock
- the clock- Returns:
- the builder
-
build
public FileSystemSecretStore build()
Builds the secret store.- Returns:
- a new secret volume property store
-
-