Skip to content

Commit 8f25d7d

Browse files
committed
Do not require UIA when first uploading cross-signing keys
As per MSC3967. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
1 parent 041be54 commit 8f25d7d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

data/api/client-server/cross_signing.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,26 @@ paths:
1919
/keys/device_signing/upload:
2020
post:
2121
x-addedInMatrixVersion: "1.1"
22+
x-changedInMatrixVersion:
23+
"1.11": UIA is not always required for this endpoint.
2224
summary: Upload cross-signing keys.
2325
description: |-
2426
Publishes cross-signing keys for the user.
2527
2628
This API endpoint uses the [User-Interactive Authentication API](/client-server-api/#user-interactive-authentication-api).
29+
30+
User-Interactive Authentication is required, except in these cases:
31+
- there is no existing cross-signing master key uploaded to the homeserver, OR
32+
- there is an existing cross-signing master key and it exactly matches the
33+
cross-signing master key provided in the request body. If there are any additional
34+
keys provided in the request (self-signing key, user-signing key) they MUST also
35+
match the existing keys stored on the server. In other words, the request contains
36+
no new keys.
37+
38+
This allows clients to freely upload 1 set of keys, but not modify/overwrite keys if
39+
they already exist. By allowing clients to upload the same set of keys more than once,
40+
this makes this endpoint idempotent in the case where the response is lost over the
41+
network, which would otherwise cause a UIA challenge upon retry.
2742
operationId: uploadCrossSigningKeys
2843
security:
2944
- accessTokenQuery: []

0 commit comments

Comments
 (0)