MatrixSynapse/synapse
Andrew Morgan 847ecdd8fa
Pass SSO IdP information to spam checker's registration function (#9626)
Fixes https://github.com/matrix-org/synapse/issues/9572

When a SSO user logs in for the first time, we create a local Matrix user for them. This goes through the register_user flow, which ends up triggering the spam checker. Spam checker modules don't currently have any way to differentiate between a user trying to sign up initially, versus an SSO user (whom has presumably already been approved elsewhere) trying to log in for the first time.

This PR passes `auth_provider_id` as an argument to the `check_registration_for_spam` function. This argument will contain an ID of an SSO provider (`"saml"`, `"cas"`, etc.) if one was used, else `None`.
2021-03-16 12:41:41 +00:00
..
_scripts Strip trailing / from server_url in register_new_matrix_user (#8823) 2020-11-26 10:57:26 +00:00
api Fix additional type hints from Twisted 21.2.0. (#9591) 2021-03-12 11:37:57 -05:00
app Set X-Forwarded-Proto header when frontend-proxy proxies a request (#9539) 2021-03-03 18:49:08 +00:00
appservice Add ResponseCache tests. (#9458) 2021-03-08 14:00:07 -05:00
config Add support for stable MSC2858 API (#9617) 2021-03-16 11:21:26 +00:00
crypto Cache config options in SSL verification (#9255) 2021-01-28 17:38:59 +00:00
events Pass SSO IdP information to spam checker's registration function (#9626) 2021-03-16 12:41:41 +00:00
federation Don't go into federation catch up mode so easily (#9561) 2021-03-15 14:42:40 +00:00
groups Add type hints to groups code. (#9393) 2021-02-17 08:41:47 -05:00
handlers Pass SSO IdP information to spam checker's registration function (#9626) 2021-03-16 12:41:41 +00:00
http Fix remaining mypy issues due to Twisted upgrade. (#9608) 2021-03-15 11:14:39 -04:00
logging Fix additional type hints from Twisted 21.2.0. (#9591) 2021-03-12 11:37:57 -05:00
metrics Fix additional type hints from Twisted upgrade. (#9518) 2021-03-03 15:47:38 -05:00
module_api Record the SSO Auth Provider in the login token (#9510) 2021-03-04 14:44:22 +00:00
push Fix additional type hints from Twisted 21.2.0. (#9591) 2021-03-12 11:37:57 -05:00
replication Fix remaining mypy issues due to Twisted upgrade. (#9608) 2021-03-15 11:14:39 -04:00
res/templates Support not providing an IdP icon when choosing a username. (#9440) 2021-02-19 07:48:46 -05:00
rest Add support for stable MSC2858 API (#9617) 2021-03-16 11:21:26 +00:00
server_notices Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
spam_checker_api Combine `SpamCheckerApi` with the more generic `ModuleApi`. (#8464) 2020-10-07 12:03:26 +01:00
state Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
static Add initial support for a "pick your IdP" page (#9017) 2021-01-05 11:25:28 +00:00
storage Don't go into federation catch up mode so easily (#9561) 2021-03-15 14:42:40 +00:00
streams Make token serializing/deserializing async (#8427) 2020-09-30 20:29:19 +01:00
util Add logging to ObservableDeferred callbacks (#9523) 2021-03-09 11:09:31 +00:00
__init__.py 1.29.0 2021-03-08 13:52:13 +00:00
event_auth.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
notifier.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
python_dependencies.py Add a comment about systemd-python. (#9464) 2021-02-23 13:42:36 +00:00
secrets.py Stop sub-classing object (#8249) 2020-09-04 06:54:56 -04:00
server.py Fix additional type hints from Twisted 21.2.0. (#9591) 2021-03-12 11:37:57 -05:00
types.py Convert Requester to attrs (#9586) 2021-03-10 18:15:56 +00:00
visibility.py Merge pull request #9150 from Yoric/develop-context 2021-02-08 15:53:44 +01:00