Commit Graph

22 Commits

Author SHA1 Message Date
Will Hunt
cc7656099d
Fix typo in some instances of enable_registration_token_3pid_bypass. () 2022-05-05 07:11:52 -04:00
Will Hunt
e8d1ec0e92
Add option to enable token registration without requiring 3pids () 2022-04-27 12:57:53 +00:00
Patrick Cloke
4586119f0b
Add missing type hints to config classes. () 2022-04-11 12:07:23 -04:00
Richard van der Hoff
e24ff8ebe3
Remove HomeServer.get_datastore() ()
The presence of this method was confusing, and mostly present for backwards
compatibility. Let's get rid of it.

Part of 
2022-02-23 11:04:02 +00:00
Jonathan de Jong
02632b3504
Stabilise MSC3231 (Token Based Registration) () 2022-02-04 12:15:13 +00:00
Patrick Cloke
a0f48ee89d
Use direct references for configuration variables (part 7). () 2021-10-04 07:18:54 -04:00
Patrick Cloke
e584534403
Use direct references for some configuration variables (part 3) ()
This avoids the overhead of searching through the various
configuration classes by directly referencing the class that
the attributes are in.

It also improves type hints since mypy can now resolve the
types of the configuration variables.
2021-09-23 07:13:34 -04:00
Patrick Cloke
b3590614da
Require type hints in the handlers module. ()
Adds missing type hints to methods in the synapse.handlers
module and requires all methods to have type hints there.

This also removes the unused construct_auth_difference method
from the FederationHandler.
2021-09-20 08:56:23 -04:00
Callum Brown
947dbbdfd1
Implement MSC3231: Token authenticated registration ()
Signed-off-by: Callum Brown <callum@calcuode.com>

This is part of my GSoC project implementing [MSC3231](https://github.com/matrix-org/matrix-doc/pull/3231).
2021-08-21 22:14:43 +01:00
Callum Brown
6e613a10d0
Display an error page during failure of fallback UIA. () 2021-08-18 08:13:35 -04:00
Patrick Cloke
bb4b11846f
Add missing type hints to handlers and fix a Spam Checker type hint. ()
The user_may_create_room_alias method on spam checkers
declared the room_alias parameter as a str when in reality it is
passed a RoomAlias object.
2021-04-29 07:17:28 -04:00
Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ()
Part of 

Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now.

`Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
2021-04-14 15:34:27 +01:00
Richard van der Hoff
789d9ebad3
UI Auth via SSO: redirect the user to an appropriate SSO. ()
If we have integrations with multiple identity providers, when the user does a UI Auth, we need to redirect them to the right one.

There are a few steps to this. First of all we actually need to store the userid of the user we are trying to validate in the UIA session, since the /auth/sso/fallback/web request is unauthenticated.

Then, once we get the /auth/sso/fallback/web request, we can fish the user id out of the session, and use it to look up the external id mappings, and hence pick an SSO provider for them.
2021-01-12 17:38:03 +00:00
Patrick Cloke
c9c0ad5e20
Remove the deprecated Handlers object ()
All handlers now available via get_*_handler() methods on the HomeServer.
2020-10-09 07:24:34 -04:00
Patrick Cloke
eebf52be06
Be stricter about JSON that is accepted by Synapse () 2020-08-19 07:26:03 -04:00
Patrick Cloke
83434df381
Update the auth providers to be async. () 2020-07-23 15:45:39 -04:00
Patrick Cloke
35450519de
Ensure that calls to json.dumps are compatible with the standard library json. () 2020-07-15 13:40:54 -04:00
Patrick Cloke
ef884f6d04
Convert identity handler to async/await. () 2020-05-26 13:46:22 -04:00
Richard van der Hoff
1cb84c6486
Support for routing outbound HTTP requests via a proxy ()
The `http_proxy` and `HTTPS_PROXY` env vars can be set to a `host[:port]` value which should point to a proxy.

The address of the proxy should be excluded from IP blacklists such as the `url_preview_ip_range_blacklist`.

The proxy will then be used for
 * push
 * url previews
 * phone-home stats
 * recaptcha validation
 * CAS auth validation

It will *not* be used for:
 * Application Services
 * Identity servers
 * Outbound federation
 * In worker configurations, connections from workers to masters

Fixes .
2019-11-01 14:07:44 +00:00
Neil Johnson
77dc7093a7 Threepid validity checks on msisdns should not be dependent on 'threepid_behaviour_email'. ()
Fixes 
2019-09-25 12:29:35 +01:00
Richard van der Hoff
990928abde
Stop advertising unsupported flows for registration ()
If email or msisdn verification aren't supported, let's stop advertising them
for registration.

Fixes .
2019-09-25 12:10:26 +01:00
Richard van der Hoff
2cd98812ba
Refactor the user-interactive auth handling ()
Pull the checkers out to their own classes, rather than having them lost in a
massive 1000-line class which does everything.

This is also preparation for some more intelligent advertising of flows, as per 
2019-09-25 11:33:03 +01:00