mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
agent: allow setting auto-auth and vault.namespace separately (#26427)
The new vault.namespace config option seems to always be overridden by the auto-auth namespace, so add an extra check to allow them to be set separately. --------- Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
This commit is contained in:
parent
51ee69d02c
commit
6df779f1ba
2 changed files with 6 additions and 0 deletions
3
changelog/26427.txt
Normal file
3
changelog/26427.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
agent: `vault.namespace` no longer gets incorrectly overridden by `auto_auth.namespace`, if set
|
||||
```
|
||||
|
|
@ -328,6 +328,9 @@ func (c *AgentCommand) Run(args []string) int {
|
|||
client.SetNamespace(config.AutoAuth.Method.Namespace)
|
||||
}
|
||||
templateNamespace = client.Namespace()
|
||||
if !namespaceSetByEnvironmentVariable && config.Vault != nil && config.Vault.Namespace != "" {
|
||||
templateNamespace = config.Vault.Namespace
|
||||
}
|
||||
|
||||
sinkClient, err := client.CloneWithHeaders()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue