Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vault: renew token earlier #481

Merged
merged 1 commit into from
Aug 22, 2024
Merged

vault: renew token earlier #481

merged 1 commit into from
Aug 22, 2024

Conversation

aead
Copy link
Member

@aead aead commented Aug 21, 2024

This commit changes the Vault token renewal logic to renew a token earlier than 10s before it expires. Now, if the token has a TTL > than 1m (or 30s) the token is renewed 1m (or 30s) before it expires.

This commit also adds a context.Context to the Vault authentication function.

@aead aead requested review from vadmeste and ramondeklein August 21, 2024 12:31
@aead aead force-pushed the vault-token-renewal branch from 447ba08 to 3d1093b Compare August 21, 2024 12:31
Copy link
Contributor

@ramondeklein ramondeklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use token renewal at 80% in more places, so it would be consistent to do so. But if the current 1 minute isn't enough, then clocks differ almost a minute (or more) and that is already a problem.

@aead aead force-pushed the vault-token-renewal branch 2 times, most recently from a2d46c2 to dc4cf65 Compare August 22, 2024 08:16
This commit changes the Vault token renewal logic to renew
a token earlier than 10s before it expires. Now, KES renews
the token once 80% of the token TTL has passed.

This commit also adds a `context.Context` to the Vault authentication
function.

Signed-off-by: Andreas Auernhammer <[email protected]>
@aead aead force-pushed the vault-token-renewal branch from dc4cf65 to e8dffb2 Compare August 22, 2024 09:22
@harshavardhana harshavardhana merged commit c07d23a into master Aug 22, 2024
8 checks passed
@harshavardhana harshavardhana deleted the vault-token-renewal branch August 22, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants