A passwordless token with a username template and no address registers
with only a display name when
`account.passwordless_registration_without_email_allowed` is set. It
defaults to `false`, and such a token then asks for an email address and
sends a code to it, as any other passwordless token does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJYzLPE3gYfDmVwZVC9
A new `authorization_grant/skip_consent` entrypoint returns whether an
authorization code grant is approved without asking the user. The
consent page evaluates it after the violation check, and if it's true,
approves the grant and redirects to the client as the Allow button does.
The default policy skips consent only when `policy.data.skip_consent`
is set and all of these hold:
- the grant is an authorization code grant, not a device code grant;
- it asks for nothing beyond `openid` and the Matrix C-S API and device
scopes, and passes the violation check;
- the account was created within `max_account_age_seconds`;
- the user has no active sessions;
- the client is listed in `client_ids`, when that list is set.
Without that data nothing changes. Listing clients is what keeps the
code with a known client: an operator sets a static client's redirect
URIs, while a dynamically registered client chooses its own. Without the
list, any client qualifies. The age and session conditions narrow the
skip to the first sign-in right after registering, when the consent
screen tells a new user nothing.
The entrypoint is required, as the existing ones are, so a custom
`policy.wasm` must define it: `default skip_consent := false` is
enough. A rule left undefined counts as `false`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f
An unset `telemetry.sentry.traces_sample_rate` used to mean a rate of
0.0, which still records the transaction of any request carrying a
sampled `sentry-trace` header. Since any client can send that header,
leaving the option unset now disables tracing entirely. Setting it to
0.0 explicitly keeps the previous behaviour.
Exposes a new query telling whether a given username is available for
registration, and if not, why: already taken, or rejected by the
registration policy. A username reserved on the homeserver side is
deliberately reported as taken, mirroring the ambiguity of the
registration form, which doesn't tell the two apart either.
Because the query reveals whether a username exists, it is rate-limited
per requester, configurable through the new
`rate_limiting.username_availability` option.
Add a dedicated `device_code_link` rate limiter for device authorization user code verification.
This is to help mitigate the User Code Brute Forcing attack as described by [RFC 8628 section 5.1](https://datatracker.ietf.org/doc/html/rfc8628#section-5.1)
Proposed default is 1 per minute and burst of 10. This can be overridden by the server admin.
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.
Fixes#5572Fixes#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.
When a browser signs out (or discovers its session was ended), the
session cookie now remembers when that happened; the flag is cleared by
the next successful login. The `additional_authorization_parameters`
templates can read it as `logged_out`, so operators can force a fresh
prompt at the upstream provider after sign-out, e.g.:
additional_authorization_parameters:
prompt: "{% if logged_out %}login{% endif %}"
This addresses the "sign out signs me back in" loop with upstream SSO
providers that still hold a live session.
Fixes#1569
branding.logo_uri was accepted and validated by the config layer but never
plumbed through to SiteConfig or any template, so it had no effect. Remove the
field and regenerate the committed config schema to remove the confusion.
This was done by auditing what's in the `mas-config` crate (and resulting
config JSON schema) and comparing it to the current configuration options
documentation.
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, …).
Updates the field doc-comment to describe the new templating semantics
and adds a deprecation note on `forward_login_hint` pointing to the
recommended replacement. Regenerates the JSON schema.
The runtime behavior (template rendering, forward_login_hint
soft-deprecation) is wired up in follow-up commits.