VaultConfigProvider (VaultConfigProvider v0.4.0) View Source
VaultConfigProvider is a release config provider.
This provider expects a path to a config file to load during boot as an
argument: config_providers: [{VaultConfigProvider, []}]
The above configuration goes in a release
or environment
definition in
rel/congfig.exs
, and will result in the given path being expanded during
boot, and evaluated using Mix.Config
.
Any value set as "secret:secret/foo/bar key=baz"
, [path: "secret/foo/bar", key: "baz"]
, or "vault:secret/foo/bar#baz"
will be resolved from Vault.
This provider expects the passed config file to contain configuration for
Vaultex.Client.auth/3
describing authentication parameters:
# using kubernetes auth strategy
config :vaultex,
auth: {:kubernetes, %{jwt: File.read!("/tmp/token"), role: "my_role"}}
# or using a token strategy
config :vaultex,
auth: {:token, {"root"}}
config :vaultex,
auth: {:github, {"github_token"}}
config :vaultex,
auth: {:app_id, {"app_id", "user_id"}}
Link to this section Summary
Functions
Callback implementation for Config.Provider.init/1
.
Callback implementation for Config.Provider.load/2
.
Link to this section Functions
Callback implementation for Config.Provider.init/1
.
Callback implementation for Config.Provider.load/2
.