TomVaultSecretsProvider class
A TomSecretsProvider over HashiCorp Vault.
Constructors
- TomVaultSecretsProvider({required Uri address, required TomVaultAuth auth, String? namespace, String name = 'vault', Client? httpClient})
-
A provider reaching Vault at
addresswithauth, innamespace(Vault Enterprise) when given, registered asname. -
TomVaultSecretsProvider.fromConfiguration({TomServerConfigResourceProvider? config, Map<
String, String> ? environment}) -
Builds a provider from the
secrets.vaultconfiguration key, falling back to Vault's own environment variables:factory
Properties
- address → Uri
-
Where Vault answers.
final
- auth → TomVaultAuth
-
How the provider authenticates.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name references use for this store (
vault,aws,azure).final - namespace → String?
-
The Vault Enterprise namespace, or
null.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
String method, String path, {Map< String, Object?> ? body, bool authenticated = true}) → Future<Map< String, Object?> > -
Calls Vault's API at
/v1/<path>and answers the decoded body. -
close(
) → Future< void> - Releases anything the provider holds open. The default holds nothing.
-
fetch(
String path) → Future< TomSecretPayload> -
Reads the secret at
path. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- configurationKey → const String
- The configuration key the provider's settings are read from.