Skip to content

Auth: Rotate token patch #62676

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

Merged
merged 3 commits into from
Feb 2, 2023
Merged

Conversation

mgyongyosi
Copy link
Contributor

What is this feature?
This PR fixes the rotate token functionality by using a singleflight.Group and making sure that only 1 thread updates the token when multiple parallel request are trying to rotate the same token at the same time. It meant to be an improvement for the short term and we are planning to refactor the whole session token handling part.

Why do we need this feature?

Which issue(s) does this PR fix?:

Fixes #56994

Special notes for your reviewer:

* Align tests
@mgyongyosi mgyongyosi added add to changelog team/identity-access backport v9.4.x Mark PR for automatic backport to v9.4.x labels Feb 1, 2023
@mgyongyosi mgyongyosi added this to the 9.4.0 milestone Feb 1, 2023
@mgyongyosi mgyongyosi requested review from Jguer and kalleep February 1, 2023 12:21
@grafanabot
Copy link
Contributor

Hello @mgyongyosi!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…-rotate-patch
@mgyongyosi mgyongyosi force-pushed the mgyongyosi/auth-token-rotate-patch branch from 8dd4470 to f71a3d9 Compare February 1, 2023 13:33
@mgyongyosi mgyongyosi marked this pull request as ready for review February 1, 2023 15:07
@mgyongyosi mgyongyosi requested a review from a team February 1, 2023 15:07
@mgyongyosi mgyongyosi requested a review from a team as a code owner February 1, 2023 15:07
@mgyongyosi mgyongyosi requested review from papagian, zserge and mildwonkey and removed request for a team February 1, 2023 15:07

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@mgyongyosi mgyongyosi merged commit 7c1d976 into main Feb 2, 2023
@mgyongyosi mgyongyosi deleted the mgyongyosi/auth-token-rotate-patch branch February 2, 2023 13:36
mgyongyosi added a commit that referenced this pull request Feb 2, 2023
* Use singleflight.Group

* Align tests

* Cleanup

(cherry picked from commit 7c1d976)
mgyongyosi added a commit that referenced this pull request Feb 2, 2023
Auth: Rotate token patch (#62676)

* Use singleflight.Group

* Align tests

* Cleanup

(cherry picked from commit 7c1d976)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grafana Login Timeout (v9.2.0)
4 participants