Skip to content

Commit 89c8b77

Browse files
Support configuring vault namespace (spiffe#5058)
1 parent 133a0f4 commit 89c8b77

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/server/plugin/keymanager/hashicorpvault/hashicorp_vault.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ type Config struct {
5555
// Configuration for the Token authentication method
5656
TokenAuth *TokenAuthConfig `hcl:"token_auth" json:"token_auth,omitempty"`
5757

58+
// Name of the Vault namespace
59+
Namespace string `hcl:"namespace" json:"namespace"`
60+
5861
// TODO: Support other auth methods
5962
// TODO: Support client certificate and key
6063
}
@@ -145,6 +148,7 @@ func parseAuthMethod(config *Config) (AuthMethod, error) {
145148
func (p *Plugin) genClientParams(method AuthMethod, config *Config) (*ClientParams, error) {
146149
cp := &ClientParams{
147150
VaultAddr: p.getEnvOrDefault(envVaultAddr, config.VaultAddr),
151+
Namespace: p.getEnvOrDefault(envVaultNamespace, config.Namespace),
148152
}
149153

150154
switch method {

0 commit comments

Comments
 (0)