Added flag to disable X-Vault-Token header proxy if client passes the token (#8101)

* Added flag to disable X-Vault-Token header proxy if client passes the token

* Reveresed the flag value to better match the name intent

* Introduced UseAutoAuthTokenRaw for Cache to support triplicate value of true/false/force

Co-authored-by: Clint <catsby@users.noreply.github.com>
This commit is contained in:
Alex Antonov
2020-01-30 09:08:42 -06:00
committed by GitHub
parent 8d123920b3
commit 963e71c33e
10 changed files with 309 additions and 8 deletions

View File

@@ -464,8 +464,10 @@ func (c *AgentCommand) Run(args []string) int {
})
}
var proxyVaultToken = !config.Cache.UseAutoAuthTokenEnforce
// Create the request handler
cacheHandler := cache.Handler(ctx, cacheLogger, leaseCache, inmemSink)
cacheHandler := cache.Handler(ctx, cacheLogger, leaseCache, inmemSink, proxyVaultToken)
var listeners []net.Listener
for i, lnConfig := range config.Listeners {