Skip to content

Commit 9e45037

Browse files
authored
Remove keyId from the server keys endpoints (matrix-org#1350)
* Remove keyId from the server keys endpoints It has been deprecated forever. Besides, the OpenAPI 3 spec doesn't allow optional path parameters. Signed-off-by: Kévin Commaille <[email protected]> * Add newsfragment Signed-off-by: Kévin Commaille <[email protected]> * Fix broken link Signed-off-by: Kévin Commaille <[email protected]> * Mention MSC3938 in newfragment Signed-off-by: Kévin Commaille <[email protected]> Signed-off-by: Kévin Commaille <[email protected]>
1 parent eb2456c commit 9e45037

File tree

5 files changed

+9
-32
lines changed

5 files changed

+9
-32
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove `keyId` from the server `/keys` endpoints, as per [MSC3938](https://github.com/matrix-org/matrix-spec-proposals/pull/3938).

content/rooms/fragments/v5-signing-requirements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ When validating event signatures, servers MUST enforce the
33
`valid_until_ts` property from a key request is at least as large as the
44
`origin_server_ts` for the event being validated. Servers missing a copy
55
of the signing key MUST try to obtain one via the [GET
6-
/\_matrix/key/v2/server](/server-server-api#get_matrixkeyv2serverkeyid)
6+
/\_matrix/key/v2/server](/server-server-api#get_matrixkeyv2server)
77
or [POST
88
/\_matrix/key/v2/query](/server-server-api#post_matrixkeyv2query)
99
APIs. When using the `/query` endpoint, servers MUST set the

content/server-server-api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ draft](https://github.com/matrix-org/matrix-doc/blob/51faf8ed2e4a63d4cfd6d231836
208208
{{% /boxes/note %}}
209209

210210
Each homeserver publishes its public keys under
211-
`/_matrix/key/v2/server/{keyId}`. Homeservers query for keys by either
212-
getting `/_matrix/key/v2/server/{keyId}` directly or by querying an
211+
`/_matrix/key/v2/server`. Homeservers query for keys by either
212+
getting `/_matrix/key/v2/server` directly or by querying an
213213
intermediate notary server using a
214-
`/_matrix/key/v2/query/{serverName}/{keyId}` API. Intermediate notary
215-
servers query the `/_matrix/key/v2/server/{keyId}` API on behalf of
214+
`/_matrix/key/v2/query/{serverName}` API. Intermediate notary
215+
servers query the `/_matrix/key/v2/server` API on behalf of
216216
another server and sign the response with their own key. A server may
217217
query multiple notary servers to ensure that they all report the same
218218
public keys.
@@ -239,7 +239,7 @@ homeserver and for signing events. It contains a list of
239239
Servers may query another server's keys through a notary server. The
240240
notary server may be another homeserver. The notary server will retrieve
241241
keys from the queried servers through use of the
242-
`/_matrix/key/v2/server/{keyId}` API. The notary server will
242+
`/_matrix/key/v2/server` API. The notary server will
243243
additionally sign the response from the queried server before returning
244244
the results.
245245

data/api/server-server/keys_query.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ consumes:
2525
produces:
2626
- application/json
2727
paths:
28-
"/query/{serverName}/{keyId}":
28+
"/query/{serverName}":
2929
get:
3030
summary: Query for another server's keys
3131
description: |-
@@ -39,17 +39,6 @@ paths:
3939
description: The server's DNS name to query
4040
required: true
4141
x-example: matrix.org
42-
- in: path
43-
name: keyId
44-
type: string
45-
description: |-
46-
**Deprecated**. Servers should not use this parameter and instead
47-
opt to return all keys, not just the requested one. The key ID to
48-
look up.
49-
50-
When excluded, the trailing slash on this endpoint is optional.
51-
required: false
52-
x-example: "ed25519:abc123"
5342
- in: query
5443
name: minimum_valid_until_ts
5544
type: integer

data/api/server-server/keys_server.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ basePath: /_matrix/key/v2
2323
produces:
2424
- application/json
2525
paths:
26-
"/server/{keyId}":
26+
"/server":
2727
get:
2828
summary: Get the homeserver's public key(s)
2929
description: |-
@@ -43,19 +43,6 @@ paths:
4343
from the server so that the signatures of old events can still be
4444
checked.
4545
operationId: getServerKey
46-
parameters:
47-
- in: path
48-
name: keyId
49-
type: string
50-
description: |-
51-
**Deprecated**. Servers should not use this parameter and instead
52-
opt to return all keys, not just the requested one. The key ID to
53-
look up.
54-
55-
When excluded, the trailing slash on this endpoint is optional.
56-
required: false
57-
x-example: "ed25519:abc123"
58-
deprecated: true
5946
responses:
6047
200:
6148
description: The homeserver's keys

0 commit comments

Comments
 (0)