Skip to content

Commit

Permalink
Merge pull request #247 from ricoberger/fix-used-vault-namespace-for-…
Browse files Browse the repository at this point in the history
…restrict-namespace-feature

Fix Used Vault Namespace for Restrict Namespace Feature
  • Loading branch information
ricoberger authored Jan 23, 2024
2 parents 5a70aae + efbad61 commit a5bb242
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 a5bb242

Please sign in to comment.