Skip to content

Commit 38e63c0

Browse files
InverseIntegralMarcosDY
authored andcommitted
Support configuring vault namespace (spiffe#5058)
Signed-off-by: Matteo Kamm <[email protected]>
1 parent 035699b commit 38e63c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
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)