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

ip_cleanup_scheduler: Make IP and session retention configurable #18757

Merged

Conversation

kescherCode
Copy link
Contributor

@kescherCode kescherCode commented Jul 3, 2022

In #6474, there are mentions of IP addresses being stored for too long (1 year). While this pull request doesn't allow disabling the storage of IP addresses, it would allow instance admins to limit the duration for which IP addresses are stored. In my Catstodon fork, I have deployed and tested these changes already, with success (with an IP address retention of 24 hours, and the Sidekiq job set to run every hour).

This pull request may require the following changes, but I am unsure how to best do them:

  • another env config variable for defining how often the ip_cleanup_scheduler sidekiq job should be run, instead of having to modify sidekiq.yml directly. Or perhaps deriving an optimal value it from IP_RETENTION_PERIOD.
  • A split between handling ip cleanups, session cleanups/terminations and login activity cleanups/deletions, all based on time. Currently, ip_cleanup_scheduler.rb handles all of these.

If this pull request is merged, the docs over at Configuring your environment will also need to be updated.

Copy link

@koutsie koutsie left a comment

Choose a reason for hiding this comment

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

lgtm, documentation needs to be updated to reflect thought.

@shleeable
Copy link
Contributor

@kescherCode Is this only removing the historical data? or will this make people login after the retention period?

@kescherCode
Copy link
Contributor Author

@shleeable Only removes historical data (and sessions not updated for a year, which is the current behaviour of Mastodon)

@Gargron Gargron merged commit 25e0765 into mastodon:main Jul 7, 2022
@kescherCode kescherCode deleted the configurable-ip-and-session-retention branch July 7, 2022 10:43
kadoshita pushed a commit to kadoshita/mastodon that referenced this pull request Nov 19, 2022
ClearlyClaire pushed a commit to ClearlyClaire/mastodon that referenced this pull request Jul 6, 2023
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.

5 participants