1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-19 00:26:27 +03:00
Commit Graph

1549 Commits

Author SHA1 Message Date
Quentin Gliech
1cf283337b Load the configuration from a common Figment instance
This should avoid loading the same files multiple times.
It should also make it easier to do post-processing on the
configuration, like validation.

This does deprecate one undocumented feature: the ability to override
some fields during the configuration generation using environment
variables.
2024-03-22 13:33:09 +01:00
Quentin Gliech
dde907758e Use OTEL semantic conventions constants for most attributes 2024-03-19 17:15:14 +01:00
Quentin Gliech
7e30daf83e Replace parse-display with manual Display/FromStr impls 2024-03-19 16:38:46 +01:00
Kévin Commaille
4eeedbef31 Add account management URL for clients
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-03-19 15:05:27 +01:00
Quentin Gliech
d8f5fdaf5c Moved some dependencies in the workspace and upgrade some dependencies 2024-03-19 14:54:35 +01:00
Kévin Commaille
099eabd137 Put match variant behind feature flag
Without the keystore feature, this variant is not available.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-03-19 12:25:35 +01:00
dependabot[bot]
34d8132114 build(deps): bump wasmtime from 17.0.0 to 18.0.3
Bumps [wasmtime](https://github.com/bytecodealliance/wasmtime) from 17.0.0 to 18.0.3.
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases)
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-some-possible-changes.md)
- [Commits](https://github.com/bytecodealliance/wasmtime/compare/v17.0.0...v18.0.3)

---
updated-dependencies:
- dependency-name: wasmtime
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 12:02:37 +01:00
dependabot[bot]
5dc8e73f7e build(deps): bump serde_with from 3.6.0 to 3.7.0
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 10:40:19 +01:00
dependabot[bot]
880462560b build(deps): bump figment from 0.10.14 to 0.10.15
Bumps [figment](https://github.com/SergioBenitez/Figment) from 0.10.14 to 0.10.15.
- [Commits](https://github.com/SergioBenitez/Figment/compare/v0.10.14...v0.10.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 07:34:37 +01:00
dependabot[bot]
5b5346ebb7 build(deps): bump parse-display from 0.8.2 to 0.9.0
Bumps [parse-display](https://github.com/frozenlib/parse-display) from 0.8.2 to 0.9.0.
- [Changelog](https://github.com/frozenlib/parse-display/blob/master/CHANGELOG.md)
- [Commits](https://github.com/frozenlib/parse-display/compare/v0.8.2...v0.9.0)

---
updated-dependencies:
- dependency-name: parse-display
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 18:44:10 +01:00
Michael Telatynski
70d688913f Add Electron user-agent parsing for Element Desktop/Nightly (#2461) 2024-03-18 18:42:31 +01:00
Michael Telatynski
894602bca1 Render browser icon for compat & browser sessions (#2478)
* Render browser icon for compat & browser sessions

* Use PNGs

* Add support for png resources
2024-03-18 18:41:40 +01:00
Quentin Gliech
eb950151af Upgrade OTEL and remove support for Jaeger and Zipkin exporters 2024-03-18 17:26:40 +01:00
Quentin Gliech
61a69f5af4 Upgrade chrono and replace deprecated methods usage 2024-03-18 17:26:40 +01:00
Kévin Commaille
39a6132ea8 Do not expose error type from mas-keystore in mas-oidc-client
The mas-keystore crate is an optional dependency so
setting "default-features" to false
results in a compilation error.

Since the enum is exhaustive, the corresponding error variant
cannot be behind a cargo feature.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-03-18 12:12:23 +01:00
Quentin Gliech
e4cf2cdaf5 Make the mas-cli manage verify-email mark the email as primary 2024-03-08 17:25:39 +01:00
Quentin Gliech
6eb6209bd8 Use rustls-platform-verifier for cert validation
This simplifies by removing the mutually exclusive `native-roots` and
`webpki-roots` features with something that is suitable for all
platforms.
2024-03-06 14:03:59 +01:00
Quentin Gliech
c0a9d27e34 Automatically sync the configuration on server startup 2024-03-01 18:14:05 +01:00
dependabot[bot]
1c19bc6e54 build(deps): bump time from 0.3.32 to 0.3.34
Bumps [time](https://github.com/time-rs/time) from 0.3.32 to 0.3.34.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/time-rs/time/compare/v0.3.32...v0.3.34)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 15:51:42 +01:00
Quentin Gliech
3251c5896c Append additional parameters to the OAuth2 authorize endpoint 2024-03-01 14:36:37 +01:00
Quentin Gliech
25fbbf96b9 Load the additional OAuth parameters from the config 2024-03-01 14:36:37 +01:00
Quentin Gliech
1821136e3f Additional parameters from upstream OAuth2 providers in the data model 2024-03-01 14:36:37 +01:00
Quentin Gliech
46c565cc89 Move schemars to workspace dependencies
Also enables the `preserve_order` feature, hence the big schema output diff.
2024-03-01 14:36:37 +01:00
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