Commit Graph
7394 Commits
Author SHA1 Message Date
Quentin Gliech 44c834bc45 mas-context: track cumulative DB query count and time on LogContext
Add db_queries / db_time / db_rows_fetched / db_rows_affected counters to
LogContext, mirroring Synapse's LoggingContext db_txn_count / db_txn_duration_sec.

They are exposed through LogContextStats and its Display, so they appear
automatically in the existing HTTP request-completion and job-completion log
lines.
2026-06-22 14:43:05 +02:00
Quentin Gliech be9c6e64a1 Document the request log line (#5741) 2026-06-18 17:03:48 +02:00
Quentin Gliech f328d2f62f Rephrase slightly the request log documentation 2026-06-18 16:36:05 +02:00
Quentin Gliech 99e7b5834e Record and log the requester on the request log line (#5735) 2026-06-18 14:17:36 +02:00
Quentin Gliech 23d0385fa3 Fix ESS test CI job by pinning the setup-ess-cluster-action to the latest version (#5743) 2026-06-18 14:00:15 +02:00
Quentin Gliech 393b42ed6e docs: document the request log line
Add a reference page describing the `http.server.response` log line and its
fields (method, status, requester, client address, GraphQL operation, request
id, trace id, …), aimed at administrators feeding the logs into a SIEM, with a
table of well-known operations and how to classify them (login, logout, token
issuance, …).
2026-06-18 13:43:59 +02:00
Quentin Gliech fc798b2831 mas-axum-utils: move the RecordAsRequester doc comment onto its method
Addresses review feedback on #5735: the doc describing
`maybe_record_as_requester` belonged on the method, not the trait.
2026-06-18 13:43:59 +02:00
Quentin Gliech e42d85d14e Merge branch 'main' into the requester logging branch 2026-06-18 13:43:59 +02:00
Quentin Gliech 4b4fb86fb8 build(deps): bump actions/github-script from 8.0.0 to 9.0.0 (#5622) 2026-06-18 13:37:38 +02:00
Quentin Gliech e4157b4b02 Log the GraphQL operation type and name (#5736) 2026-06-18 13:34:55 +02:00
Quentin Gliech a0612f4bde ci: pin setup-ess-cluster-action to the latest release/v2 commit
The ESS job was failing because the action's internal `azure/setup-helm` was
unpinned and had drifted to Helm v4 Fixed upstream by pinning Helm to 3.19.4
inside the action
2026-06-18 13:33:02 +02:00
Quentin Gliech cf30f77f75 deps: upgrade reqwest 0.13, sentry 0.48, opentelemetry 0.32 (#5742) 2026-06-18 12:39:41 +02:00
dependabot[bot] e56dccdd68 build(deps): bump actions/github-script from 8.0.0 to 9.0.0
Bumps [actions/github-script](https://github.com/actions/github-script) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/ed597411d8f924073f98dfc5c65a23a2325f34cd...3a2844b7e9c422d3c10d287c895573f7108da1b3)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-17 17:28:52 +00: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 fe622331a8 Admin API: allow listing and viewing of OAuth 2.0 clients (#5710) 2026-06-17 17:44:34 +02:00
Quentin Gliech 63ed796441 Use the public registry hostname in release notes (#5725) 2026-06-17 17:42:43 +02:00
Quentin Gliech 78036a933d Fix the compat session API definition in the admin API spec (#5714) 2026-06-17 17:42:31 +02:00
Quentin Gliech 2ea88c6377 Document what user data is stored and how long it is kept (#5673) 2026-06-17 17:42:17 +02:00
Quentin Gliech 256c5e3ff5 storage: use an enum for the OAuth2ClientFilter client kind 2026-06-17 17:33:03 +02:00
Quentin Gliech d33577cf4d Admin API: filter users based on client usage (#5707) 2026-06-17 17:12:56 +02:00
Quentin Gliech 61cffe2124 Admin API: allow filtering of sessions by creation and last-activity time (#5709) 2026-06-17 17:12:01 +02:00
Quentin Gliech 9464ca8038 Merge branch 'main' into quenting/admin-api/session-time-filters 2026-06-17 17:01:02 +02:00
Quentin Gliech a8ffce8f13 Admin API: allow filtering OAuth 2.0 sessions by multiple clients (#5708) 2026-06-17 16:40:53 +02:00
Quentin Gliech 9815902e9b Allow passing arbitrary values from clients down to upstream OAuth providers (#5677) 2026-06-17 16:28:57 +02:00
Olivier 'reivilibre e856e19638 Update Authelia Sample for OIDC upstream (#5672) 2026-06-17 14:41:03 +01:00
Quentin Gliech d951d0eed5 Remove special case for the empty client filter 2026-06-17 15:15:09 +02:00
Quentin Gliech eb0ef6380c Merge branch 'main' into quenting/upstream-pass-parameters 2026-06-17 14:54:37 +02:00
Quentin Gliech 772360bb4e Trim values before passing them to the upstream auth provider 2026-06-17 14:53:56 +02:00
Olivier 'reivilibre 0b80e523f5 Trim value when reading client_secret_file (#5456) 2026-06-17 13:37:13 +01:00
Quentin Gliech 378df1cdca Bump vite from 8.0.14 to 8.0.16 (#5738) 2026-06-17 14:34:04 +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 b14ad9af59 mas-handlers: expose the GraphQL operation on the response extensions
Define a `GraphQlOperation` type holding the operation type and name, and
attach it to the GraphQL response via the response extensions, so the HTTP
logging middleware can pick it up. The operation type is resolved from the
parsed query document, which is cached on the request and reused by the
executor.
2026-06-17 14:14:24 +02:00
Quentin Gliech be257bf683 mas-handlers: record the requester at the remaining auth sites
Record the requester for the admin API, GraphQL, the compat
login/logout/logout_all/refresh endpoints, and the OAuth2 token (the
authenticated client) and introspection (the introspecting client, or the
homeserver) endpoints. Introspection records the caller, never the subject
of the introspected token.

The request test helper now runs each request inside a `LogContext`, with
a helper to assert the recorded requester.
2026-06-17 14:14:23 +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 Gliech 715d516430 mas-axum-utils: record the requester at shared auth points
Add a `RecordAsRequester` trait mapping domain types (User, BrowserSession,
OAuth2 Session, CompatSession, Client) to a `Requester`, and record it from
the two shared auth-resolution points: `SessionInfo::load_active_session`
(browser sessions) and `AccessToken::fetch` (OAuth2 bearer tokens).
2026-06-17 14:14:23 +02:00
Quentin Gliech c6cd294777 mas-context: add a Requester to the LogContext
Add a `Requester` enum (a user, an OAuth2 client, or the homeserver) stored
in a set-once slot on the `LogContext`. This lets request handlers record
which entity authenticated a request so it can be logged later.
2026-06-17 14:14:23 +02:00
Quentin Gliech 2452cd88c0 Bump Rust to 1.96.0 and fix clippy lints (#5733) 2026-06-17 14:04:45 +02:00
matrixbot d178c9289d Automatic merge back to main (#5740) 2026-06-17 14:03:58 +02:00
Olivier 'reivilibre c857375528 Update crates/config/src/sections/mod.rs 2026-06-17 12:45:30 +01:00
Olivier 'reivilibre 119f5195a8 CI: Test against ESS (#5582) 2026-06-17 11:53:33 +01: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
github-actions[bot] c7fd1f9862 1.19.0 v1.19.0 2026-06-17 10:32:44 +00:00
matrixbot ed1f1b831e Translations updates for v1.19 (#5739) 2026-06-17 12:27:56 +02:00
github-actions[bot] a8bc6d326b Translations updates 2026-06-17 10:18:38 +00:00
Quentin Gliech e1f69b8aa6 Bump mozilla-actions/sccache-action from 0.0.9 to 0.0.10 (#5719) 2026-06-17 10:02:03 +02:00