forked-synapse/synapse/handlers
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
..
ui_auth UI Auth via SSO: redirect the user to an appropriate SSO. (#9081) 2021-01-12 17:38:03 +00:00
__init__.py Remove the deprecated Handlers object (#8494) 2020-10-09 07:24:34 -04:00
_base.py Simplify the flow for SSO UIA (#8881) 2020-12-08 14:03:38 +00:00
account_data.py Allow moving account data and receipts streams off master (#9104) 2021-01-18 15:47:59 +00:00
account_validity.py Add type hints for account validity handler (#8620) 2020-10-26 14:17:31 -04:00
acme_issuing_service.py Add type hints to various handlers. (#9223) 2021-01-26 10:50:21 -05:00
acme.py Create a SynapseReactor type which incorporates the necessary reactor interfaces. (#9528) 2021-03-08 08:25:43 -05:00
admin.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
appservice.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
auth.py Convert Requester to attrs (#9586) 2021-03-10 18:15:56 +00:00
cas_handler.py Add support for stable MSC2858 API (#9617) 2021-03-16 11:21:26 +00:00
deactivate_account.py Ensure pushers are deleted for deactivated accounts (#9285) 2021-02-25 13:56:55 +00:00
device.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
devicemessage.py Ratelimit cross-user key sharing requests. (#8957) 2021-02-19 13:20:34 -05:00
directory.py Allow spam-checker modules to be provide async methods. (#8890) 2020-12-11 14:05:15 -05:00
e2e_keys.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
e2e_room_keys.py Add type hints to E2E handler. (#9232) 2021-01-28 08:34:19 -05:00
events.py Ratelimit cross-user key sharing requests. (#8957) 2021-02-19 13:20:34 -05:00
federation.py Optimise missing prev_event handling (#9601) 2021-03-15 13:51:02 +00:00
groups_local.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
identity.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
initial_sync.py Add ResponseCache tests. (#9458) 2021-03-08 14:00:07 -05:00
message.py Add configs to make profile data more private (#9203) 2021-02-19 09:50:41 +00:00
oidc_handler.py Handle an empty cookie as an invalid macaroon. (#9620) 2021-03-16 11:29:35 +00:00
pagination.py Fix additional type hints. (#9543) 2021-03-09 07:41:32 -05:00
password_policy.py Add type hints to some handlers (#8505) 2020-10-09 07:20:51 -04:00
presence.py Prevent presence background jobs from running when presence is disabled (#9530) 2021-03-03 10:21:46 +00:00
profile.py Fix style checking due to updated black. 2021-02-19 08:19:54 -05:00
read_marker.py Allow moving account data and receipts streams off master (#9104) 2021-01-18 15:47:59 +00:00
receipts.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
register.py Pass SSO IdP information to spam checker's registration function (#9626) 2021-03-16 12:41:41 +00:00
room_list.py Add ResponseCache tests. (#9458) 2021-03-08 14:00:07 -05:00
room_member_worker.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
room_member.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
room.py Add ResponseCache tests. (#9458) 2021-03-08 14:00:07 -05:00
saml_handler.py Add support for stable MSC2858 API (#9617) 2021-03-16 11:21:26 +00:00
search.py Add type hints to various handlers. (#9223) 2021-01-26 10:50:21 -05:00
set_password.py Add type hints to various handlers. (#9223) 2021-01-26 10:50:21 -05:00
sso.py Add support for stable MSC2858 API (#9617) 2021-03-16 11:21:26 +00:00
state_deltas.py Add type hints to various handlers. (#9223) 2021-01-26 10:50:21 -05:00
stats.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
sync.py Add ResponseCache tests. (#9458) 2021-03-08 14:00:07 -05:00
typing.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
user_directory.py Add back the guard against the user directory stream position not existing. (#9428) 2021-02-18 08:44:19 -05:00