Commit Graph

10270 Commits

Author SHA1 Message Date
Richard van der Hoff 3cd6b22c7b Let password auth providers handle arbitrary login types
Provide a hook where password auth providers can say they know about other
login types, and get passed the relevant parameters
2017-11-01 16:43:57 +00:00
David Baker c9b9ef575b
Merge pull request #2621 from matrix-org/rav/refactor_accesstoken_delete
Move access token deletion into auth handler
2017-11-01 16:26:06 +00:00
Matthew Hodgson 275826f234
Merge pull request #2617 from matrix-org/matthew/auto-displayname
automatically set default displayname on register
2017-11-01 16:21:16 +00:00
David Baker 4f0488b307 Merge remote-tracking branch 'origin/develop' into rav/refactor_accesstoken_delete 2017-11-01 16:20:19 +00:00
David Baker e5e930aec3
Merge pull request #2615 from matrix-org/rav/break_auth_device_dep
Break dependency of auth_handler on device_handler
2017-11-01 16:06:31 +00:00
David Baker fbbacb284e
Merge pull request #2613 from matrix-org/rav/kill_refresh_tokens
Remove the last vestiges of refresh_tokens
2017-11-01 15:57:35 +00:00
Matthew Hodgson 9f7a555b4e switch to setting default displayname in the storage layer
to avoid clobbering guest user displaynames on registration
2017-11-01 15:51:30 +00:00
Richard van der Hoff dd13310fb8 Move access token deletion into auth handler
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.
2017-11-01 15:46:22 +00:00
David Baker 691cc4e036
Merge pull request #2618 from matrix-org/dbkr/log_login_requests
Log login requests
2017-11-01 14:11:28 +00:00
David Baker 0bb253f37b Apparently this is python 2017-11-01 14:02:52 +00:00
David Baker 59e7e62c4b Log login requests
Carefully though, to avoid logging passwords
2017-11-01 13:58:01 +00:00
Matthew Hodgson f8420d6279 automatically set default displayname on register
to avoid leaking ugly MXIDs and cluttering up the timeline with
displayname changes as well as membership joins for autojoin rooms
(e.g. the status autojoin rooms), automatically set the displayname
to match the localpart of the mxid upon registration.
2017-11-01 13:15:41 +00:00
Luke Barnard 99354b430e
Merge pull request #2612 from matrix-org/luke/groups-room-relationship-is-public
Modify group room association API to allow modification of is_public
2017-11-01 11:08:36 +00:00
Richard van der Hoff 74c56f794c Break dependency of auth_handler on device_handler
I'm going to need to make the device_handler depend on the auth_handler, so I
need to break this dependency to avoid a cycle.

It turns out that the auth_handler was only using the device_handler in one
place which was an edge case which we can more elegantly handle by throwing an
error rather than fixing it up.
2017-11-01 10:27:06 +00:00
Richard van der Hoff 02237ce725 Fix tests for refresh_token removal 2017-11-01 10:19:42 +00:00
Luke Barnard 318a249c8b Leave `is_public` as required argument of update_room_group_association 2017-11-01 09:36:01 +00:00
Luke Barnard 207fabbc6a Update docs for updating room group association 2017-11-01 09:35:15 +00:00
Richard van der Hoff 356bcafc44 Remove the last vestiges of refresh_tokens 2017-10-31 20:35:58 +00:00
Richard van der Hoff 3e0aaad190 Let auth providers get to the database
Somewhat open to abuse, but also somewhat unavoidable :/
2017-10-31 17:22:29 +00:00
Richard van der Hoff a72e4e3e28
Merge pull request #2610 from matrix-org/rav/schema_for_pw_providers
DB schema interface for password auth providers
2017-10-31 17:20:47 +00:00
Luke Barnard 13b3d7b4a0 Flake8 2017-10-31 17:20:11 +00:00
Richard van der Hoff e025aec028
Merge pull request #2611 from matrix-org/dbkr/port_script_drop_nuls
Make the port script drop NUL values in all tables
2017-10-31 17:16:08 +00:00
Luke Barnard 20fe347906 Modify group room association API to allow modification of is_public
also includes renamings to make things more consistent.
2017-10-31 17:04:28 +00:00
David Baker 9d419f48e6 Make the port script drop NUL values in all tables
Postgres doesn't support NULs in strings so it makes the script
throw an exception and stop if any values contain \0. Drop them
with appropriate warning.
2017-10-31 16:58:49 +00:00
Richard van der Hoff 9ded00f221 fix tests 2017-10-31 14:21:13 +00:00
Richard van der Hoff 1650eb5847 DB schema interface for password auth providers
Provide an interface by which password auth providers can register db schema
files to be run at startup
2017-10-31 14:01:53 +00:00
David Baker c31a7c3ff6
Merge pull request #2609 from matrix-org/rav/refactor_login
Refactor some logic from LoginRestServlet into AuthHandler
2017-10-31 13:51:36 +00:00
Richard van der Hoff b8e54fbc08
Merge pull request #2607 from matrix-org/rav/cleanup_ldap_hacks
Clean up backwards-compat hacks for ldap
2017-10-31 13:41:12 +00:00
David Baker a1f8b0fd64
Merge pull request #2608 from matrix-org/rav/password_provider_doc
Start some documentation on password providers
2017-10-31 13:40:10 +00:00
Richard van der Hoff 1b65ae00ac Refactor some logic from LoginRestServlet into AuthHandler
I'm going to need some more flexibility in handling login types in password
auth providers, so as a first step, move some stuff from LoginRestServlet into
AuthHandler.

In particular, we pass everything other than SAML, JWT and token logins down to
the AuthHandler, which now has responsibility for checking the login type and
fishing the password out of the login dictionary, as well as qualifying the
user_id if need be. Ideally SAML, JWT and token would go that way too, but
there's no real need for it right now and I'm trying to minimise impact.

This commit *should* be non-functional.
2017-10-31 10:48:41 +00:00
Richard van der Hoff ebda45de4c Start some documentation on password providers
Document the existing interface, before I start adding new stuff.
2017-10-31 10:47:52 +00:00
Richard van der Hoff ffc574a6f9 Clean up backwards-compat hacks for ldap
try to make the backwards-compat flows follow the same code paths as the modern
impl.

This commit should be non-functional.
2017-10-31 10:47:02 +00:00
Richard van der Hoff e2f4190209
Merge pull request #2605 from matrix-org/luke/fix-group-creation-error-wording
Fix wording on group creation error
2017-10-30 16:06:42 +00:00
Luke Barnard 9bc17fc5fb Fix wording on group creation error 2017-10-30 15:17:23 +00:00
Matthew Hodgson 208a6647f1 fix typo 2017-10-29 20:54:20 +00:00
Matthew Hodgson e51c2bcaef move url_previews to MD as RST does my head in 2017-10-29 20:47:17 +00:00
Erik Johnston 71a1bd53b2
Merge pull request #2599 from matrix-org/erikj/groups_invite
Fix typo when checking if user is invited to group
2017-10-27 17:34:54 +01:00
Erik Johnston d0abb4e8e6 Fix typo when checking if user is invited to group 2017-10-27 16:57:19 +01:00
Erik Johnston 977078f06d Fix bad merge 2017-10-27 15:10:50 +01:00
Erik Johnston 6980c4557e Merge branch 'erikj/attestation_jitter' of github.com:matrix-org/synapse into develop 2017-10-27 15:09:05 +01:00
Erik Johnston 632baf799e Merge pull request #2598 from matrix-org/revert-2596-erikj/attestation_jitter
Revert "Add jitter to validity period of attestations"
2017-10-27 15:08:29 +01:00
Erik Johnston af92f5b00f Revert "Add jitter to validity period of attestations" 2017-10-27 15:07:21 +01:00
Erik Johnston 4ab8abbc2b Merge branch 'erikj/attestation_local_fix' of github.com:matrix-org/synapse into develop 2017-10-27 15:07:08 +01:00
Erik Johnston b1e62d4a57 Merge pull request #2596 from matrix-org/erikj/attestation_jitter
Add jitter to validity period of attestations
2017-10-27 14:20:25 +01:00
Erik Johnston 6af3656deb Merge pull request #2595 from matrix-org/erikj/attestation_commnet
Add comment about attestations
2017-10-27 14:20:19 +01:00
Richard van der Hoff 4d83632009 Merge pull request #2591 from matrix-org/rav/device_delete_auth
Device deletion: check UI auth matches access token
2017-10-27 12:30:10 +01:00
Richard van der Hoff 110b373e9c Merge pull request #2589 from matrix-org/rav/as_deactivate_account
Allow ASes to deactivate their own users
2017-10-27 12:29:32 +01:00
Erik Johnston ca571b0ec3 Add jitter to validity period of attestations
This helps ensure that the renewals of attestations are spread out more
evenly.
2017-10-27 11:57:27 +01:00
Luke Barnard d8c26162a1 Merge pull request #2582 from matrix-org/luke/group-is-public
Add is_public to groups table to allow for private groups
2017-10-27 11:41:13 +01:00
Erik Johnston c067088747 Add comment about attestations 2017-10-27 11:35:41 +01:00