-
Notifications
You must be signed in to change notification settings - Fork 411
MSC3967: Do not require UIA when first uploading cross signing keys #3967
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8cde378
Placeholder
hughns c14d424
MSC3967: Do not require UIA when first uploading cross signing keys
hughns 11500f2
Lint length
hughns 21b36a1
Apply suggestions from code review
hughns c831891
Suggestion from review
hughns e2c02ae
Issue with Synapse compliance is being tracked elsewhere
hughns 5bcf40b
Line length
hughns 9c728d5
Update 3967-device-signing-upload-uia.md
kegsay ae7a731
Update proposals/3967-device-signing-upload-uia.md
kegsay 6d1c029
Update 3967-device-signing-upload-uia.md
kegsay 36c750c
Update 3967-device-signing-upload-uia.md
kegsay ee8f717
Update 3967-device-signing-upload-uia.md
kegsay c99401b
Update proposals/3967-device-signing-upload-uia.md
kegsay 267ee09
Update 3967-device-signing-upload-uia.md
kegsay f9fd916
Update 3967-device-signing-upload-uia.md
kegsay b99d685
Update proposals/3967-device-signing-upload-uia.md
turt2live File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# MSC3967: Do not require UIA when first uploading cross signing keys | ||
|
||
When a user first sets up end-to-end encryption cross-signing, their client uploads their cross-signing keys to the server. | ||
|
||
This [upload operation](https://spec.matrix.org/v1.6/client-server-api/#post_matrixclientv3keysdevice_signingupload) | ||
requires a higher level of security by applying User-Interactive Auth (UIA) to the endpoint. | ||
|
||
This creates a usability issue at the point of user registration where a client will typically want to immediately set | ||
up cross-signing for a new user. | ||
|
||
The issue is that the client will immediately need the user to re-authenticate even though the user just authenticated. | ||
|
||
This usability issue has given rise to workarounds such as a | ||
[configurable grace period](https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#ui_auth) | ||
kegsay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
(`ui_auth`.`session_timeout`) in Synapse whereby UIA will not be required for uploading cross-signing keys where | ||
authentication has taken place recently. | ||
|
||
This proposal aims to provide for a standard way to address this UIA usability issue with respect to setting up cross-signing. | ||
|
||
## Proposal | ||
|
||
For the `POST /_matrix/client/v3/keys/device_signing/upload` endpoint the Homeserver should only require User-Interactive | ||
Authentication (UIA) if the user already has an existing cross-signing master key uploaded to the Homeserver. | ||
|
||
kegsay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Potential issues | ||
|
||
The Client-Server API [spec](https://spec.matrix.org/v1.6/client-server-api/#user-interactive-api-in-the-rest-api) states: | ||
|
||
> A request to an endpoint that uses User-Interactive Authentication never succeeds without auth. Homeservers may allow | ||
requests that don’t require auth by offering a stage with only the m.login.dummy auth type, but they must still give a | ||
401 response to requests with no auth data. | ||
|
||
Does this mean that the endpoint can't simply give back a `200` response in the case that `auth` was not given as an | ||
input? If this is the case then the existing Synapse behaviour of allowing a UIA grace period is probably also non-compliant. | ||
hughns marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Alternatives | ||
|
||
There has been some discussion around how to improve the usability of cross-signing more generally. It may be that an | ||
alternative solution is to provide a way to set up cross-signing in a single request. | ||
|
||
## Security considerations | ||
|
||
This change could be viewed as a degradation of security at the point of setting up cross-signing in that it requires | ||
less authentication to upload cross-signing keys on first use. | ||
|
||
However, this degradation needs to be weighed against the typical real world situation where a Homeserver will be | ||
applying a grace period and so allow a malicious actor to bypass UIA for a period of time after each authentication. | ||
|
||
## Unstable prefix | ||
|
||
Not applicable as client behaviour need not change. | ||
|
||
## Dependencies | ||
|
||
None. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.