Skip to content

Commit

Permalink
Make vault support namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmitchell committed Jun 25, 2020
1 parent a1c235b commit c4e03be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/ddayconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ backends:
# be logged to stdout. You probably only want this if you're debugging.
#trace: true

# (string) An optional Vault enterprise namespace to use for all Vault
# requests.
#namespace: "my-namespace"

# (hash) Options for authorizing to Vault
# Must either provide "token" for Token auth or "role_id" and "secret_id" for AppRole
# If a token is given, it should either have no expiry or be renewable.
Expand Down
4 changes: 3 additions & 1 deletion storage/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type VaultConfig struct {
Address string `yaml:"address"`
InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
CACerts string `yaml:"ca_certs"`
Namespace string `yaml:"namespace"`
BasePath string `yaml:"base_path"`
Trace bool `yaml:"trace"`
Auth struct {
Expand Down Expand Up @@ -97,7 +98,8 @@ func newVaultAccessor(conf VaultConfig) (*VaultAccessor, vaultAuthMetadata, erro
MaxIdleConnsPerHost: runtime.NumCPU(),
},
},
Trace: tracer,
Namespace: conf.Namespace,
Trace: tracer,
}

authType := vaultAuthToken
Expand Down

0 comments on commit c4e03be

Please sign in to comment.