Skip to content

Commit

Permalink
Document the checks made for incoming PDUs
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Dec 13, 2018
1 parent 0f7e285 commit ee9c010
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions specification/server_server_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,22 @@ Authorization of PDUs
~~~~~~~~~~~~~~~~~~~~~

Whenever a server receives an event from a remote server, the receiving server
must check that the event is allowed by the authorization rules. These rules
depend on the state of the room at that event.
must ensure that the event:

1. Is a valid event, otherwise it is dropped
2. Passes signature checks, otherwise it is dropped.
3. Passes hash checks, otherwise it is redacted before being processed
further.
4. Passes authorization rules based on the event's auth events, otherwise it
is rejected.
5. Passes authorization rules based on the state at the event, otherwise it
is rejected.
6. Passes auth rules based on the current state of the room, otherwise it
is "soft failed".

Further details of these checks, and how to handle failures, are described
below.


Definitions
+++++++++++
Expand Down

0 comments on commit ee9c010

Please sign in to comment.