Skip to content

[Login] Periodically clear out old UserSession entries #10744

@davidcornu

Description

@davidcornu

Internal discussion

For auditing purposes and in order to help users identify their active sessions, we keep quite a bit of metadata in the user_sessions table:

hcb/db/schema.rb

Lines 2132 to 2138 in 320b029

t.string "device_info"
t.string "os_info"
t.string "timezone"
t.string "ip"
t.bigint "impersonated_by_id"
t.decimal "latitude"
t.decimal "longitude"

At the moment there's no mechanism to clear this data out and its usefulness to us decreases over time. We should pick a threshold and automatically get rid of anything older than that.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions