hydrogen-web icon indicating copy to clipboard operation
hydrogen-web copied to clipboard

`PUT /_matrix/client/r0/room_keys/keys` is used, while it was never specced.

Open ShadowJonathan opened this issue 3 years ago • 1 comments

Related: https://github.com/ruma/ruma/issues/1125

Came up in https://gitlab.com/famedly/conduit/-/issues/262

Some context, the room_keys had a bumpy road towards specification, and only landed in v1.1 when v3 versions were mandatory.

However, during that time, only a subset of the room_keys APIs were specified under r0, specifically PUT .../r0/room_keys/keys was never specced pre-v1.1.

Synapse has a more lenient catch-all for r0 paths to v3 paths, but conduit follows ruma, which follows the spec rigorously, where there currently exist no released version that specifies r0 for this endpoint.

See the relevant ruma code;

https://github.com/ruma/ruma/blob/74423b7a4e12254ca4fc40b3a35bc1c83bb216dc/crates/ruma-client-api/src/backup/add_backup_keys.rs#L18-L24

And relevant spec area;

https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3room_keyskeys

ShadowJonathan avatar May 22 '22 10:05 ShadowJonathan

After some discussion in #matrix-spec, it's clear that r0 is technically not assured to exist on any matrix server (even using r0.6.1), as it was never specified, even though it passed FCP during a time where r0 versioning was used.

So I suggest switching to using /unstable/ for this endpoint (and possibly also all other room_keys endpoints), unless v1.1 support is detected on the server, then using v3 is supported, and assured.

ShadowJonathan avatar May 22 '22 16:05 ShadowJonathan