Make cleaning up pushers depend on the device_id instead of the token_id (#15280)
This makes it so that we rely on the `device_id` to delete pushers on logout, instead of relying on the `access_token_id`. This ensures we're not removing pushers on token refresh, and prepares for a world without access token IDs (also known as the OIDC). This actually runs the `set_device_id_for_pushers` background update, which was forgotten in #13831. Note that for backwards compatibility it still deletes pushers based on the `access_token` until the background update finishes.
Showing
- changelog.d/15280.misc 1 addition, 0 deletionschangelog.d/15280.misc
- synapse/_scripts/synapse_port_db.py 5 additions, 1 deletionsynapse/_scripts/synapse_port_db.py
- synapse/handlers/auth.py 6 additions, 2 deletionssynapse/handlers/auth.py
- synapse/handlers/device.py 2 additions, 0 deletionssynapse/handlers/device.py
- synapse/handlers/register.py 2 additions, 2 deletionssynapse/handlers/register.py
- synapse/push/__init__.py 6 additions, 1 deletionsynapse/push/__init__.py
- synapse/push/pusherpool.py 42 additions, 16 deletionssynapse/push/pusherpool.py
- synapse/rest/admin/users.py 0 additions, 1 deletionsynapse/rest/admin/users.py
- synapse/rest/client/pusher.py 0 additions, 1 deletionsynapse/rest/client/pusher.py
- synapse/storage/databases/main/pusher.py 31 additions, 9 deletionssynapse/storage/databases/main/pusher.py
- synapse/storage/schema/main/delta/74/02_set_device_id_for_pushers_bg_update.sql 19 additions, 0 deletions.../main/delta/74/02_set_device_id_for_pushers_bg_update.sql
- tests/push/test_email.py 3 additions, 3 deletionstests/push/test_email.py
- tests/push/test_http.py 21 additions, 25 deletionstests/push/test_http.py
- tests/replication/test_pusher_shard.py 2 additions, 2 deletionstests/replication/test_pusher_shard.py
- tests/rest/admin/test_user.py 2 additions, 2 deletionstests/rest/admin/test_user.py
Loading
Please register or sign in to comment