Skip to content

Commit

Permalink
Fix Used Vault Namespace for Restrict Namespace Feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ricoberger committed Jan 23, 2024
1 parent 5a70aae commit efbad61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vault/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (c *Client) GetSecret(secretEngine string, path string, keys []string, vers
// already failed.
if c.rootVaultNamespace != "" {
log.WithValues("rootVaultNamespace", c.rootVaultNamespace, "vaultNamespace", vaultNamespace).Info(fmt.Sprintf("Use Vault Namespace to read secret %s", path))
if vaultNamespace != "" {
if vaultNamespace != "" && !c.restrictNamespace {
c.client.SetNamespace(c.rootVaultNamespace + "/" + vaultNamespace)
} else {
c.client.SetNamespace(c.rootVaultNamespace)
Expand Down

0 comments on commit efbad61

Please sign in to comment.