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 classA factory to create aJsonFilesSecretsProviderfrom 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.intGet 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:SecretsProviderGet the priority of thisSecretsProvider. TheSecretsServicewill visit providers in descending order of priority until one returns the requested secret.- Specified by:
getPriorityin interfaceSecretsProvider- Returns:
- the priority of this provider.
-
getSecret
Description copied from interface:SecretsProviderGet the named secret.- Specified by:
getSecretin interfaceSecretsProvider- Parameters:
secretName- the name of the secret- Returns:
- the value of the named secret.
-
describe
Description copied from interface:SecretsProviderDescribe this provider for logging purposes.- Specified by:
describein interfaceSecretsProvider- Returns:
- a description of this provider.
-
toString
-