Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ShadowJonathan opened this issue May 22, 2022 · 1 comment · May be fixed by #1161
Open

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

ShadowJonathan opened this issue May 22, 2022 · 1 comment · May be fixed by #1161

Comments

@ShadowJonathan
Copy link

ShadowJonathan commented May 22, 2022

Related: ruma/ruma#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
Copy link
Author

ShadowJonathan commented May 22, 2022

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.

NicolaiSoeborg added a commit to NicolaiSoeborg/hydrogen-web that referenced this issue Jan 28, 2024
Fixes element-hq#741

"Tested" locally by rewriting `r0` to `v3` in reverse proxy (Caddy) and seeing `All keys are backed up.` instead of repeated failing PUT requests towards Conduit (home server)

```
matrix.example.com {
    rewrite /_matrix/client/r0/room_keys/keys /_matrix/client/v3/room_keys/keys?{query}
    reverse_proxy /_matrix/* localhost:8448
}
```
@NicolaiSoeborg NicolaiSoeborg linked a pull request Jan 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant