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

Backport of reduce calls to DetermineRoleFromLoginRequest from 3 to 1 for aws auth method into release/1.12.x #22594

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #22583 to be assessed for backporting due to the inclusion of the label backport/1.12.x.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@elliesterner
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: POST https://api.github.com/repos/hashicorp/vault/merges: 409 Merge conflict []

The below text is copied from the body of the original PR.


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:
image

Main with changes from PR mean: 341.443427ms:
image

Vault v1.10.4 mean: 180.187269ms:
image


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/reduce-role-resolves-part1/officially-frank-lemming branch from ebfb9f7 to a767ff6 Compare August 28, 2023 21:37
@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/reduce-role-resolves-part1/officially-frank-lemming branch from a767ff6 to ebfb9f7 Compare August 28, 2023 21:37
@hashicorp-cla
Copy link

hashicorp-cla commented Aug 28, 2023

CLA assistant check
All committers have signed the CLA.

@elliesterner elliesterner force-pushed the backport/reduce-role-resolves-part1/officially-frank-lemming branch from 3e3f671 to c14a926 Compare August 28, 2023 23:27
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Aug 28, 2023
@elliesterner elliesterner added this to the 1.12.10 milestone Aug 28, 2023
@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

@elliesterner elliesterner marked this pull request as ready for review August 29, 2023 12:50
…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 <ncabatoff@hashicorp.com>

* 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 <ncabatoff@hashicorp.com>
@elliesterner elliesterner force-pushed the backport/reduce-role-resolves-part1/officially-frank-lemming branch from c14a926 to 68fd29b Compare August 29, 2023 13:22
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@elliesterner elliesterner merged commit aa85a51 into release/1.12.x Aug 29, 2023
90 checks passed
@elliesterner elliesterner deleted the backport/reduce-role-resolves-part1/officially-frank-lemming branch August 29, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

4 participants