mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
Agent auto auth wrapping new config checks (#6479)
* Simplify Run(): the function that was being sent over a channel doesn't need to close over anything except latestToken, and we don't need to create a new one each iteration. Instead just pass the relevant items, namely the token and sink to work on. * Disallow the following config combinations: 1. auto_auth.method.wrap_ttl > 0 and multiple file sinks 2. auto_auth.method.wrap_ttl > 0 and single file sink with wrap_ttl > 0 3. auto_auth.method.wrap_ttl > 0 and cache.use_auto_auth_token = true * Expose errors that occur when APIProxy is forwarding request to Vault. * Fix merge issues.
This commit is contained in:
3
command/agent/cache/api_proxy.go
vendored
3
command/agent/cache/api_proxy.go
vendored
@@ -45,6 +45,9 @@ func (ap *APIProxy) Send(ctx context.Context, req *SendRequest) (*SendResponse,
|
||||
ap.logger.Info("forwarding request", "path", req.Request.URL.Path, "method", req.Request.Method)
|
||||
|
||||
resp, err := client.RawRequestWithContext(ctx, fwReq)
|
||||
if resp == nil && err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Before error checking from the request call, we'd want to initialize a SendResponse to
|
||||
// potentially return
|
||||
|
||||
Reference in New Issue
Block a user