forked-synapse/synapse/push
Quentin Gliech fe1daad672
Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986)
This simplifies the access token verification logic by removing the `rights`
parameter which was only ever used for the unsubscribe link in email
notifications. The latter has been moved under the `/_synapse` namespace,
since it is not a standard API.

This also makes the email verification link more secure, by embedding the
app_id and pushkey in the macaroon and verifying it. This prevents the user
from tampering the query parameters of that unsubscribe link.

Macaroon generation is refactored:

- Centralised all macaroon generation and verification logic to the
  `MacaroonGenerator`
- Moved to `synapse.utils`
- Changed the constructor to require only a `Clock`, hostname, and a secret key
  (instead of a full `Homeserver`).
- Added tests for all methods.
2022-06-14 09:12:08 -04:00
..
__init__.py Remove unneeded ActionGenerator class. (#12691) 2022-05-11 07:15:21 -04:00
baserules.py Remove dont_notify from the .m.rule.room.server_acl rule (#12849) 2022-05-24 17:42:32 +01:00
bulk_push_rule_evaluator.py Fix invite notifications for users without pushers (#12840) 2022-05-30 13:14:43 +02:00
clientformat.py Experimental support for MSC3772 (#12740) 2022-05-24 13:23:23 +00:00
emailpusher.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
httppusher.py Rename storage classes (#12913) 2022-05-31 12:17:50 +00:00
mailer.py Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986) 2022-06-14 09:12:08 -04:00
presentable_names.py Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
push_rule_evaluator.py Experimental support for MSC3772 (#12740) 2022-05-24 13:23:23 +00:00
push_tools.py Rename storage classes (#12913) 2022-05-31 12:17:50 +00:00
push_types.py Improved push typing (#11409) 2021-11-30 11:49:20 +00:00
pusher.py Use direct references for some configuration variables (part 3) (#10885) 2021-09-23 07:13:34 -04:00
pusherpool.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
rulekinds.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00