1
0
Commit Graph

600 Commits

Author SHA1 Message Date
Andrew Morgan
92161ae9ed Merge commit 'e288499c6' into anoa/dinsic_release_1_31_0 2021-04-22 19:02:06 +01:00
Andrew Morgan
9273535ade Merge commit '18ab35284' into anoa/dinsic_release_1_31_0 2021-04-22 18:37:01 +01:00
Andrew Morgan
3518cc79b6 Merge commit '9c715a5f1' into anoa/dinsic_release_1_31_0 2021-04-22 18:33:37 +01:00
Andrew Morgan
27fd9474ae Merge commit 'e19396d62' into anoa/dinsic_release_1_31_0 2021-04-22 18:32:44 +01:00
Andrew Morgan
7bf3a6ee18 Merge commit '2e537a028' into anoa/dinsic_release_1_31_0 2021-04-22 18:31:10 +01:00
Andrew Morgan
159622bd9a Merge commit 'cee4010f9' into anoa/dinsic_release_1_31_0 2021-04-22 18:30:04 +01:00
Andrew Morgan
357f84c952 Merge commit '42a8e8137' into anoa/dinsic_release_1_31_0 2021-04-22 18:27:20 +01:00
Andrew Morgan
53f6ab1c34 Merge commit '2b467d0b6' into anoa/dinsic_release_1_31_0 2021-04-22 17:29:20 +01:00
Andrew Morgan
6714a091ea Merge commit '9de6b9411' into anoa/dinsic_release_1_31_0 2021-04-22 17:28:31 +01:00
Andrew Morgan
23ce9ea383 Merge commit 'd34c6e127' into anoa/dinsic_release_1_31_0 2021-04-22 16:22:57 +01:00
Andrew Morgan
3f8b6e5091 Merge commit '20af31088' into anoa/dinsic_release_1_31_0 2021-04-22 16:22:50 +01:00
Andrew Morgan
527049b71a Merge commit '233c8b9fc' into anoa/dinsic_release_1_31_0 2021-04-22 16:22:21 +01:00
Andrew Morgan
77f011b8fd Merge commit '98a64b7f7' into anoa/dinsic_release_1_31_0 2021-04-22 16:21:11 +01:00
Andrew Morgan
64150ac9ba Merge commit 'a03d71dc9' into anoa/dinsic_release_1_31_0 2021-04-21 16:16:41 +01:00
Andrew Morgan
4c970214af Merge commit '23d701864' into anoa/dinsic_release_1_31_0 2021-04-21 16:16:22 +01:00
Andrew Morgan
c7cd7b4545 Merge commit '0312266ee' into anoa/dinsic_release_1_31_0 2021-04-21 16:16:10 +01:00
Andrew Morgan
52620bdb83 Merge commit '28877fade' into anoa/dinsic_release_1_31_0 2021-04-21 15:09:52 +01:00
Andrew Morgan
59766708cf Fix old-style uses of self.make_request in dinum test code 2021-04-16 15:46:03 +01:00
Andrew Morgan
ec2cab331d Merge commit 'bd30cfe86' into anoa/dinsic_release_1_31_0 2021-04-16 15:45:40 +01:00
Andrew Morgan
7fd80c73cc Merge commit '8388a7fb3' into anoa/dinsic_release_1_31_0 2021-04-16 15:06:31 +01:00
Andrew Morgan
cf1e0196bb Merge commit 'f14428b25' into anoa/dinsic_release_1_31_0 2021-04-16 15:02:53 +01:00
Andrew Morgan
93db8f1992 Merge commit 'cf7d3c90d' into dinsic 2021-04-16 12:33:45 +01:00
Andrew Morgan
0da5273f71 Stabilise all knock-related unstable identifiers that would be in state (#96) 2021-03-23 13:44:34 +00:00
Andrew Morgan
232b324c38 Port "Add support for no_proxy and case insensitive env variables" from mainline to dinsic (#93)
This PR is simply porting https://github.com/matrix-org/synapse/pull/9372 to dinsic.

I also had to bring in https://github.com/matrix-org/synapse/pull/8821 and https://github.com/matrix-org/synapse/pull/9084 for this code to work properly - a sign that we should merge mainline into dinsic again soon.
2021-03-22 17:48:42 +00:00
Andrew Morgan
7a61b0e752 Change knock room version to v7 (#88) 2021-03-18 17:26:13 +00:00
Andrew Morgan
6bf58d8194 Add knocking support (#81)
Implement knocking as defined by https://github.com/matrix-org/matrix-doc/pull/2403

This is the base knocking stuff, taken from https://github.com/matrix-org/synapse/pull/6739
and does not include any public room directory changes.

While knocking hasn't merged yet on mainline due to waiting on getting Complement
into Synapse's CI, the code has been well-tested.
2021-02-09 19:07:00 +00:00
Richard van der Hoff
e288499c60 Social login UI polish (#9301) 2021-02-03 20:31:23 +00:00
Richard van der Hoff
18ab35284a Merge branch 'social_login' into develop 2021-02-01 17:28:37 +00:00
Richard van der Hoff
4167494c90 Replace username picker with a template (#9275)
There's some prelimiary work here to pull out the construction of a jinja environment to a separate function.

I wanted to load the template at display time rather than load time, so that it's easy to update on the fly. Honestly, I think we should do this with all our templates: the risk of ending up with malformed templates is far outweighed by the improved turnaround time for an admin trying to update them.
2021-02-01 15:52:50 +00:00
Richard van der Hoff
9c715a5f19 Fix SSO on workers (#9271)
Fixes #8966.

* Factor out build_synapse_client_resource_tree

Start a function which will mount resources common to all workers.

* Move sso init into build_synapse_client_resource_tree

... so that we don't have to do it for each worker

* Fix SSO-login-via-a-worker

Expose the SSO login endpoints on workers, like the documentation says.

* Update workers config for new endpoints

Add documentation for endpoints recently added (#8942, #9017, #9262)

* remove submit_token from workers endpoints list

this *doesn't* work on workers (yet).

* changelog

* Add a comment about the odd path for SAML2Resource
2021-02-01 15:47:59 +00:00
Richard van der Hoff
f78d07bf00 Split out a separate endpoint to complete SSO registration (#9262)
There are going to be a couple of paths to get to the final step of SSO reg, and I want the URL in the browser to consistent. So, let's move the final step onto a separate path, which we redirect to.
2021-02-01 13:15:51 +00:00
Erik Johnston
f2c1560eca Ratelimit invites by room and target user (#9258) 2021-01-29 16:38:29 +00:00
Erik Johnston
4b73488e81 Ratelimit 3PID /requestToken API (#9238) 2021-01-28 17:39:21 +00:00
Richard van der Hoff
7fa1346f93 Merge branch 'social_login' into develop 2021-01-27 17:27:24 +00:00
Richard van der Hoff
a737cc2713 Implement MSC2858 support (#9183)
Fixes #8928.
2021-01-27 12:41:24 +00:00
Patrick Cloke
4a55d267ee Add an admin API for shadow-banning users. (#9209)
This expands the current shadow-banning feature to be usable via
the admin API and adds documentation for it.

A shadow-banned users receives successful responses to their
client-server API requests, but the events are not propagated into rooms.

Shadow-banning a user should be used as a tool of last resort and may lead
to confusing or broken behaviour for the client.
2021-01-25 14:49:39 -05:00
Mathieu Velten
d2953b3562 Add a parameter to enable/disable freeze feature (#78) 2021-01-21 15:17:40 +01:00
Richard van der Hoff
7447f19702 Prefix idp_id with "oidc-" (#9189)
... to avoid clashes with other SSO mechanisms
2021-01-21 12:25:02 +00:00
Andrew Morgan
e97045613c Ensure we read account validity templates from custom template dir if provided (#77) 2021-01-19 10:07:15 +00:00
Richard van der Hoff
02070c69fa Fix bugs in handling clientRedirectUrl, and improve OIDC tests (#9127, #9128)
* Factor out a common TestHtmlParser

Looks like I'm doing this in a few different places.

* Improve OIDC login test

Complete the OIDC login flow, rather than giving up halfway through.

* Ensure that OIDC login works with multiple OIDC providers

* Fix bugs in handling clientRedirectUrl

 - don't drop duplicate query-params, or params with no value
 - allow utf-8 in query-params
2021-01-18 14:52:49 +00:00
Richard van der Hoff
b5dea8702d Fix test failure due to bad merge
0dd2649c1 (#9112) changed the signature of `auth_via_oidc`. Meanwhile,
26d10331e (#9091) introduced a new test which relied on the old signature of
`auth_via_oidc`. The two branches were never tested together until they landed
in develop.
2021-01-15 18:03:33 +00:00
Richard van der Hoff
0dd2649c12 Improve UsernamePickerTestCase (#9112)
* make the OIDC bits of the test work at a higher level - via the REST api instead of poking the OIDCHandler directly.
* Move it to test_login.py, where I think it fits better.
2021-01-15 13:45:13 +00:00
Richard van der Hoff
26d10331e5 Add a test for wrong user returned by SSO 2021-01-13 20:22:41 +00:00
Richard van der Hoff
233c8b9fce Add a test for UI-Auth-via-SSO (#9082)
* Add complete test for UI-Auth-via-SSO.

* review comments
2021-01-13 20:21:55 +00:00
Dirk Klimpel
7a2e9b549d Remove user's avatar URL and displayname when deactivated. (#8932)
This only applies if the user's data is to be erased.
2021-01-12 16:30:15 -05:00
Richard van der Hoff
8a910f97a4 Add some tests for the IDP picker flow 2021-01-07 14:56:42 +00:00
Richard van der Hoff
bbd04441ed Fix type hints in test_login.py 2021-01-07 14:56:42 +00:00
Richard van der Hoff
3fc2399dbe black-format tests/rest/client/v1/test_login.py
black seems to want to reformat this, despite `black --check` being happy with
it :/
2021-01-07 12:17:37 +00:00
Richard van der Hoff
8d3d264052 Skip unit tests which require optional dependencies (#9031)
If we are lacking an optional dependency, skip the tests that rely on it.
2021-01-07 11:41:28 +00:00
Richard van der Hoff
d2c616a413 Combine the SSO Redirect Servlets (#9015)
* Implement CasHandler.handle_redirect_request

... to make it match OidcHandler and SamlHandler

* Clean up interface for OidcHandler.handle_redirect_request

Make it accept `client_redirect_url=None`.

* Clean up interface for `SamlHandler.handle_redirect_request`

... bring it into line with CAS and OIDC by making it take a Request parameter,
move the magic for `client_redirect_url` for UIA into the handler, and fix the
return type to be a `str` rather than a `bytes`.

* Define a common protocol for SSO auth provider impls

* Give SsoIdentityProvider an ID and register them

* Combine the SSO Redirect servlets

Now that the SsoHandler knows about the identity providers, we can combine the
various *RedirectServlets into a single implementation which delegates to the
right IdP.

* changelog
2021-01-04 18:13:49 +00:00