summary refs log tree commit diff
path: root/synapse/storage/databases/main/registration.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Implement MSC3231: Token authenticated registration (#10142)Callum Brown2021-08-211-0/+316
| | | | | 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).
* Remove not needed database updates in modify user admin API (#10627)Dirk Klimpel2021-08-191-7/+18
|
* Allow to edit `external_ids` by Edit User admin API (#10598)Dirk Klimpel2021-08-171-0/+22
| | | Signed-off-by: Dirk Klimpel dirk@klimpel.org
* Add `get_userinfo_by_id` method to `ModuleApi` (#9581)Jason Robinson2021-08-041-1/+29
| | | | | | Makes it easier to fetch user details in for example spam checker modules, without needing to use api._store or figure out database interactions. Signed-off-by: Jason Robinson <jasonr@matrix.org>
* Use inline type hints in `http/federation/`, `storage/` and `util/` (#10381)Jonathan de Jong2021-07-151-1/+1
|
* MSC2918 Refresh tokens implementation (#9450)Quentin Gliech2021-06-241-4/+203
| | | | | | | | | | This implements refresh tokens, as defined by MSC2918 This MSC has been implemented client side in Hydrogen Web: vector-im/hydrogen-web#235 The basics of the MSC works: requesting refresh tokens on login, having the access tokens expire, and using the refresh token to get a new one. Signed-off-by: Quentin Gliech <quentingliech@gmail.com>
* Remove unnecessary SystemRandom from SQLBaseStore (#9987)Dan Callahan2021-05-141-1/+2
| | | | | | | | It's not obvious that instances of SQLBaseStore each need their own instances of random.SystemRandom(); let's just use random directly. Introduced by 52839886d664576831462e033b88e5aba4c019e3 Signed-off-by: Dan Callahan <danc@element.io>
* Port "Allow users to click account renewal links multiple times without ↵Andrew Morgan2021-04-191-16/+46
| | | | | hitting an 'Invalid Token' page #74" from synapse-dinsic (#9832) This attempts to be a direct port of https://github.com/matrix-org/synapse-dinsic/pull/74 to mainline. There was some fiddling required to deal with the changes that have been made to mainline since (mainly dealing with the split of `RegistrationWorkerStore` from `RegistrationStore`, and the changes made to `self.make_request` in test code).
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | 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>`
* Consistently check whether a password may be set for a user. (#9636)Dirk Klimpel2021-03-181-0/+1
|
* Convert Requester to attrs (#9586)Richard van der Hoff2021-03-101-3/+3
| | | | | | ... because namedtuples suck Fix up a couple of other annotations to keep mypy happy.
* Refactor to ensure we call check_consistency (#9470)Erik Johnston2021-02-241-3/+16
| | | The idea here is to stop people forgetting to call `check_consistency`. Folks can still just pass in `None` to the new args in `build_sequence_generator`, but hopefully they won't.
* Add the shadow-banning status to the display user admin API. (#9400)Dirk Klimpel2021-02-171-2/+5
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-2/+5
| | | | | | | - 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
* Merge branch 'social_login' into developRichard van der Hoff2021-02-011-20/+20
|\
| * Fix SSO on workers (#9271)Richard van der Hoff2021-02-011-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add an admin API for shadow-banning users. (#9209)Patrick Cloke2021-01-251-0/+29
| | | | | | | | | | | | | | | | | | | | 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.
* | Use execute_batch in more places (#9188)Erik Johnston2021-01-211-1/+1
|/ | | | | * Use execute_batch in more places * Newsfile
* Allow re-using a UI auth validation for a period of time (#8970)Patrick Cloke2020-12-181-0/+38
|
* UIA: offer only available auth flowsRichard van der Hoff2020-12-021-0/+25
| | | | | | | During user-interactive auth, do not offer password auth to users with no password, nor SSO auth to users with no SSO. Fixes #7559.
* Add admin API for logging in as a user (#8617)Erik Johnston2020-11-171-0/+2
|
* Add ability for access tokens to belong to one user but grant access to ↵Erik Johnston2020-10-291-9/+39
| | | | | | | | | | another user. (#8616) We do it this way round so that only the "owner" can delete the access token (i.e. `/logout/all` by the "owner" also deletes that token, but `/logout/all` by the "target user" doesn't). A future PR will add an API for creating such a token. When the target user and authenticated entity are different the `Processed request` log line will be logged with a: `{@admin:server as @bob:server} ...`. I'm not convinced by that format (especially since it adds spaces in there, making it harder to use `cut -d ' '` to chop off the start of log lines). Suggestions welcome.
* Add type hints for account validity handler (#8620)Patrick Cloke2020-10-261-2/+2
| | | This also fixes a bug by fixing handling of an account which doesn't expire.
* Type hints for RegistrationStore (#8615)Erik Johnston2020-10-221-73/+83
|
* Move additional tasks to the background worker, part 4 (#8513)Patrick Cloke2020-10-131-26/+26
|
* Fix message duplication if something goes wrong after persisting the event ↵Erik Johnston2020-10-131-1/+5
| | | | | (#8476) Should fix #3365.
* Move additional tasks to the background worker, part 3 (#8489)Patrick Cloke2020-10-091-8/+3
|
* Add type hints to some handlers (#8505)Patrick Cloke2020-10-091-1/+3
|
* Move additional tasks to the background worker (#8458)Patrick Cloke2020-10-071-93/+91
|
* Add support for MSC2697: Dehydrated devices (#8380)Hubert Chathi2020-10-071-1/+31
| | | | This allows a user to store an offline device on the server and then restore it at a subsequent login.
* Add checks for postgres sequence consistency (#8402)Erik Johnston2020-09-281-0/+3
|
* Allow existing users to login via OpenID Connect. (#8345)Tdxdxoz2020-09-251-2/+2
| | | | | | | Co-authored-by: Benjamin Koch <bbbsnowball@gmail.com> This adds configuration flags that will match a user to pre-existing users when logging in via OpenID Connect. This is useful when switching to an existing SSO system.
* Don't push if an user account has expired (#8353)Mathieu Velten2020-09-231-0/+14
|
* Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-3/+3
| | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* Fix incorrect return signatureAndrew Morgan2020-08-281-1/+1
|
* Convert `event_push_actions`, `registration`, and `roommember` datastores to ↵Patrick Cloke2020-08-281-115/+123
| | | | async (#8197)
* Convert simple_delete to async/await. (#8191)Patrick Cloke2020-08-271-15/+14
|
* Convert calls of async database methods to async (#8166)Patrick Cloke2020-08-271-15/+14
|
* Convert simple_update* and simple_select* to async (#8173)Patrick Cloke2020-08-271-10/+12
|
* Convert simple_select_one and simple_select_one_onecol to async (#8162)Patrick Cloke2020-08-261-5/+5
|
* Don't fail /submit_token requests on incorrect session ID if ↵Brendan Abolivier2020-08-241-6/+19
| | | | | | | | | | | | | | | | | | | request_token_inhibit_3pid_errors is turned on (#7991) * Don't raise session_id errors on submit_token if request_token_inhibit_3pid_errors is set * Changelog * Also wait some time before responding to /requestToken * Incorporate review * Update synapse/storage/databases/main/registration.py Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> * Incorporate review Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* Convert some of the general database methods to async (#8100)Patrick Cloke2020-08-171-5/+3
|
* Add a shadow-banned flag to users. (#8092)Patrick Cloke2020-08-141-1/+8
|
* Remove some unused database functions. (#8085)Patrick Cloke2020-08-141-37/+0
|
* Converts event_federation and registration databases to async/await (#8061)Patrick Cloke2020-08-111-128/+105
|
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-0/+1588