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

auth: create background clean-up task to delete expired sessions in web_sessions system table #67933

Closed
cameronnunez opened this issue Jul 22, 2021 · 1 comment
Labels
A-authentication Pertains to authn subsystems A-security A-webui Triage label for DB Console (fka admin UI) issues. Add this if nothing else is clear. A-webui-security C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-server-and-security DB Server & Security

Comments

@cameronnunez
Copy link
Contributor

cameronnunez commented Jul 22, 2021

Functionality has been created to purge expired sessions in the web_sessions system table. However, the initial version of this functionality uses LIMIT to avoid a very large initial transaction (a significant number of rows need to be deleted).

We need to implement a clean-up task to purge the lingering rows that may not otherwise be deleted.

May want to do this in the alterSystemWebSessionsCreateIndexes work function in startupmigrations.

Related issue: #51169

@cameronnunez cameronnunez added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-webui-security A-webui Triage label for DB Console (fka admin UI) issues. Add this if nothing else is clear. A-security T-server-and-security DB Server & Security labels Jul 22, 2021
@cameronnunez cameronnunez changed the title auth: create background clean-up task to delete the large backlog of expired entries auth: create background clean-up task to delete the large backlog of expired sessions in web_sessions system table Jul 22, 2021
@cameronnunez cameronnunez changed the title auth: create background clean-up task to delete the large backlog of expired sessions in web_sessions system table auth: create background clean-up task to delete expired sessions in web_sessions system table Jul 22, 2021
@knz knz added the A-authentication Pertains to authn subsystems label Jul 29, 2021
@cameronnunez
Copy link
Contributor Author

cameronnunez commented Aug 12, 2021

Old web sessions are now periodically cleaned up with an async goroutine that is fired off with server creation. This was introduced in #67547.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-authentication Pertains to authn subsystems A-security A-webui Triage label for DB Console (fka admin UI) issues. Add this if nothing else is clear. A-webui-security C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-server-and-security DB Server & Security
Projects
None yet
Development

No branches or pull requests

2 participants