Skip to content

Commit

Permalink
Modified dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
divyaac committed May 3, 2024
1 parent 69e9ffd commit 1ab68af
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dependency/vault_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,16 @@ func shimKVv2Path(rawPath, mountPath string) string {
if strings.HasPrefix(p, "data/") || strings.HasPrefix(p, "metadata/") {
return rawPath
}

// If the raw path contains "/data/", it means the namespace on the Vault client
// is different from the namespace prefixing the rawPath. We want to
// keep the rawPath as is, and have the Vault client can pass the namespace as it's header
// so the concatenation is handled by the Vault server.
if strings.Contains(p, "/data/") {
return rawPath

}

return path.Join(mountPath, "data", p)
}
}

0 comments on commit 1ab68af

Please sign in to comment.