summary refs log tree commit diff
path: root/synapse/handlers/register.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '351845452' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-2/+5
|\
| * Collect terms consent from the user during SSO registration (#9276)Richard van der Hoff2021-02-011-0/+2
| |
| * Make importing display name and email optional (#9277)Richard van der Hoff2021-02-011-2/+3
| |
* | Fix mypy check failAndrew Morgan2021-04-221-3/+1
| |
* | Merge commit 'a7a913918' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-201-1/+6
|\|
| * Merge remote-tracking branch 'origin/erikj/as_mau_block' into developErik Johnston2020-12-181-1/+6
| |\
| | * Correctly handle AS registerations and add testErik Johnston2020-12-171-1/+6
| | |
* | | Merge commit 'f14428b25' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-161-1/+1
|\| |
| * | Allow spam-checker modules to be provide async methods. (#8890)David Teller2020-12-111-1/+1
| |/ | | | | | | Spam checker modules can now provide async methods. This is implemented in a backwards-compatible manner.
* | Merge commit '7c4344747' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-111/+115
|\|
| * Properly report user-agent/IP during registration of SSO users. (#8784)Patrick Cloke2020-11-231-99/+115
| | | | | | | | | | This also expands type-hints to the SSO and registration code. Refactors the CAS code to more closely match OIDC/SAML.
| * Add admin API for logging in as a user (#8617)Erik Johnston2020-11-171-10/+14
| |
* | Merged commit 'deff8f628' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-10/+14
| |
* | Merge commit 'ef2d62701' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-5/+11
|\|
| * Add ability for access tokens to belong to one user but grant access to ↵Erik Johnston2020-10-291-2/+5
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge commit '74976a8e4' into dinsicAndrew Morgan2020-12-311-1/+1
|\|
| * Remove the deprecated Handlers object (#8494)Patrick Cloke2020-10-091-1/+1
| | | | | | All handlers now available via get_*_handler() methods on the HomeServer.
* | Merge commit '4325be1a5' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-211-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4325be1a5': Fix missing null character check on guest_access room state Fixed a bug with reactivating users with the admin API (#8362) Admin API for reported events (#8217) Fix wording of deprecation notice in changelog Deprecation warning for synapse admin api being accessible under /_matrix Create function to check for long names in devices (#8364) Add a comment re #1691 Fix a bad merge from release-v1.20.0. (#8354) Admin API for querying rooms where a user is a member (#8306) Catch-up after Federation Outage (bonus): Catch-up on Synapse Startup (#8322) Simplify super() calls to Python 3 syntax. (#8344) Allow appservice users to /login (#8320) Update test logging to be able to accept braces (#8335) Move lint dependencies to extras_require (#8330)
| * Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-1/+1
| | | | | | | | | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* | Merge commit '56efa9ec7' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-3/+27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '56efa9ec7': (22 commits) Fix rate limiting unit tests. (#8167) Add functions to `MultiWriterIdGen` used by events stream (#8164) Do not allow send_nonmember_event to be called with shadow-banned users. (#8158) Changelog fixes Make StreamIdGen `get_next` and `get_next_mult` async (#8161) Wording fixes to 'name' user admin api filter (#8163) Fix missing double-backtick in RST document Search in columns 'name' and 'displayname' in the admin users endpoint (#7377) Add type hints for state. (#8140) Stop shadow-banned users from sending non-member events. (#8142) Allow capping a room's retention policy (#8104) Add healthcheck for default localhost 8008 port on /health endpoint. (#8147) Fix flaky shadow-ban tests. (#8152) Don't fail /submit_token requests on incorrect session ID if request_token_inhibit_3pid_errors is turned on (#7991) Do not apply ratelimiting on joins to appservices (#8139) Micro-optimisations to get_auth_chain_ids (#8132) Allow denying or shadow banning registrations via the spam checker (#8034) Stop shadow-banned users from sending invites. (#8095) Be more tolerant of membership events in unknown rooms (#8110) Improve the error code when trying to register using a name reserved for guests. (#8135) ...
| * Allow denying or shadow banning registrations via the spam checker (#8034)Patrick Cloke2020-08-201-2/+24
| |
| * Improve the error code when trying to register using a name reserved for ↵Patrick Cloke2020-08-201-1/+3
| | | | | | | | guests. (#8135)
* | Merge commit 'e04e465b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-0/+8
|\| | | | | | | | | | | | | | | | | | | * commit 'e04e465b4': Use the default templates when a custom template file cannot be found (#8037) Changelog changes Convert stream database to async/await. (#8074) Add a shadow-banned flag to users. (#8092) Convert pusher databases to async/await. (#8075) Convert receipts and events databases to async/await. (#8076)
| * Add a shadow-banned flag to users. (#8092)Patrick Cloke2020-08-141-0/+8
| |
* | Merge commit '3b415e23a' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-1/+1
|\| | | | | | | | | * commit '3b415e23a': Convert replication code to async/await. (#7987)
| * Convert replication code to async/await. (#7987)Patrick Cloke2020-08-031-1/+1
| |
* | Merge commit 'de119063f' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-9/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'de119063f': (31 commits) Convert room list handler to async/await. (#7912) Element CSS and logo in email templates (#7919) Lint the contrib/ directory in CI and linting scripts, add synctl to linting script (#7914) Remove unused code from synapse.logging.utils. (#7897) Fix a typo in the sample config. (#7890) Fix deprecation warning: import ABC from collections.abc (#7892) Change sample config's postgres user to synapse_user (#7889) Fix deprecation warning due to invalid escape sequences (#7895) Remove Ubuntu Eoan that is now EOL (#7888) Fix the trace function for async functions. (#7872) Add help for creating a user via docker (#7885) Switch to Debian:Slim from Alpine for the docker image (#7839) Stop using 'device_max_stream_id' (#7882) Fix TypeError in synapse.notifier (#7880) Add a default limit (of 100) to get/sync operations. (#7858) Change "unknown room ver" logging to warning. (#7881) Convert device handler to async/await (#7871) Convert synapse.app to async/await. (#7868) Convert _base, profile, and _receipts handlers to async/await (#7860) Add admin endpoint to get members in a room. (#7842) ...
| * Use a postgres sequence to generate guest user IDsRichard van der Hoff2020-07-161-21/+1
| |
* | Merge commit 'dc80a0762' into dinsicAndrew Morgan2020-08-031-62/+168
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'dc80a0762': 1.16.0rc1 Back out MSC2625 implementation (#7761) Additional configuration options for auto-join rooms (#7763) Add some metrics for inbound and outbound federation processing times (#7755) Explain the purpose of the "tests" conditional dependency requirement (#7751) Add another yield point to state res v2 (#7746) Move flake8 to end. Don't exit script on failure (#7738) Make tox actions work on Debian 10 (#7703) Yield during large v2 state res. (#7735) add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675) Set Content-Length for Metrics requests (#7730) Sync ignored table names in synapse_port_db to current database schema (#7717) Allow local media to be marked as safe from being quarantined. (#7718) Convert directory handler to async/await (#7727) Speed up state res v2 across large state differences. (#7725)
| * Additional configuration options for auto-join rooms (#7763)Patrick Cloke2020-06-301-62/+168
| |
* | Add option to autobind user's email on registration (#51)Andrew Morgan2020-07-021-24/+21
| | | | | | | | | | Adds an option, `bind_new_user_emails_to_sydent`, which uses Sydent's [internal bind api](https://github.com/matrix-org/sydent#internal-bind-and-unbind-api) to automatically bind email addresses of users immediately after they register. This is quite enterprise-specific, but could be generally useful to multiple organizations. This aims to solve the problem of requiring users to verify their email twice when using the functionality of an identity server in a corporate deployment - where both the homeserver and identity server are controlled. It does with while eliminating the need for the `account_threepid_delegates.email` option, which historically has been a very complicated option to reason about.
* | Merge branch 'release-v1.15.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-241-100/+71
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.15.x * 'release-v1.15.0' of github.com:matrix-org/synapse: (55 commits) 1.15.0 Fix some attributions Update CHANGES.md 1.15.0rc1 Revert "1.15.0rc1" 1.15.0rc1 Fix bug in account data replication stream. (#7656) Convert the registration handler to async/await. (#7649) Accept device information at the login fallback endpoint. (#7629) Convert user directory handler and related classes to async/await. (#7640) Add an option to disable autojoin for guest accounts (#6637) Clarifications to the admin api documentation (#7647) Update to the stable SSO prefix for UI Auth. (#7630) Fix type information on `assert_*_is_admin` methods (#7645) Remove some unused constants. (#7644) Typo fixes. Allow new users to be registered via the admin API even if the monthly active user limit has been reached (#7263) Add device management to admin API (#7481) Attempt to fix PhoneHomeStatsTestCase.test_performance_100 being flaky. (#7634) Support CS API v0.6.0 (#6585) ...
| * Convert the registration handler to async/await. (#7649)Patrick Cloke2020-06-081-66/+41
| |
| * Convert user directory handler and related classes to async/await. (#7640)Patrick Cloke2020-06-051-2/+4
| |
| * Add an option to disable autojoin for guest accounts (#6637)Travis Ralston2020-06-051-1/+7
| | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/3177
| * Allow new users to be registered via the admin API even if the monthly ↵Dirk Klimpel2020-06-051-1/+6
| | | | | | | | active user limit has been reached (#7263)
| * Performance improvements and refactor of Ratelimiter (#7595)Andrew Morgan2020-06-051-8/+1
| | | | | | | | | | | | | | | | | | | | While working on https://github.com/matrix-org/synapse/issues/5665 I found myself digging into the `Ratelimiter` class and seeing that it was both: * Rather undocumented, and * causing a *lot* of config checks This PR attempts to refactor and comment the `Ratelimiter` class, as well as encourage config file accesses to only be done at instantiation. Best to be reviewed commit-by-commit.
| * Check if the localpart is reserved for guests earlier in the registration ↵Brendan Abolivier2020-06-031-9/+9
| | | | | | | | | | flow (#7625) This is so the user is warned about the username not being valid as soon as possible, rather than only once they've finished UIA.
* | Prevent M_USER_IN_USE from being raised by registration methods until after ↵Andrew Morgan2020-06-221-1/+15
| | | | | | | | | | | | email has been verified (#48) * Just ignore the `username` parameter on registration as it's not used by DINUM * Have `/register/available` always return `true`
* | Performance improvements to marking expired users as inactive (#47)Andrew Morgan2020-06-191-1/+1
| | | | | | This is a performance-related improvement to #13, which queried and hid active *and* already inactive users, one-by-one. This PR updates the code to query only **active**, expired users, all at once, and then mark them as inactive, all at once.
* | Merge branch 'release-v1.14.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-101-10/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.14.x * 'release-v1.14.0' of github.com:matrix-org/synapse: (108 commits) Fix typo in PR link Update debian changelog 1.14.0 Improve changelog wording 1.14.0rc2 Fix sample config docs error (#7581) Fix up comments Fix specifying cache factors via env vars with * in name. (#7580) Don't apply cache factor to event cache. (#7578) Ensure ReplicationStreamer is always started when replication enabled. (#7579) Remove the changes to the debian changelog Not full release yet, this is rc1 Merge event persistence move changelog entries More changelog fix Changelog fixes 1.14.0 Replace device_27_unique_idx bg update with a fg one (#7562) Fix incorrect exception handling in KeyUploadServlet.on_POST (#7563) Fix recording of federation stream token (#7564) Simplify reap_monthly_active_users (#7558) ...
* | Merge branch 'release-v1.13.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-101-51/+49
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.14.x * 'release-v1.13.0' of github.com:matrix-org/synapse: (257 commits) Update changelog based on feedback. Move warnings in the changelog and re-iterate changes to branches. 1.13.0 update dh-virtualenv (#7526) 1.13.0rc3 Hash passwords earlier in the registration process (#7523) 1.13.0rc2 1.13.0rc2 Stop `get_joined_users` corruption from custom statuses (#7376) Do not validate that the client dict is stable during UI Auth. (#7483) Fix new flake8 errors (#7489) Don't UPGRADE database rows RST indenting Put rollback instructions in upgrade notes Fix changelog typo Oh yeah, RST Absolute URL it is then Fix upgrade notes link Provide summary of upgrade issues in changelog. Fix ) Move next version notes from changelog to upgrade notes ...
| * Hash passwords earlier in the registration process (#7523)Patrick Cloke2020-05-181-7/+2
| |
| * async/await is_server_admin (#7363)Andrew Morgan2020-05-011-27/+22
| |
| * Convert auth handler to async/await (#7261)Patrick Cloke2020-04-151-7/+21
| |
* | apply lintingAndrew Morgan2020-05-141-6/+6
| |
* | Simplify auto-bind email to IS hackAndrew Morgan2020-04-241-12/+6
| |
* | Remove protocol scheme from email delegateAndrew Morgan2020-04-241-1/+12
| | | | | | | | This is an update to the commit ef8e78c1e623db5df97c7401bc5af9960946915e
* | Remove bind_email param from dinsic-specific codeAndrew Morgan2020-04-241-1/+0
| |
* | HACK: Bind email to identity server when using it for 3pid delegationAndrew Morgan2020-04-241-1/+27
| |
* | Fix some broken referencesAndrew Morgan2020-04-241-4/+4
| |
* | Kill off RegistrationError (#6691)Andrew Morgan2020-03-231-9/+3
|\| | | | | | | | | * commit '326c893d2': Kill off RegistrationError (#6691)
| * Kill off RegistrationError (#6691)Richard van der Hoff2020-01-131-9/+3
| | | | | | This is pretty pointless. Let's just use SynapseError.
* | Don't assign numeric IDs for empty usernames (#6690)Andrew Morgan2020-03-231-1/+1
|\| | | | | | | | | * commit '2d07c7377': Don't assign numeric IDs for empty usernames (#6690)
| * Don't assign numeric IDs for empty usernames (#6690)Richard van der Hoff2020-01-131-1/+1
| | | | | | | | Fix a bug where we would assign a numeric userid if somebody tried registering with an empty username
* | Merge pull request #6441 from syamgk/fix-parameter-mismatchAndrew Morgan2020-03-191-1/+1
|\| | | | | | | | | | | * commit 'b9449012d': Add changelog file Issue #6406 Fix parameter mismatch
| * Issue #6406 Fix parameter mismatchSyam G Krishnan2019-12-041-1/+1
| | | | | | | | Signed-off-by: Syam G Krishnan <syamgk01@gmail.com>
* | Replace instance variations of homeserver with correct case/spacing (#6357)Andrew Morgan2020-03-181-1/+1
|\| | | | | | | | | | | | | | | * commit '6e1b40dc2': sample config Add changelog A couple more instances Replace instance variations of homeserver with correct case/spacing
| * Replace instance variations of homeserver with correct case/spacingAndrew Morgan2019-11-121-1/+1
| |
* | Make numeric user_id checker start at @0, and don't ratelimit on checking ↵Andrew Morgan2020-03-181-17/+32
|\| | | | | | | (#6338)
| * raise exception after multiple failuresAndrew Morgan2019-11-061-3/+10
| |
| * Address review commentsAndrew Morgan2019-11-061-12/+12
| |
| * Don't forget to ratelimit calls outside of RegistrationHandlerAndrew Morgan2019-11-061-2/+2
| |
| * Numeric ID checker now checks @0, don't ratelimit on checkingAndrew Morgan2019-11-061-16/+25
| |
* | Update black to 19.10b0 (#6304)Andrew Morgan2020-03-161-2/+2
|\| | | | | | | | | * commit '020add509': Update black to 19.10b0 (#6304)
| * Update black to 19.10b0 (#6304)Amber Brown2019-11-011-2/+2
| | | | | | * update version of black and also fix the mypy config being overridden
* | Merge pull request #6161 from matrix-org/erikj/dont_regen_user_id_on_failureAndrew Morgan2020-02-261-6/+4
|\|
| * Remove unused variableErik Johnston2019-10-031-2/+0
| |
| * Don't regenerate numeric user ID if registration fails.Erik Johnston2019-10-031-4/+4
| | | | | | | | | | This causes huge amounts of DB IO if registrations start to fail e.g. because the DB is struggling with IO.
* | Merge pull request #6004 from matrix-org/jaywink/autojoin-create-real-usersAndrew Morgan2020-02-251-8/+4
|\|
| * Only count real users when checking for auto-creation of auto-join roomJason Robinson2019-09-091-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | Previously if the first registered user was a "support" or "bot" user, when the first real user registers, the auto-join rooms were not created. Fix to exclude non-real (ie users with a special user type) users when counting how many users there are to determine whether we should auto-create a room. Signed-off-by: Jason Robinson <jasonr@matrix.org>
* | Remove bind_email and bind_msisdn (#5964)Andrew Morgan2020-02-251-44/+6
|\|
| * Remove bind_email and bind_msisdn (#5964)Andrew Morgan2019-09-041-44/+6
| | | | | | Removes the `bind_email` and `bind_msisdn` parameters from the `/register` C/S API endpoint as per [MSC2140: Terms of Service for ISes and IMs](https://github.com/matrix-org/matrix-doc/pull/2140/files#diff-c03a26de5ac40fb532de19cb7fc2aaf7R107).
* | Ensure the list media admin API is always available (#5966)Andrew Morgan2020-02-251-3/+1
|\|
| * Fix docstringAndrew Morgan2019-09-031-2/+1
| |
| * Remove unnecessary variable declarationAndrew Morgan2019-09-031-1/+0
| |
* | Remove unused methods from c/s api v1 in register.py (#5963)Andrew Morgan2020-02-241-185/+0
|\|
| * Remove unused methods from c/s api v1 in register.py (#5963)Andrew Morgan2019-09-021-104/+0
| | | | | | These methods were part of the v1 C/S API. Remove them as they are no longer used by any code paths.
* | Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2020-02-241-1/+1
|\|
| * Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-1/+1
| | | | | | | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
| * Revert "Add "require_consent" parameter for registration"Brendan Abolivier2019-08-221-12/+2
| | | | | | | | This reverts commit 3320aaab3a9bba3f5872371aba7053b41af9d0a0.
| * Add "require_consent" parameter for registrationHalf-Shot2019-08-221-2/+12
| |
* | Replace returnValue with return (#5736)Andrew Morgan2020-02-191-8/+8
|\|
| * Replace returnValue with return (#5736)Amber Brown2019-07-231-8/+8
| |
* | Implement access token expiry (#5660)Andrew Morgan2020-02-171-11/+24
|\|
| * Implement access token expiry (#5660)Richard van der Hoff2019-07-121-11/+24
| | | | | | | | Record how long an access token is valid for, and raise a soft-logout once it expires.
* | Remove access-token support from RegistrationStore.register (#5642)Andrew Morgan2020-02-171-1/+1
|\|
| * Remove access-token support from RegistrationStore.register (#5642)Richard van der Hoff2019-07-101-1/+1
| | | | | | | | | | The 'token' param is no longer used anywhere except the tests, so let's kill that off too.
* | Remove access-token support from RegistrationHandler.register (#5641)Andrew Morgan2020-02-171-24/+3
|\|
| * Remove access-token support from RegistrationHandler.register (#5641)Richard van der Hoff2019-07-081-24/+3
| | | | | | | | | | | | | | | | Nothing uses this now, so we can remove the dead code, and clean up the API. Since we're changing the shape of the return value anyway, we take the opportunity to give the method a better name.
* | Better logging for auto-join. (#5643)Andrew Morgan2020-02-171-0/+7
|\|
| * Better logging for auto-join. (#5643)Richard van der Hoff2019-07-081-0/+7
| | | | | | It was pretty unclear what was going on, so I've added a couple of log lines.
| * Move get_or_create_user to test code (#5628)Richard van der Hoff2019-07-081-51/+0
| | | | | | This is only used in tests, so...
* | Remove support for invite_3pid_guest. (#5625)Andrew Morgan2020-02-171-30/+0
|\|
| * Remove support for invite_3pid_guest. (#5625)Richard van der Hoff2019-07-051-30/+0
| | | | | | | | | | | | | | | | | | This has never been documented, and I'm not sure it's ever been used outside sytest. It's quite a lot of poorly-maintained code, so I'd like to get rid of it. For now I haven't removed the database table; I suggest we leave that for a future clearout.
* | Run Black. (#5482)Andrew Morgan2020-02-131-5/+1
|\|
| * Run Black. (#5482)Amber Brown2019-06-201-123/+101
| |
* | Dinsic Blacking with black==18.6b2Andrew Morgan2020-02-111-144/+123
| |
* | Merge branch 'dinsic' into babolivier/userdir_hide_usersBrendan Abolivier2019-06-121-1/+12
|\ \
| * | Merge branch 'master' into dinsicBrendan Abolivier2019-06-121-0/+2
| |\|
| | * Limit displaynames and avatar URLsRichard van der Hoff2019-06-011-0/+2
| | | | | | | | | | | | | | | | | | These end up in join events everywhere, so let's limit them. Fixes #5079
| * | Merge branch 'master' into dinsicBrendan Abolivier2019-06-111-1/+10
| |\|
| | * Limit UserIds to a length that fits in a state key (#5198)ReidAnderson2019-05-201-1/+10
| | |
* | | Fix variable definitionBrendan Abolivier2019-06-101-1/+1
| | |
* | | Fix conditionBrendan Abolivier2019-06-101-1/+1
| | |
* | | Hide new users from the user directory if enabled in the server config.Brendan Abolivier2019-06-101-0/+10
|/ /
* | Merge branch 'develop' into dinsicAndrew Morgan2019-04-151-0/+17
|\|
| * Allow password providers to bind emails (#4947)Andrew Morgan2019-03-281-0/+17
| | | | | | This PR allows password provider modules to bind email addresses when a user is registering and is motivated by matrix-org/matrix-synapse-ldap3#58
* | Merge branch 'master' of github.com:matrix-org/synapse into dinsicErik Johnston2019-04-051-5/+5
|\|
| * Support 3PID login in password providers (#4931)Andrew Morgan2019-03-261-5/+5
| | | | | | | | | | Adds a new method, check_3pid_auth, which gives password providers the chance to allow authentication with third-party identifiers such as email or msisdn.
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dinsic-mergedErik Johnston2019-03-211-9/+37
|\|
| * fix test_auto_create_auto_join_where_no_consent (#4886)Neil Johnson2019-03-191-0/+5
| |
| * Add ratelimiting on login (#4821)Brendan Abolivier2019-03-151-2/+2
| | | | | | Add two ratelimiters on login (per-IP address and per-userID).
| * Make registration ratelimiter separate from the main events oneBrendan Abolivier2019-03-061-1/+1
| |
| * Revert "Split ratelimiters in two (one for events, one for registration)"Brendan Abolivier2019-03-061-1/+1
| | | | | | | | This reverts commit d7dbad3526136cfc9fdbd568635be5016fb637db.
| * Split ratelimiters in two (one for events, one for registration)Brendan Abolivier2019-03-051-1/+1
| |
| * Add rate-limiting on registration (#4735)Brendan Abolivier2019-03-051-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rate-limiting for registration * Add unit test for registration rate limiting * Add config parameters for rate limiting on auth endpoints * Doc * Fix doc of rate limiting function Co-Authored-By: babolivier <contact@brendanabolivier.com> * Incorporate review * Fix config parsing * Fix linting errors * Set default config for auth rate limiting * Fix tests * Add changelog * Advance reactor instead of mocked clock * Move parameters to registration specific config and give them more sensible default values * Remove unused config options * Don't mock the rate limiter un MAU tests * Rename _register_with_store into register_with_store * Make CI happy * Remove unused import * Update sample config * Fix ratelimiting test for py2 * Add non-guest test
* | Merge branch 'master' of github.com:matrix-org/synapse into ↵Erik Johnston2019-03-151-37/+365
|\| | | | | | | erikj/dinsic-merged-master
| * switch from google.com to recaptcha.net for reCAPTCHA (#4731)Matthew Hodgson2019-02-251-2/+2
| | | | | | | | | | | | | | | | * add trivial clarification about jemalloc * switch from google.com to recaptcha.net because https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally
| * Fix registration on workers (#4682)Erik Johnston2019-02-201-5/+195
| | | | | | | | | | | | | | | | | | | | * Move RegistrationHandler init to HomeServer * Move post registration actions to RegistrationHandler * Add post regisration replication endpoint * Newsfile
| * Move register_device into handlerErik Johnston2019-02-181-4/+47
| |
| * Split out registration to workerErik Johnston2019-02-181-4/+59
| | | | | | | | | | | | | | | | This allows registration to be handled by a worker, though the actual write to the database still happens on master. Note: due to the in-memory session map all registration requests must be handled by the same worker.
| * create support user (#4141)Neil Johnson2018-12-141-2/+13
| | | | | | | | | | | | Allow for the creation of a support user. A support user can access the server, join rooms, interact with other users, but does not appear in the user directory nor does it contribute to monthly active user limits.
| * Initialise user displayname from SAML2 data (#4272)Richard van der Hoff2018-12-071-7/+16
| | | | | | | | | | When we register a new user from SAML2 data, initialise their displayname correctly.
| * Rip out half-implemented m.login.saml2 support (#4265)Richard van der Hoff2018-12-061-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * Rip out half-implemented m.login.saml2 support This was implemented in an odd way that left most of the work to the client, in a way that I really didn't understand. It's going to be a pain to maintain, so let's start by ripping it out. * drop undocumented dependency on dateutil It turns out we were relying on dateutil being pulled in transitively by pysaml2. There's no need for that bloat.
| * Neilj/fix autojoin (#4223)Neil Johnson2018-11-281-2/+21
| | | | | | | | | | | | * Fix auto join failures for servers that require user consent * Fix auto join failures for servers that require user consent
| * Delete the disused & unspecced identicon functionality (#4106)Amber Brown2018-10-291-3/+0
| |
| * Make room_member_handler a member of RoomCreationHandlerRichard van der Hoff2018-10-251-2/+4
| | | | | | | | ... to save passing it into `_send_events_for_new_room`
* | When performing shadow registration, don't inhibit login. (#4385) dinsic_2019-01-15Michael Kaye2019-01-141-1/+1
| |
* | Synchronise account metadata onto another server. (#4145) dinsic_2019-01-11Matthew Hodgson2019-01-111-3/+49
| | | | | | | | | | * implement shadow registration via AS (untested) * shadow support for 3pid binding/unbinding (untested)
* | merge master into dinsic, again...Matthew Hodgson2018-11-031-2/+32
|\|
| * remove trailing whiter spaceNeil Johnson2018-10-241-1/+1
| |
| * fix tupleRichard van der Hoff2018-10-241-1/+2
| | | | | | Co-Authored-By: neilisfragile <neil@matrix.org>
| * remove errant exception and styleNeil Johnson2018-10-231-5/+5
| |
| * clean up config error logic and importsNeil Johnson2018-10-171-14/+16
| |
| * no need to join room if creatorNeil Johnson2018-10-131-1/+2
| |
| * improve auto room join logic, comments and testsNeil Johnson2018-10-121-3/+8
| |
| * move logic into register, fix room alias localpart bug, testsNeil Johnson2018-10-041-27/+18
| |
| * emit room aliases eventMatthew Hodgson2018-09-291-3/+8
| |
| * fix thinkosMatthew Hodgson2018-09-291-6/+6
| |
| * fix UTsMatthew Hodgson2018-09-281-4/+9
| |
| * untested stab at autocreating autojoin roomsMatthew Hodgson2018-09-281-0/+18
| |
| * don't ratelimit autojoinsMatthew Hodgson2018-09-151-0/+1
| |
| * fix bug where preserved threepid user comes to sign up and server is mau blockedNeil Johnson2018-08-311-1/+2
| |
* | merge in masterMatthew Hodgson2018-10-221-4/+7
|\|
| * remove blank lineNeil Johnson2018-08-141-1/+0
| |
| * Update register.pyNeil Johnson2018-08-141-10/+0
| | | | | | remove comments
| * support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-131-13/+14
| | | | | | | | AuthError in all cases
| * Revert "support admin_email config and pass through into blocking errors, ↵Neil Johnson2018-08-131-14/+13
| | | | | | | | | | | | return AuthError in all cases" This reverts commit 0d43f991a19840a224d3dac78d79f13d78212ee6.
| * support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-131-13/+14
| | | | | | | | AuthError in all cases
| * Rename async to async_helpers because `async` is a keyword on Python 3.7 (#3678)Amber Brown2018-08-101-1/+1
| |
| * py3 fixNeil Johnson2018-08-031-1/+1
| |
| * bug fixesNeil Johnson2018-08-031-4/+4
| |
| * do mau checks based on monthly_active_users tableNeil Johnson2018-08-021-6/+4
| |
| * Merge pull request #3630 from matrix-org/neilj/mau_sign_in_log_in_limitsNeil Johnson2018-08-011-2/+17
| |\ | | | | | | Initial impl of capping MAU
| | * make count_monthly_users async synapse/handlers/auth.pyNeil Johnson2018-08-011-4/+5
| | |
| | * limit register and sign in on number of monthly usersNeil Johnson2018-07-301-2/+16
| | |
| * | Python 3: Convert some unicode/bytes uses (#3569)Amber Brown2018-08-021-1/+1
| |/
* | Merge remote-tracking branch 'origin/master' into dinsicDavid Baker2018-07-191-3/+8
|\|
| * run isortAmber Brown2018-07-091-3/+8
| |
* | Merge remote-tracking branch 'origin/master' into dinsicDavid Baker2018-07-171-4/+1
|\|
| * Remove run_on_reactor (#3395)Amber Brown2018-06-141-4/+1
| |
* | Merge tag 'v0.31.2' into dinsicMichael Kaye2018-06-221-0/+14
|\|
| * Infrastructure for a server notices roomRichard van der Hoff2018-05-171-0/+14
| | | | | | | | | | | | | | Server Notices use a special room which the user can't dismiss. They are created on demand when some other bit of the code calls send_notice. (This doesn't actually do much yet becuse we don't call send_notice anywhere)
* | fix double negativeMatthew Hodgson2018-05-041-1/+1
| |
* | don't pass a requester if we don't have one to set_displaynameMatthew Hodgson2018-05-041-5/+5
| |
* | fix user_id / user confusionMatthew Hodgson2018-05-041-5/+5
| |
* | improve mxid & displayname selection for register_mxid_from_3pidMatthew Hodgson2018-05-031-14/+31
| | | | | | | | | | | | | | | | * [x] strip invalid characters from generated mxid * [x] append numbers to disambiguate clashing mxids * [x] generate displayanames from 3pids using a dodgy heuristic * [x] get rid of the create_profile_with_localpart and instead explicitly set displaynames so they propagate correctly
* | Merge branch 'develop' into dinsicMatthew Hodgson2018-04-121-6/+44
|\|
| * Merge branch 'develop' of into allow_auto_join_roomsKrombel2018-03-281-4/+10
| |\
| | * Also do check inside linearizerErik Johnston2018-03-271-3/+4
| | |
| | * PEP8Erik Johnston2018-03-261-1/+3
| | |
| | * Linearize calls to _generate_user_idErik Johnston2018-03-261-4/+7
| | |
| * | move handling of auto_join_rooms to RegisterHandlerKrombel2018-03-141-2/+34
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Currently the handling of auto_join_rooms only works when a user registers itself via public register api. Registrations via registration_shared_secret and ModuleApi do not work This auto_joins the users in the registration handler which enables the auto join feature for all 3 registration paths. This is related to issue #2725 Signed-Off-by: Matthias Kesler <krombel@krombel.de>
* | Merge branch 'develop' into matthew/dinsic_3pid_checkMatthew Hodgson2018-03-141-4/+22
|\|
| * Refactor get_or_register_3pid_guestErik Johnston2018-03-131-4/+22
| |
* | pep8Matthew Hodgson2018-03-131-1/+3
| |
* | add yieldsMatthew Hodgson2018-03-131-1/+1
|/
* rewrite based on PR feedback:Matthew Hodgson2018-01-191-10/+5
| | | | | | | | | * [ ] split config options into allowed_local_3pids and registrations_require_3pid * [ ] simplify and comment logic for picking registration flows * [ ] fix docstring and move check_3pid_allowed into a new util module * [ ] use check_3pid_allowed everywhere @erikjohnston PTAL
* fix up v1, and improve errorsMatthew Hodgson2018-01-191-1/+12
|
* Merge pull request #2773 from matrix-org/erikj/hash_bgErik Johnston2018-01-101-1/+1
|\ | | | | Do bcrypt hashing in a background thread
| * Do bcrypt hashing in a background threadErik Johnston2018-01-101-1/+1
| |
* | switch to a simpler 'search_all_users' button as per review feedbackMatthew Hodgson2017-12-041-1/+1
| |
* | kick the user_directory index when new users registerMatthew Hodgson2017-11-291-0/+8
|/
* Revert "Allow upper-case characters in mxids"Richard van der Hoff2017-11-091-3/+3
| | | | This reverts commit b70b64690330c25cbd04c1b2cacf8276b566efc8.
* Allow upper-case characters in mxidsRichard van der Hoff2017-11-091-3/+3
| | | | Because we're never going to be able to fix this :'(
* Move access token deletion into auth handlerRichard van der Hoff2017-11-011-1/+2
| | | | | | | Also move duplicated deactivation code into the auth handler. I want to add some hooks when we deactivate an access token, so let's bring it all in here so that there's somewhere to put it.
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-1/+1
| | | | what could possibly go wrong
* Allow = in mxids and groupidsRichard van der Hoff2017-10-201-3/+2
| | | | ... because the spec says we should.
* Disallow capital letters in useridsRichard van der Hoff2017-10-201-6/+4
| | | | | Factor out a common function for checking user ids and group ids, which forbids capitals.
* Split out profile handler to fix testsErik Johnston2017-08-251-2/+2
|
* Modify condition on empty localpartLuke Barnard2017-05-101-1/+1
|
* Modify register/available to be GET with query paramLuke Barnard2017-05-101-0/+7
| | | | | | | - GET is now the method for register/available - a query parameter "username" is now used Also, empty usernames are now handled with an error message on registration or via register/available: `User ID cannot be empty`
* Fix email push in pusher workerErik Johnston2017-02-021-4/+6
| | | | | | This was broken when device list updates were implemented, as Mailer could no longer instantiate an AuthHandler due to a dependency on federation sending.
* Prevent user tokens being used as guest tokens (#1675)Richard van der Hoff2016-12-061-1/+1
| | | | | Make sure that a user cannot pretend to be a guest by adding 'guest = True' caveats.
* Stop putting a time caveat on access tokensRichard van der Hoff2016-11-291-3/+2
| | | | | | | | The 'time' caveat on the access tokens was something of a lie, since we weren't enforcing it; more pertinently its presence stops us ever adding useful time caveats. Let's move in the right direction by not lying in our caveats.
* rest/client/v1/register: use the correct requester in createUserPatrik Oldsberg2016-10-061-4/+2
| | | | Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
* storage/appservice: make appservice methods only relying on the cache ↵Patrik Oldsberg2016-10-061-3/+2
| | | | synchronous
* Forbid non-ASes from registering users whose names begin with '_' (SYN-738)Paul "LeoNerd" Evans2016-07-271-0/+7
|
* Add `create_requester` functionRichard van der Hoff2016-07-261-7/+9
| | | | | Wrap the `Requester` constructor with a function which provides sensible defaults, and use it throughout
* Further registration refactoringRichard van der Hoff2016-07-191-5/+8
| | | | | | | | | | | | | | * `RegistrationHandler.appservice_register` no longer issues an access token: instead it is left for the caller to do it. (There are two of these, one in `synapse/rest/client/v1/register.py`, which now simply calls `AuthHandler.issue_access_token`, and the other in `synapse/rest/client/v2_alpha/register.py`, which is covered below). * In `synapse/rest/client/v2_alpha/register.py`, move the generation of access_tokens into `_create_registration_details`. This means that the normal flow no longer needs to call `AuthHandler.issue_access_token`; the shared-secret flow can tell `RegistrationHandler.register` not to generate a token; and the appservice flow continues to work despite the above change.
* Bug fix: expire invalid access tokensNegar Fazeli2016-07-131-3/+3
|
* Add an admin option to shared secret registrationErik Johnston2016-07-051-1/+3
|
* Fix style violationsKent Shikama2016-07-041-1/+2
| | | | Signed-off-by: Kent Shikama <kent@kentshikama.com>
* Optionally include password hash in createUser endpointKent Shikama2016-07-031-2/+2
| | | | Signed-off-by: Kent Shikama <kent@kentshikama.com>
* Add a comment on why we don't create a profile for upgrading usersMark Haines2016-06-171-0/+1
|
* Remove registered_users from the distributor.Mark Haines2016-06-171-13/+10
| | | | | | | | | | The only place that was observed was to set the profile. I've made it so that the profile is set within store.register in the same transaction that creates the user. This required some slight changes to the registration code for upgrading guest users, since it previously relied on the distributor swallowing errors if the profile already existed.
* Fix a bug caused by a change in auth_handler functionNegar Fazeli2016-06-081-2/+2
| | | | Fix the relevant unit test cases
* Split out the auth handlerDavid Baker2016-06-021-1/+1
|
* Fix set profile error with Requester.Negi Fazeli2016-05-231-4/+5
| | | | | Replace flush_user with delete access token due to function removal Add a new test case for if the user is already registered
* Create user with expiryNegi Fazeli2016-05-131-0/+53
| | | | | | - Add unittests for client, api and handler Signed-off-by: Negar Fazeli <negar.fazeli@ericsson.com>
* Move all the wrapper functions for distributor.fireMark Haines2016-04-081-4/+1
| | | | | | | Move the functions inside the distributor and import them where needed. This reduces duplication and makes it possible for flake8 to detect when the functions aren't used in a given file.
* Make registration idempotent, part 2: be idempotent if the client specifies ↵David Baker2016-03-161-1/+11
| | | | a username.
* Store appservice ID on registerDaniel Wagner-Hall2016-03-101-1/+4
|
* Use syntax that works on both py2.7 and py3Mark Haines2016-03-071-1/+1
|
* handlers/register: make sure another user id is generated when a collision ↵Patrik Oldsberg2016-02-291-0/+1
| | | | | | occurs Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
* Generate guest access token on 3pid invitesDaniel Wagner-Hall2016-02-241-0/+15
| | | | | | | | | This means that following the same link across multiple sessions or devices can re-use the same guest account. Note that this is somewhat of an abuse vector; we can't throw up captchas on this flow, so this is a way of registering ephemeral accounts for spam, whose sign-up we don't rate limit.
* Enforce user_id exclusivity for AS registrationsDaniel Wagner-Hall2016-02-111-5/+12
| | | | | This whole set of checks is kind of an ugly mess, which I may clean up at some point, but for now let's be correct.
* Fix up logcontextsErik Johnston2016-02-081-1/+1
|
* Allocate guest user IDs numericcallyDaniel Wagner-Hall2016-02-051-19/+36
| | | | | | | | | The current random IDs are ugly and confusing when presented in UIs. This makes them prettier and easier to read. Also, disable non-automated registration of numeric IDs so that we don't need to worry so much about people carving out our automated address space and us needing to keep retrying ID registration.
* Fix flake8 warnings for new flake8Daniel Wagner-Hall2016-02-021-1/+1
|
* Pass make_guest whne we autogen a user IDDavid Baker2016-02-021-1/+3
|
* Underscores are allowed in user idsErik Johnston2016-01-221-1/+1
|
* Don't explode when given a unicode username in /register/Erik Johnston2016-01-201-3/+2
|
* M_INVALID_USERNAME to be consistent with the parameter nameDavid Baker2016-01-151-1/+1
|
* Add specific error code for invalid user names.David Baker2016-01-141-1/+2
|
* comma styleDavid Baker2016-01-061-1/+1
|
* Add is_guest flag to users db to track whether a user is a guest user or ↵David Baker2016-01-061-1/+3
| | | | not. Use this so we can run _filter_events_for_client when calculating event_push_actions.
* Allow guests to upgrade their accountsDaniel Wagner-Hall2016-01-051-10/+27
|
* Merge pull request #450 from matrix-org/matthew/no-identiconsMatthew Hodgson2015-12-181-19/+3
|\ | | | | Matthew/no identicons
| * fix indentation levelMatthew Hodgson2015-12-171-3/+3
| |
| * stop generating default identicons. reverts most of ↵Matthew Hodgson2015-12-171-19/+3
| | | | | | | | 582019f870adbc4a8a8a9ef97b527e0fead77761 and solves vector-web/vector-im#346
* | Fix typo that broke registration on the mobile clientsDavid Baker2015-12-181-1/+1
|/
* Reuse the captcha client rather than creating a new one for each requestMark Haines2015-12-031-4/+2
|
* Wrap calls to distributor.fire in appropriately named functions so that ↵Mark Haines2015-12-011-4/+8
| | | | static analysis can work out want is calling what
* Allow guests to register and call /events?room_id=Daniel Wagner-Hall2015-11-041-5/+7
| | | | | | | This follows the same flows-based flow as regular registration, but as the only implemented flow has no requirements, it auto-succeeds. In the future, other flows (e.g. captcha) may be required, so clients should treat this like the regular registration flow choices.
* Remove unused importDaniel Wagner-Hall2015-08-261-1/+0
|
* Swap out bcrypt for md5 in testsDaniel Wagner-Hall2015-08-261-1/+1
| | | | This reduces our ~8 second sequential test time down to ~7 seconds
* Merge erikj/user_dedup to developDaniel Wagner-Hall2015-08-261-2/+2
|
* Move token generation to auth handlerDaniel Wagner-Hall2015-08-201-19/+7
| | | | | I prefer the auth handler to worry about all auth, and register to call into it as needed, than to smatter auth logic between the two.
* Re-add whitespace around caveat operatorsDaniel Wagner-Hall2015-08-191-4/+4
|
* Remove padding space around caveat operatorsDaniel Wagner-Hall2015-08-181-4/+4
|
* Fix some formatting to use tuplesDaniel Wagner-Hall2015-08-181-4/+4
|
* Issue macaroons as opaque auth tokensDaniel Wagner-Hall2015-08-181-6/+13
| | | | | | | | | | | | | This just replaces random bytes with macaroons. The macaroons are not inspected by the client or server. In particular, they claim to have an expiry time, but nothing verifies that they have not expired. Follow-up commits will actually enforce the expiration, and allow for token refresh. See https://bit.ly/matrix-auth for more information
* Simplify LoginHander and AuthHandlerDaniel Wagner-Hall2015-08-121-5/+5
| | | | | | | | | * Merge LoginHandler -> AuthHandler * Add a bunch of documentation * Improve some naming * Remove unused branches I will start merging the actual logic of the two handlers shortly
* Fix v2_alpha registration. Add unit tests.Kegan Dougal2015-07-281-1/+2
| | | | | | | | V2 Registration forced everyone (including ASes) to create a password for a user, when ASes should be able to omit passwords. Also unbreak AS registration in general which checked too early if the given username was claimed by an AS; it was checked before knowing if the AS was the one doing the registration! Add unit tests for AS reg, user reg and disabled_registration flag.
* code beautifyMuthu Subramanian2015-07-081-1/+0
|
* Integrate SAML2 basic authentication - uses pysaml2Muthu Subramanian2015-07-081-0/+30
|
* revert accidental bcrypt gensalt round reduction from loadtestingMark Haines2015-05-071-1/+1
|
* pynacl-0.3.0 was released so we can finally start using it directly from pypiMark Haines2015-05-071-1/+1
|