mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
agent/auto-auth: Add min_backoff to set first backoff value (#15204)
* Add initial_backoff to auto-auth method * Disable retries in client * Fix bug * Thread initial backoff to CT * Add comment * Change to min_backoff * changelog * remove initial references, review * fix test * Thread max_backoff through * Add doc note for max_backoff/templating
This commit is contained in:
@@ -790,10 +790,19 @@ func (c *AgentCommand) Run(args []string) int {
|
||||
// Start auto-auth and sink servers
|
||||
if method != nil {
|
||||
enableTokenCh := len(config.Templates) > 0
|
||||
|
||||
// Auth Handler is going to set its own retry values, so we want to
|
||||
// work on a copy of the client to not affect other subsystems.
|
||||
clonedClient, err := c.client.Clone()
|
||||
if err != nil {
|
||||
c.UI.Error(fmt.Sprintf("Error cloning client for auth handler: %v", err))
|
||||
return 1
|
||||
}
|
||||
ah := auth.NewAuthHandler(&auth.AuthHandlerConfig{
|
||||
Logger: c.logger.Named("auth.handler"),
|
||||
Client: c.client,
|
||||
Client: clonedClient,
|
||||
WrapTTL: config.AutoAuth.Method.WrapTTL,
|
||||
MinBackoff: config.AutoAuth.Method.MinBackoff,
|
||||
MaxBackoff: config.AutoAuth.Method.MaxBackoff,
|
||||
EnableReauthOnNewCredentials: config.AutoAuth.EnableReauthOnNewCredentials,
|
||||
EnableTemplateTokenCh: enableTokenCh,
|
||||
|
||||
Reference in New Issue
Block a user