-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
reduce calls to DetermineRoleFromLoginRequest from 3 to 1 for aws auth method #22583
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
hashicorp-contributed-pr
If the PR is HashiCorp (i.e. not-community) contributed
label
Aug 28, 2023
CI Results: |
elliesterner
changed the title
reduce calls to DetermineRoleFromLoginRequest from 3 to 1 for aws aut…
reduce calls to DetermineRoleFromLoginRequest from 3 to 1 for aws auth method
Aug 28, 2023
Build Results: |
ncabatoff
reviewed
Aug 28, 2023
Co-authored-by: Nick Cabatoff <[email protected]>
mpalmi
reviewed
Aug 28, 2023
ncabatoff
approved these changes
Aug 28, 2023
mpalmi
reviewed
Aug 28, 2023
changelog/22583.txt
Outdated
@@ -0,0 +1,3 @@ | |||
```release-note:improvement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think technically, we can changelog this as bug
, since it's a performance regression from past versions that we're fixing.
mpalmi
approved these changes
Aug 28, 2023
elliesterner
commented
Aug 28, 2023
marcboudreau
approved these changes
Aug 28, 2023
This was referenced Aug 28, 2023
elliesterner
added a commit
that referenced
this pull request
Aug 28, 2023
…h method (#22583) * reduce calls to DetermineRoleFromLoginRequest from 3 to 1 for aws auth method * change ordering of LoginCreateToken args * replace another determineRoleFromLoginRequest function with role from context * add changelog * Check for role in context if not there make call to DeteremineRoleFromLoginRequest * move context role check below nanmespace check * Update changelog/22583.txt Co-authored-by: Nick Cabatoff <[email protected]> * revert signature to same order * make sure resp is last argument * retrieve role from context closer to where role variable is needed * remove failsafe for role in mfa login * Update changelog/22583.txt --------- Co-authored-by: Nick Cabatoff <[email protected]>
elliesterner
added a commit
that referenced
this pull request
Aug 29, 2023
…h method (#22583) * reduce calls to DetermineRoleFromLoginRequest from 3 to 1 for aws auth method * change ordering of LoginCreateToken args * replace another determineRoleFromLoginRequest function with role from context * add changelog * Check for role in context if not there make call to DeteremineRoleFromLoginRequest * move context role check below nanmespace check * Update changelog/22583.txt Co-authored-by: Nick Cabatoff <[email protected]> * revert signature to same order * make sure resp is last argument * retrieve role from context closer to where role variable is needed * remove failsafe for role in mfa login * Update changelog/22583.txt --------- Co-authored-by: Nick Cabatoff <[email protected]>
elliesterner
added a commit
that referenced
this pull request
Aug 29, 2023
…h method (#22583) (#22594) * reduce calls to DetermineRoleFromLoginRequest from 3 to 1 for aws auth method * change ordering of LoginCreateToken args * replace another determineRoleFromLoginRequest function with role from context * add changelog * Check for role in context if not there make call to DeteremineRoleFromLoginRequest * move context role check below nanmespace check * Update changelog/22583.txt * revert signature to same order * make sure resp is last argument * retrieve role from context closer to where role variable is needed * remove failsafe for role in mfa login * Update changelog/22583.txt --------- Co-authored-by: Ellie <[email protected]> Co-authored-by: Nick Cabatoff <[email protected]>
This was referenced Aug 29, 2023
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main purpose of this PR is to reduce calls to
c.DetermineRoleFromLoginRequest
in order to reduce the latency of login requests.Benchmarking results:
Main
mean: 704.492117ms
:Main with changes from PR
mean: 341.443427ms
:Vault v1.10.4
mean: 180.187269ms
:Fixes #21441.