Skip to content

Commit aa7a3fc

Browse files
David Tellerturt2livedklimpel
authored
MSC3823: Account Suspension (#3823)
* MSC: A code for account suspension Signed-off-by: David Teller <[email protected]> * WIP: Adding prefix * Update proposals/3823-code-for-account-suspension.md Co-authored-by: Travis Ralston <[email protected]> * Apply suggestions from code review Co-authored-by: Dirk Klimpel <[email protected]> * Update for latest requirements * Add list of permitted/forbidden actions * Remove `href` from error code - this will be handled in a later MSC * Match modern template * Clarify MSC * Clarify differences in locking vs suspension, and future scope --------- Signed-off-by: David Teller <[email protected]> Co-authored-by: Travis Ralston <[email protected]> Co-authored-by: Dirk Klimpel <[email protected]> Co-authored-by: Travis Ralston <[email protected]>
1 parent 9deddd1 commit aa7a3fc

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# MSC3823: Account Suspension
2+
3+
Unlike [account locking](https://spec.matrix.org/v1.12/client-server-api/#account-locking), suspension
4+
allows the user to have a (largely) readonly view of their account. Homeserver administrators and
5+
moderators may use this functionality to temporarily deactivate an account, or place conditions on
6+
the account's experience. Critically, like locking, account suspension is reversible, unlike the
7+
deactivation mechanism currently available in Matrix - a destructive, irreversible, action.
8+
9+
This proposal introduces a concept of suspension to complement locking for server admins to use. Locking
10+
is typically more used in narrow scenarios, where the server admin wants to prevent the account from
11+
engaging any further. An example of this may be too many failed password attempts. Suspension is more
12+
general purpose to create a barrier to further action - a "something weird is going on -> suspend"
13+
kind of button.
14+
15+
The error code introduced by this proposal is accompanied by guidelines on how servers can implement
16+
suspension. APIs to invoke or clear suspension are not introduced, and left as an implementation detail.
17+
These will typically be done through an administrator-only API.
18+
19+
## Proposal
20+
21+
When an account is suspended, any [Client-Server API](https://spec.matrix.org/v1.10/client-server-api/)
22+
endpoint MAY return a 403 HTTP status code with `errcode` of `M_USER_SUSPENDED`. This indicates to
23+
the user that the associated action is unavailable.
24+
25+
Clients should note that for more general endpoints, like `/send/:eventType`, suspension MAY only be
26+
applied to a subset of request parameters. For example, a user may be allowed to *redact* events but
27+
not send messages.
28+
29+
The specific list of permitted actions during suspension is left as a deliberate implementation
30+
detail, however a server SHOULD permit the user to:
31+
32+
* Log in/create additional sessions (which should also behave as suspended).
33+
* See and receive messages, particularly via `/sync` and `/messages`.
34+
* [Verify their other devices](https://spec.matrix.org/v1.10/client-server-api/#device-verification)
35+
and write associated [cross-signing data](https://spec.matrix.org/v1.10/client-server-api/#cross-signing).
36+
* [Populate their key backup](https://spec.matrix.org/v1.10/client-server-api/#server-side-key-backups).
37+
* Leave rooms & reject invites.
38+
* Redacting their own events.
39+
* Log out/delete any device of theirs, including the current session.
40+
* Deactivate their account, potentially with a deliberate time delay to discourage making a new
41+
account right away.
42+
* Change or add [admin contacts](https://spec.matrix.org/v1.10/client-server-api/#adding-account-administrative-contact-information),
43+
but not remove. Servers are recommended to only permit this if they keep a changelog on contact information
44+
to prevent misuse.
45+
46+
The recommendation for users to continue receiving/reading messages is largely so the administrator
47+
can maintain contact with the user, where applicable. Future MSCs may improve upon the admin<>user
48+
communication, and account locking may also be used to prevent access to messages.
49+
50+
The suggested set of explicitly forbidden actions is:
51+
52+
* Joining or knocking on rooms, including accepting invites.
53+
* Sending messages.
54+
* Sending invites.
55+
* Changing profile data (display name and avatar).
56+
* Redacting other users' events (when a moderator/admin of a room, for example).
57+
58+
## Potential issues
59+
60+
This proposal does not communicate *why* a user's account is restricted. The human-readable `error`
61+
field may contain some information, though anything comprehensive may not be surfaced to the user.
62+
A future MSC is expected to build a system for both informing the user of the action taken against
63+
their account and allow the user to appeal that action.
64+
65+
## Alternatives
66+
67+
No significant alternatives are plausible. `M_USER_DEACTIVATED` could be expanded with a `permanent`
68+
flag, though ideally each error code should provide meaning on its own.
69+
70+
The related concept of locking, as discussed in places like [MSC3939](https://github.com/matrix-org/matrix-spec-proposals/pull/3939)
71+
and [matrix-org/glossary](https://github.com/matrix-org/glossary), is semantically different from
72+
suspension. Suspension has the key difference that the user is *not* logged out of their client,
73+
typically used by safety teams, while locking *does* log the user out and would primarily be used by
74+
security teams. A future MSC may combine or split the two related error codes into a descriptive set
75+
of capabilities the user can perform.
76+
77+
## Unstable prefixes
78+
79+
Until this proposal is considered stable, implementations must use
80+
`ORG.MATRIX.MSC3823.USER_SUSPENDED` instead of `M_USER_SUSPENDED`.

0 commit comments

Comments
 (0)