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

task(auth): Clean up redis cache after token pruning. #13886

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

dschom
Copy link
Contributor

@dschom dschom commented Aug 4, 2022

Because

  • Tokens could be orphaned by pruning operations.

This pull request

  • Adds step to to prune-tokens script to proactively remove session tokens in Redis that were just pruned from sql.
  • Updates the prune sproc so that the set of affected accounts is relayed back to the token pruner.
  • Drops the pruneInterval arg from the prune sproc since it was no longer used now that this happens out of process.

Issue that this pull request solves

Closes: # (issue number)

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Other information (Optional)

This is a follow up to this PR. There was some feedback that was overlooked. This follow up PR fixes potential pit falls with dumping all session tokens from Redis for impacted users.

@dschom dschom requested a review from a team as a code owner August 4, 2022 20:47
@dschom dschom requested a review from chenba August 4, 2022 20:47
@dschom dschom force-pushed the FXA-5128-trim-excessive-session-tokens-follow-up branch from 0b57390 to 333735c Compare August 4, 2022 21:16
Copy link
Contributor

@chenba chenba left a comment

Choose a reason for hiding this comment

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

Thanks, Dan. Looks good overall. Got a few nit/minor comments.

@dschom dschom force-pushed the FXA-5128-trim-excessive-session-tokens-follow-up branch from 333735c to 3f9b6a4 Compare August 8, 2022 20:58
@dschom dschom force-pushed the FXA-5128-trim-excessive-session-tokens-follow-up branch from 3f9b6a4 to 4bca7a1 Compare August 9, 2022 16:53
Because:
- Tokens could be orphaned by pruning operations.

This Commit:
- Adds step to to prune-tokens script to proactively remove session tokens in Redis that were just pruned from sql.
- Updates the prune sproc so that the set of affected accounts is relayed back to the token pruner.
- Drops the pruneInterval arg from the prune sproc since it was no longer used now that this happens out of process.
@dschom dschom force-pushed the FXA-5128-trim-excessive-session-tokens-follow-up branch from 4bca7a1 to 6a4c636 Compare August 9, 2022 22:26
@dschom dschom merged commit d3139ef into main Aug 10, 2022
@dschom dschom deleted the FXA-5128-trim-excessive-session-tokens-follow-up branch September 23, 2022 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants