-
Notifications
You must be signed in to change notification settings - Fork 448
MSC2457: Invalidating devices during password modification #2457
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 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1facf7f
Add an MSC proposal for how to handle sessions when modifying a passw…
clokep 61b306f
Remove concerns about backwards compatibility.
clokep 2d2731e
Remove duplicated word.
clokep 745f8c0
Fix incorrect statement about the current spec's guidance.
clokep 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
53 changes: 53 additions & 0 deletions
53
proposals/2457-password-modification-invalidating-devices.md
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,53 @@ | ||
| # Invalidating devices during password modification | ||
|
|
||
| There are multiple use cases for why a user might want to modify their password: | ||
|
|
||
| * Adopting a password manager (to use a unique password or more secure password). | ||
| * Password rotation. | ||
| * Re-secure a compromised account. | ||
| * ... probably tons of others ... | ||
|
|
||
| These can be summarized into two groups: | ||
|
|
||
| 1. "My account has been compromised and I need to re-secure it." | ||
| 2. "I just want to change my password." | ||
|
|
||
| The [current Matrix specification](https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-account-password) | ||
| does not provide a way to differentiate between these use cases. It gives no | ||
| guidance into what should happen to other sessions / devices when a password is | ||
| modified and leaves it up to the implementation. | ||
|
|
||
| It is reasonable for a client to want to specify this behavior to offer two | ||
| different workflows: | ||
|
|
||
| 1. Modify a password and log all other devices out (for use when an account has | ||
| been compromised). | ||
| 2. Modify a password and do not touch any session data (for use in a | ||
| non-malicious situations). | ||
|
|
||
| Alternately a client may default to whichever workflow is best for their users. | ||
|
|
||
| ## Proposal | ||
|
|
||
| An optional field is added to the JSON body body of the [password reset endpoint](https://matrix.org/docs/spec/client_server/r0.6.0#post-matrix-client-r0-account-password) | ||
|
clokep marked this conversation as resolved.
Outdated
|
||
| called `logout_devices`. This is a boolean flag (defaulting to `true`) that | ||
| signals to whether other devices and sessions should be invalidated after | ||
| modifying the password. | ||
|
|
||
| ## Potential issues | ||
|
|
||
| While Synapse defaults to the behavior of invalidating other devices and | ||
| sessions this may not be true of other implementations. Thus, a default of | ||
|
clokep marked this conversation as resolved.
Outdated
|
||
| `true` may not be backwards compatible. It might be more prudent to specify that | ||
| the behavior of not specifying the `logout_devices` flag is undefined. | ||
|
|
||
| ## Alternatives | ||
|
|
||
| Provide a new endpoint in a future version that supports an additional field (as | ||
| above), using a new endpoint would avoid backwards compatibility issues. | ||
|
|
||
| ## Security considerations | ||
|
|
||
| By defaulting to invalidating devices and sessions the security considerations | ||
| of this endpoint should remain intact. A client will need to be modified to | ||
| choose to keep other devices active. | ||
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.