- Jun 17, 2021
-
-
Marcus authored
Reformat all files with the new version. Signed-off-by:
Marcus Hoffmann <bubu@bubu1.eu>
-
- Jun 09, 2021
-
-
Patrick Cloke authored
-
- Jun 07, 2021
-
-
14mRh4X0r authored
Fixes #1834. `get_new_events_for_appservice` internally calls `get_events_as_list`, which will filter out any rejected events. If all returned events are filtered out, `_notify_interested_services` will return without updating the last handled stream position. If there are 100 consecutive such events, processing will halt altogether. Breaking the loop is now done by checking whether we're up-to-date with `current_max` in the loop condition, instead of relying on an empty `events` list. Signed-off-by:
Willem Mulder <14mRh4X0r@gmail.com>
-
- May 21, 2021
-
-
Erik Johnston authored
-
Andrew Morgan authored
https://github.com/matrix-org/synapse/issues/9962 uncovered that we accidentally removed all but one of the presence updates that we store in the database when persisting multiple updates. This could cause users' presence state to be stale. The bug was fixed in #10014, and this PR just adds a test that failed on the old code, and was used to initially verify the bug. The test attempts to insert some presence into the database in a batch using `PresenceStore.update_presence`, and then simply pulls it out again.
-
- May 12, 2021
-
-
Richard van der Hoff authored
-
- May 11, 2021
-
-
Patrick Cloke authored
This should help ensure that equivalent results are achieved between homeservers querying for the summary of a space. This implements modified MSC1772 rules, according to MSC2946. The different is that the origin_server_ts of the m.room.create event is not used as a tie-breaker since this might not be known if the homeserver is not part of the room.
-
- May 05, 2021
-
-
Erik Johnston authored
-
- Apr 28, 2021
-
-
Erik Johnston authored
Only affects workers. Introduced in #9819. Fixes #9899.
-
- Apr 20, 2021
-
-
Patrick Cloke authored
-
Erik Johnston authored
-
Jonathan de Jong authored
-
- Apr 14, 2021
-
-
Jonathan de Jong authored
Part of #9744 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>`>
-
- Apr 09, 2021
-
-
Patrick Cloke authored
-
- Apr 06, 2021
-
-
Andrew Morgan authored
At the moment, if you'd like to share presence between local or remote users, those users must be sharing a room together. This isn't always the most convenient or useful situation though. This PR adds a module to Synapse that will allow deployments to set up extra logic on where presence updates should be routed. The module must implement two methods, `get_users_for_states` and `get_interested_users`. These methods are given presence updates or user IDs and must return information that Synapse will use to grant passing presence updates around. A method is additionally added to `ModuleApi` which allows triggering a set of users to receive the current, online presence information for all users they are considered interested in. This is the equivalent of that user receiving presence information during an initial sync. The goal of this module is to be fairly generic and useful for a variety of applications, with hard requirements being: * Sending state for a specific set or all known users to a defined set of local and remote users. * The ability to trigger an initial sync for specific users, so they receive all current state.
-
- Mar 18, 2021
-
-
Brendan Abolivier authored
-
- Mar 16, 2021
-
-
Hubbe authored
Allows limiting who can login using OIDC via the claims made from the IdP.
-
Andrew Morgan authored
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`.
-
- Mar 09, 2021
-
-
Richard van der Hoff authored
Apple had to be special. They want a client secret which is generated from an EC key. Fixes #9220. Also fixes #9212 while I'm here.
-
- Mar 04, 2021
-
-
Richard van der Hoff authored
This great big stack of commits is a a whole load of hoop-jumping to make it easier to store additional values in login tokens, and then to actually store the SSO Identity Provider in the login token. (Making use of that data will follow in a subsequent PR.)
-
- Feb 19, 2021
-
-
Patrick Cloke authored
-
Andrew Morgan authored
This PR attempts to eliminate unnecessary presence sending work when your local server joins a room, or when a remote server joins a room your server is participating in by processing state deltas in chunks rather than individually. --- When your server joins a room for the first time, it requests the historical state as well. This chunk of new state is passed to the presence handler which, after filtering that state down to only membership joins, will send presence updates to homeservers for each join processed. It turns out that we were being a bit naive and processing each event individually, and sending out presence updates for every one of those joins. Even if many different joins were users on the same server (hello IRC bridges), we'd send presence to that same homeserver for every remote user join we saw. This PR attempts to deduplicate all of that by processing the entire batch of state deltas at once, instead of only doing each join individually. We process the joins and note down which servers need which presence: * If it was a local user join, send that user's latest presence to all servers in the room * If it was a remote user join, send the presence for all local users in the room to that homeserver We deduplicate by inserting all of those pending updates into a dictionary of the form: ``` { server_name1: {presence_update1, ...}, server_name2: {presence_update1, presence_update2, ...} } ``` Only after building this dict do we then start sending out presence updates.
-
Andrew Morgan authored
This PR adds a homeserver config option, `user_directory.prefer_local_users`, that when enabled will show local users higher in user directory search results than remote users. This option is off by default. Note that turning this on doesn't necessarily mean that remote users will always be put below local users, but they should be assuming all other ranking factors (search query match, profile information present etc) are identical. This is useful for, say, University networks that are openly federating, but want to prioritise local students and staff in the user directory over other random users.
-
AndrewFerr authored
Add off-by-default configuration settings to: - disable putting an invitee's profile info in invite events - disable profile lookup via federation Signed-off-by:
Andrew Ferrazzutti <fair@miscworks.net>
-
- Feb 17, 2021
-
-
Richard van der Hoff authored
Apple want to POST the OIDC auth response back to us rather than using query-params; add the necessary support to make that work.
-
- Feb 16, 2021
-
-
Eric Eastwood authored
- Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
-
Richard van der Hoff authored
Ensure that we lock correctly to prevent multiple concurrent metadata load requests, and generally clean up the way we construct the metadata cache.
-
Patrick Cloke authored
And convert some inlineDeferreds to async-friendly functions.
-
- Feb 11, 2021
-
-
Patrick Cloke authored
This has the side-effect of being able to remove use of `inlineCallbacks` in the test-cases for cleaner tracebacks.
-
Patrick Cloke authored
-
- Feb 03, 2021
-
-
Erik Johnston authored
-
- Feb 01, 2021
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
-
- Jan 29, 2021
-
-
Erik Johnston authored
-
- Jan 15, 2021
-
-
Richard van der Hoff authored
This is the final step for supporting multiple OIDC providers concurrently. First of all, we reorganise the config so that you can specify a list of OIDC providers, instead of a single one. Before: oidc_config: enabled: true issuer: "https://oidc_provider" # etc After: oidc_providers: - idp_id: prov1 issuer: "https://oidc_provider" - idp_id: prov2 issuer: "https://another_oidc_provider" The old format is still grandfathered in. With that done, it's then simply a matter of having OidcHandler instantiate a new OidcProvider for each configured provider.
-
Richard van der Hoff authored
* 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.
-
Richard van der Hoff authored
Again in preparation for handling more than one OIDC provider, add a new caveat to the macaroon used as an OIDC session cookie, which remembers which OIDC provider we are talking to. In future, when we get a callback, we'll need it to make sure we talk to the right IdP. As part of this, I'm adding an idp_id and idp_name field to the OIDC configuration object. They aren't yet documented, and we'll just use the old values by default.
-
- Jan 14, 2021
-
-
Richard van der Hoff authored
The idea here is that we will have an instance of OidcProvider for each configured IdP, with OidcHandler just doing the marshalling of them. For now it's still hardcoded with a single provider.
-
- Jan 13, 2021
-
-
Richard van der Hoff authored
Some light refactoring of OidcHandler, in preparation for bigger things: * remove inheritance from deprecated BaseHandler * add an object to hold the things that go into a session cookie * factor out a separate class for manipulating said cookies
-
- Jan 12, 2021
-
-
Dirk Klimpel authored
This only applies if the user's data is to be erased.
-