Package io.deephaven.enterprise.secrets
Class JsonFilesSecretsProvider
java.lang.Object
io.deephaven.enterprise.secrets.JsonFilesSecretsProvider
- All Implemented Interfaces:
SecretsProvider
A
SecretsProvider
that sources secrets from a file on disk in Property format.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A factory to create aJsonFilesSecretsProvider
from an XMLElement
. -
Constructor Summary
ConstructorsConstructorDescriptionJsonFilesSecretsProvider
(@NotNull Path secretsPath, int priority, @NotNull String providerName) Create a new instance using the provided path to the secrets file. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()
Describe this provider for logging purposes.int
Get the priority of thisSecretsProvider
.Get the named secret.toString()
-
Constructor Details
-
JsonFilesSecretsProvider
public JsonFilesSecretsProvider(@NotNull @NotNull Path secretsPath, int priority, @NotNull @NotNull String providerName) Create a new instance using the provided path to the secrets file.- Parameters:
secretsPath
- the path to the secrets file.priority
- the priorityproviderName
- the name
-
-
Method Details
-
getPriority
public int getPriority()Description copied from interface:SecretsProvider
Get the priority of thisSecretsProvider
. TheSecretsService
will visit providers in descending order of priority until one returns the requested secret.- Specified by:
getPriority
in interfaceSecretsProvider
- Returns:
- the priority of this provider.
-
getSecret
Description copied from interface:SecretsProvider
Get the named secret.- Specified by:
getSecret
in interfaceSecretsProvider
- Parameters:
secretName
- the name of the secret- Returns:
- the value of the named secret.
-
describe
Description copied from interface:SecretsProvider
Describe this provider for logging purposes.- Specified by:
describe
in interfaceSecretsProvider
- Returns:
- a description of this provider.
-
toString
-