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-24945: audit - add context timeout to audit request #26616

Merged
merged 7 commits into from
Apr 30, 2024

Conversation

peteski22
Copy link

@peteski22 peteski22 commented Apr 24, 2024

As per: #24238, but for auditing requests.

This PR updates the logic used for request and response to check whether the existing context would suffice.

@peteski22 peteski22 added core/audit hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed labels Apr 24, 2024
Copy link

github-actions bot commented Apr 24, 2024

CI Results:
All Go tests succeeded! ✅

@peteski22 peteski22 added this to the 1.17.0-rc milestone Apr 30, 2024
@peteski22 peteski22 marked this pull request as ready for review April 30, 2024 10:15
Copy link

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@ccapurso ccapurso left a comment

Choose a reason for hiding this comment

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

Looks great!

Comment on lines +463 to +469
// isContextViable examines the supplied context to see if its own deadline would
// occur later than a newly created context with a specific timeout.
// If the existing context is viable it can be used 'as-is', if not, the caller
// should consider creating a new context with the relevant deadline and associated
// context values (e.g. namespace) in order to reduce the likelihood that the
// audit system believes there is a failure in audit (and updating its metrics)
// when the root cause is elsewhere.
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor

@kubawi kubawi left a comment

Choose a reason for hiding this comment

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

LGTM

@prabhat-hashi prabhat-hashi modified the milestones: 1.16.3, 1.17.2 Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core/audit hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants