Compare commits

...

4 commits

Author SHA1 Message Date
Johannes Marbach 47cce0ca26 Spec for MSC4312: Resetting cross-signing keys in the OAuth world
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-10-29 09:28:41 +01:00
Johannes Marbach 9d063c8d2d
Add m.login.terms to enumeration of authentication types (#2233)
Some checks are pending
Spec / 🔎 Validate OpenAPI specifications (push) Waiting to run
Spec / 🔎 Check Event schema examples (push) Waiting to run
Spec / 🔎 Check OpenAPI definitions examples (push) Waiting to run
Spec / 🔎 Check JSON Schemas inline examples (push) Waiting to run
Spec / ⚙️ Calculate baseURL for later jobs (push) Waiting to run
Spec / 🐍 Build OpenAPI definitions (push) Blocked by required conditions
Spec / 📢 Run towncrier for changelog (push) Waiting to run
Spec / 📖 Build the spec (push) Blocked by required conditions
Spec / 🔎 Validate generated HTML (push) Blocked by required conditions
Spec / 📖 Build the historical backup spec (push) Blocked by required conditions
Spell Check / Spell Check with Typos (push) Waiting to run
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-10-28 19:05:59 -04:00
Kévin Commaille 74a0d5f289
Silence redocly-cli rule checking examples (#2238)
Some checks failed
Spec / 🔎 Validate OpenAPI specifications (push) Has been cancelled
Spec / 🔎 Check Event schema examples (push) Has been cancelled
Spec / 🔎 Check OpenAPI definitions examples (push) Has been cancelled
Spec / 🔎 Check JSON Schemas inline examples (push) Has been cancelled
Spec / ⚙️ Calculate baseURL for later jobs (push) Has been cancelled
Spec / 📢 Run towncrier for changelog (push) Has been cancelled
Spell Check / Spell Check with Typos (push) Has been cancelled
Spec / 🐍 Build OpenAPI definitions (push) Has been cancelled
Spec / 📖 Build the spec (push) Has been cancelled
Spec / 🔎 Validate generated HTML (push) Has been cancelled
Spec / 📖 Build the historical backup spec (push) Has been cancelled
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2025-10-24 10:19:19 +00:00
Tol Wassman 974b0b721e
fix typo (#2227)
Some checks failed
Spec / 🔎 Validate OpenAPI specifications (push) Has been cancelled
Spec / 🔎 Check Event schema examples (push) Has been cancelled
Spec / 🔎 Check OpenAPI definitions examples (push) Has been cancelled
Spec / 🔎 Check JSON Schemas inline examples (push) Has been cancelled
Spec / ⚙️ Calculate baseURL for later jobs (push) Has been cancelled
Spec / 📢 Run towncrier for changelog (push) Has been cancelled
Spell Check / Spell Check with Typos (push) Has been cancelled
Spec / 🐍 Build OpenAPI definitions (push) Has been cancelled
Spec / 📖 Build the spec (push) Has been cancelled
Spec / 🔎 Validate generated HTML (push) Has been cancelled
Spec / 📖 Build the historical backup spec (push) Has been cancelled
* fix typo

* create newsfragment

This seems to be the standard message for typo fixes.
2025-10-17 17:44:44 -04:00
9 changed files with 86 additions and 7 deletions

View file

@ -0,0 +1 @@
Fix various typos throughout the specification.

View file

@ -0,0 +1 @@
Add `m.login.terms` to enumeration of authentication types.

View file

@ -0,0 +1 @@
Add the `m.oauth` authentication type for User-Interactive Authentication as per [MSC4312](https://github.com/matrix-org/matrix-spec-proposals/pull/4312).

View file

@ -0,0 +1 @@
Silence failing redocly-cli rule.

View file

@ -906,6 +906,8 @@ This specification defines the following auth types:
- `m.login.msisdn`
- `m.login.dummy`
- `m.login.registration_token`
- {{% added-in v="1.11" %}} `m.login.terms`
- {{% added-in v="1.17" %}} `m.oauth`
###### Password-based
@ -1244,6 +1246,40 @@ user during registration, if applicable.
{{% definition path="api/client-server/definitions/m.login.terms_params" %}}
###### OAuth authentication
{{% added-in v="1.17" %}}
| Type | Description |
|-------------------------------|-------------------------------------------------------------------|
| `m.oauth` | Authentication is supported by authorising via the homeserver's OAuth account management web UI. |
{{% boxes/note %}}
The `m.oauth` authentication type is currently only valid on the
[`/keys/device_signing/upload`](/client-server-api/#post_matrixclientv3keysdevice_signingupload) endpoint.
{{% /boxes/note %}}
This authentication type provides homeservers the ability to guard access to
sensitive actions when the client has authenticated via the
[OAuth 2.0 API](/client-server-api/#oauth-20-api), which is otherwise not
compatible with User-Interactive Authentication (UIA). To do so, the server
returns a 401 response on the respective request, where the response body
includes `m.oauth` in the `flows` list, and the `m.oauth` property in the
`params` object has the structure [shown below](#definition-moauth-params).
The client is expected to open the contained URL to let the user confirm the
action in the homeserver's account management web UI. Once the user has done
so, the client submits an `auth` dict with just the `session`, as follows,
to complete the stage:
```json
{
"session": "<session ID>"
}
```
{{% definition path="api/client-server/definitions/m.oauth_params" %}}
##### Fallback
Clients cannot be expected to be able to know how to process every
@ -1590,6 +1626,11 @@ because they don't have access to the user's credentials anymore.
The [User-Interactive Authentication API](#user-interactive-authentication-api)
is not compatible with the OAuth 2.0 API, so the endpoints that depend on it for
authentication can't be used when an access token is obtained with this API.
The only exception to this is the
[`/keys/device_signing/upload`](/client-server-api/#post_matrixclientv3keysdevice_signingupload)
endpoint which uses the [`m.oauth`](/client-server-api/#oauth-authentication)
authentication type.
{{% /boxes/warning %}}
**Sample flow**

View file

@ -20,9 +20,9 @@ Previously, a rich reply could only reference another `m.room.message` event.
{{% boxes/note %}}
{{% changed-in v="1.13" %}}
In previous versions of the specification, rich replies could include a fallback
representation of the original message message in the `body` (using a prefix
sequence) and `formatted_body` (using a custom HTML element) for clients that do
not support rich replies. This is no longer the case, but clients SHOULD still
representation of the original message in the `body` (using a prefix sequence)
and `formatted_body` (using a custom HTML element) for clients that do not
support rich replies. This is no longer the case, but clients SHOULD still
remove this fallback before rendering the event.
To strip the fallback on the `body`, the client should iterate over each

View file

@ -40,10 +40,12 @@ paths:
makes this endpoint idempotent in the case where the response is lost over the network,
which would otherwise cause a UIA challenge upon retry.
{{% boxes/warning %}}
When this endpoint requires User-Interactive Authentication, it cannot be used when the access token was obtained
{{% boxes/note %}}
When this endpoint requires User-Interactive Authentication,
it uses the [`m.oauth`](/client-server-api/#oauth-authentication)
authentication type if the access token was obtained
via the [OAuth 2.0 API](/client-server-api/#oauth-20-api).
{{% /boxes/warning %}}
{{% /boxes/note %}}
operationId: uploadCrossSigningKeys
security:
- accessTokenQuery: []

View file

@ -0,0 +1,29 @@
# Copyright 2025 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
type: object
title: m.oauth params
description: Schema for `m.oauth` entry in the `params` object in a User-Interactive Authentication response.
required: ['url']
properties:
url:
type: string
format: uri
description: |
A URL pointing to the homeserver's OAuth account management web UI
where the user can approve the action. MUST be a valid URI with scheme
`http://` or `https://`, the latter being RECOMMENDED.
example: {
"url": "https://example.org/account/reset-cross-signing"
}

View file

@ -8,4 +8,7 @@ rules:
no-invalid-media-type-examples: off
no-path-trailing-slash: off
operation-2xx-response: off
spec-strict-refs: error
spec-strict-refs: error
# $ref in examples are not spec-compliant, yet we find them useful. Disable this rule
# and instead check example schema using `check-event-schema-examples.py`
no-invalid-schema-examples: off