Skip to content

Conversation

@mdtro
Copy link
Contributor

@mdtro mdtro commented Mar 29, 2024

  • Update the UserAuthTokenAuthentication middleware to support hashed token values. As tokens are used, it will store the appropriate hash value.
  • Use an option, apitoken.use-and-update-hash-rate that will apply the code paths using the hashed values for lookups and updating the hashed values on plaintext tokens randomly based on the configured rate.
  • Introduce a temporary option, apitoken.save-hash-on-create. This will be used in the model logic and in pre and post backfill migration tests in the future.

This previously resulted in INC-684 via PR #65941. The hashed_token and hashed_refresh_token columns now have indexes.

@mdtro mdtro changed the title Mdtro/apitoken middleware hash feat: hashed user auth tokens Mar 29, 2024
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 29, 2024
@mdtro mdtro force-pushed the mdtro/apitoken-middleware-hash branch from 9ec71bc to 45aecd6 Compare April 1, 2024 19:33
@mdtro mdtro marked this pull request as ready for review April 1, 2024 20:42
@mdtro mdtro requested review from a team as code owners April 1, 2024 20:42
@mdtro mdtro force-pushed the mdtro/apitoken-middleware-hash branch from 22a57ad to 7fb9623 Compare April 1, 2024 20:42
@mdtro mdtro merged commit db950e3 into master Apr 2, 2024
@mdtro mdtro deleted the mdtro/apitoken-middleware-hash branch April 2, 2024 14:07
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants