Skip to content

[HashiVault] - Reuse provider clients when possible #1273

@neggert

Description

@neggert

Describe the solution you'd like
We're using ES to sync secrets from a private Hashicorp Vault instance into our Kubernetes cluster. We're authenticating via LDAP and finding that ES is making lots of requests to the authorization endpoint, despite the fact that the auth endpoint returns a token that is valid for 30 minutes.

Digging into the code a little bit, it seems that the vault client saves this token correctly, but ES creates a new client each time it reconciles each secret. I'd like to see a change to ES so that it re-uses client objects where possible.

What is the added value?
This should reduce the number of authentication requests, which will reduce load on both ends of the connection.

Give us examples of the outcome

For our Hashicorp Vault setup described above, we should only see a request to the auth/ldap endpoint when the current token expires, in our case roughly every 30 minutes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThis issue/Pull Request is stale and will be automatically closedarea/vaultIndicates an issue or PR related to Vault.kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions