1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-07 17:03:01 +03:00
Commit Graph

1576 Commits

Author SHA1 Message Date
Quentin Gliech
183f7bad40 Test the addUser GraphQL mutation with the new behaviour 2024-02-29 11:21:24 +01:00
Quentin Gliech
35929d48fd Test the user registration form 2024-02-29 11:21:24 +01:00
Quentin Gliech
896ed3f024 Check for username availability upon registration 2024-02-29 11:21:24 +01:00
Quentin Gliech
452f4c17f5 graphql: check that the username is available when creating them
This calls the HS to make sure the username isn't reserved.
This check can be bypassed using the `skipHomeserverCheck` flag on the
`addUser` mutation.
2024-02-29 11:21:24 +01:00
Quentin Gliech
4aeb446061 Make the HomeserverConnection available in handlers 2024-02-29 11:21:24 +01:00
Quentin Gliech
20dd5ca311 Add API to check localpart availability 2024-02-29 11:21:24 +01:00
Quentin Gliech
2c9b8a446d Bump Clippy to 1.75 and Rust to 1.76 2024-02-27 16:58:43 +01:00
dependabot[bot]
4e1ec08915 build(deps): bump pest from 2.7.6 to 2.7.7
Bumps [pest](https://github.com/pest-parser/pest) from 2.7.6 to 2.7.7.
- [Release notes](https://github.com/pest-parser/pest/releases)
- [Commits](https://github.com/pest-parser/pest/compare/v2.7.6...v2.7.7)

---
updated-dependencies:
- dependency-name: pest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-27 14:46:28 +01:00
Quentin Gliech
f3cbd3b315 Parse User Agents on the backend side (#2388)
* Parse user agents on the server side

* Parse and expose user agents on the backend

* Use the parsed user agent in the device consent page

* Fix the device icon tests

* Fix clippy warnings

* Box stuff to avoid large enum variants

* Ignore a clippy warning

* Fix the requester boxing
2024-02-23 16:47:48 +01:00
Quentin Gliech
f171d76dc5 Record user agents on OAuth 2.0 and compat sessions (#2386)
* Record user agents on OAuth 2.0 and compat sessions

* Add tests for recording user agent in sessions
2024-02-22 10:01:32 +01:00
Quentin Gliech
ed5893eb20 Save which user session created a compat session
This also exposes the user session in the GraphQL API, and allow
filtering on browser session ID on the app session list.
2024-02-21 11:55:58 +01:00
Quentin Gliech
03b6ad7138 Remove the unique constraint on device IDs on compatibility sessions
In OAuth 2.0 sessions, we can have multiple sessions for the same device
anyway, so this constraint doesn't exactly make sense.

Fixes #2033
Fixes #2312
2024-02-20 15:50:20 +01:00
Quentin Gliech
90cebeeefc Remove unnecessary debugging printf in i18n crate 2024-02-19 17:53:45 +01:00
Quentin Gliech
1c000a1fed Make sure the locale fallback works as expected
- Also makes sure that the fallback runs in the backend and is then
   picked up by the frontend
 - and explicitely fallback zh-CN to zh-Hans
2024-02-19 11:43:36 +01:00
Quentin Gliech
aefcc3cae2 Move the cross signing reset UI in its own page 2024-02-17 09:48:53 +01:00
Quentin Gliech
e041f47dfe Replace Jotai with @tanstack/router (#2359)
* Start replacing jotai with @tanstack/router

* Remove jotai completely

* Move the common layout & reimplement the ?action parameter

This also makes sure everything is properly loaded in the route loader,
and we use fragment where it makes sense

* Change the default error component

* GraphQL API: make the sessions fetchable through node(id: ID!)
2024-02-15 17:19:05 +01:00
dependabot[bot]
4fc0a72086 build(deps): bump rustls-pki-types from 1.1.0 to 1.2.0
Bumps [rustls-pki-types](https://github.com/rustls/pki-types) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/rustls/pki-types/releases)
- [Commits](https://github.com/rustls/pki-types/compare/v/1.1.0...v/1.2.0)

---
updated-dependencies:
- dependency-name: rustls-pki-types
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 18:44:39 +01:00
Quentin Gliech
293150894b Introduce mas-cli doctor, a simple diagnostic tool
This should help users to diagnose common issues with their setup.
2024-02-08 15:28:43 +01:00
Quentin Gliech
0beb842195 Make the user agree to T&C during registration 2024-02-07 17:21:22 +01:00
Quentin Gliech
90c386847a Setup a repository to track user terms agreements 2024-02-07 17:21:22 +01:00
Quentin Gliech
d3e5f1b101 Automatically run migrations on service startup 2024-02-07 16:31:36 +01:00
Dirk Klimpel
979062d40e allow config dump to file 2024-02-02 18:32:07 +01:00
Quentin Gliech
17e968f7cc Record the user agent and IP in the device code grant 2024-02-02 18:01:51 +01:00
Quentin Gliech
3df600b5d7 i18n: make the message translator fallback to en 2024-02-02 18:01:51 +01:00
Quentin Gliech
36ebbc4d70 i18n: utilities to format short dates and times 2024-02-02 18:01:51 +01:00
Quentin Gliech
b498e5971d Move the /link/:device endpoint to /device/:device
It prevents browsers to try to autocomplete /link to /link/:device
2024-02-02 18:01:51 +01:00
Quentin Gliech
b0042eb0c3 Clippy thinks I have too many bools in my structs 2024-02-02 18:01:51 +01:00
Quentin Gliech
31936bcc00 Save whether the client supports the device code grant in the database 2024-02-02 18:01:51 +01:00
Quentin Gliech
1c62543220 Make the device code grants go through the policy engine 2024-02-02 18:01:51 +01:00
Quentin Gliech
efa6af3294 Run generated files updates, fix doc links & fmt 2024-02-02 18:01:51 +01:00
Quentin Gliech
7d9d97a006 Implement the device access token request 2024-02-02 18:01:51 +01:00
Quentin Gliech
67ab42155c Implement the device consent logic 2024-02-02 18:01:51 +01:00
Quentin Gliech
50654d2e40 Implement the device code authorisation request 2024-02-02 18:01:51 +01:00
Quentin Gliech
286fc57103 Add a repository for device code grants 2024-02-02 18:01:51 +01:00
Quentin Gliech
4301fd9378 Setup the device link form page 2024-02-02 18:01:51 +01:00
Quentin Gliech
ae05cbc1f1 Setup the data model for the device code grant 2024-02-02 18:01:51 +01:00
Quentin Gliech
b927d330c9 Bump most Rust dependencies 2024-02-02 15:37:05 +01:00
Quentin Gliech
d20b0dc81d Fix the native-certs (and therefore docker) build 2024-02-02 14:39:24 +01:00
Quentin Gliech
aeca03a120 Upgrade rustls 2024-02-02 11:45:20 +01:00
Quentin Gliech
d01b8c36a6 Bump Rust dependencies and update cargo-deny exceptions 2024-02-02 11:45:20 +01:00
Quentin Gliech
ba95dd022a mas-http: enable the tower/util feature 2023-12-07 17:10:57 +01:00
Quentin Gliech
ea91dfc501 Set crates descriptions for crates we publish 2023-12-07 17:10:57 +01:00
Quentin Gliech
49963b26f8 Prepare workspace to publish OIDC crates 2023-12-07 16:02:55 +01:00
Quentin Gliech
f8d745d308 Add a GraphQL mutation to allow cross-signing reset 2023-12-05 17:47:36 +01:00
Quentin Gliech
5957112ff6 Interface to allow cross-signing reset using Synapse admin API 2023-12-05 17:47:36 +01:00
Quentin Gliech
83bf739538 Implement account management discovery as per MSC2965 2023-12-05 17:40:36 +01:00
Quentin Gliech
a0f5f3c642 Enable clippy lints on a workspace level
This enables a lot more lints than before in some crates, so this fixed a lot of warnings as well.
2023-12-05 17:20:42 +01:00
Quentin Gliech
df3ca5ae66 Upgrade clippy lints to 1.74.0 & fix warnings 2023-12-05 17:20:42 +01:00
Quentin Gliech
5f1ccd378a listener: fix the connection not being polled on graceful shutdown 2023-11-28 17:40:18 +01:00
Quentin Gliech
30247448d5 Bump Rust dependencies 2023-11-24 13:04:37 +01:00