Commit Graph
756 Commits
Author SHA1 Message Date
Olivier 'reivilibre bebc7731dd Implement hard shutdown and exit for task timeout (#5930) 2026-09-04 13:52:54 +01:00
adis veletanlic 76bc2647c1 Merge branch 'main' into feat/lifecycle-task-hard-timeout 2026-08-19 14:33:53 +02:00
defaultdino 35be69bf15 implement hard shutdown and exit for task timeout 2026-08-19 14:30:51 +02:00
Kai A. Hiller 0bd67a9f9a Add unittest for database connection via pgpass 2026-08-18 13:13:49 +02:00
Quentin Gliech 8892cc7eb8 Remove the GraphQL playground (#5914) 2026-08-10 14:57:59 +02:00
Quentin Gliech c3b5fa3b0c Remove the GraphQL playground
The interactive playground page and its route/config option are gone; the GraphQL API itself (POST /graphql) is unaffected. External GraphQL usage is deprecated anyway in favour of the REST admin API.
2026-08-07 12:26:42 +02:00
Quentin Gliech 146b7fe379 Update the Sentry transport to use the new options API 2026-08-07 10:07:38 +02:00
Quentin Gliech 9d521acd02 Replace Unix socket on startup & allow setting permissions (#5858) 2026-07-28 13:48:39 +02:00
Quentin GliechandErik Johnston fc94b550db Use Utf8Path::with_added_extension for constructing the temporary socket path
Co-Authored-By: Erik Johnston <erikj@element.io>
2026-07-28 13:21:34 +02:00
networkException bdfeee2ceb Add password_file config variant for email and database 2026-07-26 17:57:40 +02:00
Kai A. Hiller 2e47d7a119 Add client_uri config for static clients 2026-07-24 13:09:38 +02:00
Quentin Gliech cd78f82f9c Replace Unix socket on startup & allow setting permissions
Fixes #5572
Fixes #2424

This makes it so that MAS binds on a temporary path on startup, sets
permissions and then moves it to the configured path. This means that we don't
error out anymore if there is a stale socket file, and that it is safe to
rollout a new process without killing the old one first, without breaking
connections.
2026-07-13 13:46:47 +02:00
Quentin Gliech 13d10dfe7e Adapt to the sd-notify 0.5 API changes
`notify()` lost its `unset_env` argument, and `watchdog_enabled()` now
returns an `Option<Duration>` directly.
2026-07-02 22:22:51 +02:00
Quentin Gliech 1d1bcbaf26 cli: clean up the doctor homeserver checks
MSC2965 changed the discovery mechanism to stop relying on .well-known
documents a while back. We removed references to this in the configuration
manual some time ago (see e3d1b8abfa) but
`mas-cli doctor` was still checking for it.

See element-hq/backend-internal#5 as well
2026-06-25 19:04:18 +02:00
Quentin Gliech e42d85d14e Merge branch 'main' into the requester logging branch 2026-06-18 13:43:59 +02:00
Quentin Gliech e4157b4b02 Log the GraphQL operation type and name (#5736) 2026-06-18 13:34:55 +02:00
Quentin Gliech e0c03b06e8 deps: upgrade reqwest 0.13, sentry 0.48, opentelemetry 0.32
We need to group the sentry and opentelemetry bumps together because they both
upgraded reqwest to 0.13.

- reqwest 0.12 -> 0.13: rename the rustls feature to rustls-no-provider,
  add the now-opt-in 'form' feature.
- sentry 0.46 -> 0.48: add rustls-no-provider so Sentry's reqwest 0.13
  transport reuses our process-wide aws-lc-rs provider.
- opentelemetry 0.31 -> 0.32 / tracing-opentelemetry 0.33: update the
  get_otel_context call in mas-context for the new signature.

opentelemetry-jaeger-propagator 0.32 is deprecated upstream but still
published; we keep it for now (with an expect(deprecated)) and will
vendor it in-tree once it's actually removed.
2026-06-17 19:00:25 +02:00
Quentin Gliech 269c1d9caf Merge branch 'main' into the requester logging branch 2026-06-17 17:57:16 +02:00
Quentin Gliech 9133820368 Merge branch 'main' into the GraphQL logging branch 2026-06-17 17:57:16 +02:00
Quentin Gliech a2533cd3f3 Track and log the client IP address (#5734) 2026-06-17 17:45:06 +02:00
Quentin Gliech eb0ef6380c Merge branch 'main' into quenting/upstream-pass-parameters 2026-06-17 14:54:37 +02:00
Quentin Gliech 9e60371aeb mas-cli: log the requester on the request log line
Add `requester=...` to the `http.server.response` log line, reading the
`Requester` recorded on the request's `LogContext`.
2026-06-17 14:14:24 +02:00
Quentin Gliech 98106df25a mas-cli: log the GraphQL operation on the request log line
Read the `GraphQlOperation` set by the GraphQL handler from the response
extensions in the logging middleware, and record the operation type and name
on the `http.server.response` log line when present.
2026-06-17 14:14:24 +02:00
Quentin Gliech 31b0b208c0 Record the client address on the HTTP request span 2026-06-17 14:14:24 +02:00
Quentin Gliech 4cea9320d1 Track the client IP address for the whole request and log it 2026-06-17 14:14:23 +02:00
Quentin GliechandOlivier 'reivilibre' a209eef119 Apply suggestion from @reivilibre
Co-authored-by: Olivier 'reivilibre' <oliverw@element.io>
2026-06-17 12:51:40 +02:00
Quentin Gliech 21795d70dc Fix clippy lints for Rust 1.96.0
Rust 1.96.0 enables several new clippy lints. Apply the machine-applicable
fixes (`duration_suboptimal_units`, `map_unwrap_or`, `manual_is_variant_and`,
`unnecessary_trailing_comma`, `while_let_loop`) and suppress the
`result_large_err` lint in the config test modules, where the closures passed to
`Jail::expect_with` are required to return the large `figment::Error`.
2026-06-16 15:38:22 +02:00
Quentin Gliech 632d64d199 Per-provider registration token requirement (#5605) 2026-06-10 10:05:46 +02:00
Quentin Gliech 3025708520 Add a configuration option to disable device code auto-fill 2026-05-28 13:30:25 +02:00
Eric Eastwood ee88379fc4 Remove unused lint ignores 2026-05-21 16:44:20 -05:00
Eric Eastwood fa23689962 #[allow -> #[expect 2026-05-21 16:37:47 -05:00
Quentin Gliech 11d68cc8c9 Merge branch 'main' into quenting/upstream-pass-parameters 2026-05-20 10:14:00 +02:00
Eric Eastwood 404a266b0e Merge branch 'main' into madlittlemods/max-session-threshold 2026-05-14 14:59:20 -05:00
Quentin Gliech aecb172209 Add oauth.device_code_grant_enabled configuration option (#5612) 2026-05-13 21:40:02 +02:00
Quentin Gliech 17a182589c Soft-deprecate forward_login_hint in upstream provider sync
When syncing config to the database, a `forward_login_hint: true`
flag now injects a `login_hint: "{{ params.login_hint }}"` entry
into `additional_authorization_parameters` (unless one is already
present) and logs a deprecation warning. Operators can migrate by
removing the flag and adding the template entry themselves; until then
the existing behavior is preserved.
2026-05-13 17:44:15 +02:00
adis veletanlic 7ab9e0f518 Merge branch 'main' into upstream-oauth-registration-token 2026-05-13 15:12:18 +02:00
defaultdino 58aeb6add0 fix clippy issue 2026-05-13 13:43:18 +02:00
defaultdino 3f57a9c8c7 resolve comments related to deprecation and transitioning 2026-05-13 13:17:51 +02:00
Eric Eastwood ce3cfe73d9 Pass through max_session_threshold 2026-05-08 13:45:08 -05:00
Eric Eastwood 31f00df71b Add a bit more context for *what* bind address couldn't be parsed (#5637) 2026-05-07 10:32:03 -05:00
Eric Eastwood 8ab60954cf Rename option dangerous_hard_limit_eviction 2026-04-24 19:12:58 -05:00
Eric Eastwood 8d5cb566b1 Add context for what's bad 2026-04-14 15:07:47 -05:00
Eric Eastwood 93312fb97b Add tests for old vs recent 2026-04-09 21:36:39 -05:00
Eric Eastwood fcf6591588 Pass in session_limit to policy as BaseData 2026-04-09 11:01:53 -05:00
Eric Eastwood 8a3acae1ae Revert "Pass in session_limit_config directly to policy"
This reverts commit 724e0cf5ca.
2026-04-09 10:08:31 -05:00
Hugh Nimmo-Smith 53e6d05f40 Add oauth.device_code_grant_enabled configuration option 2026-04-07 11:13:56 +01:00
Eric Eastwood 724e0cf5ca Pass in session_limit_config directly to policy
Revert changes from
https://github.com/element-hq/matrix-authentication-service/pull/5221. I
assume it was done that way as the "session_limit_config" doesn't change
after the server is created. But this makes downstream usage complicated as
you whenever you create `SiteConfig`, you also have to make sure to configure
whatever else is necessary.

Easier to just pass in `session_limit_config` as necessary whenever
we evaluate the policy
2026-04-06 18:28:50 -05:00
Eric Eastwood 5532c0cda9 Better rustdoc links 2026-04-03 17:42:09 -05:00
defaultdino 407f3cb4fa distinguish password vs upstream oauth registration token requirements 2026-04-03 17:41:37 +02:00
Olivier 'reivilibre 5b7b4d61ec Schedule ProvisionUserJob after locking/unlocking user 2026-03-16 13:44:34 +00:00