Clarify how implementations of federation /send
are to apply Server Access Control Lists on a "per PDU basis"
#1784
Labels
clarification
An area where the expected behaviour is understood, but the spec could do with being more explicit
Link to problem area:
https://spec.matrix.org/v1.10/server-server-api/#server-access-control-lists-acls
https://spec.matrix.org/v1.10/client-server-api/#mroomserver_acl
https://spec.matrix.org/v1.10/server-server-api/#checks-performed-on-receipt-of-a-pdu
Issue
The description of the
m.room.server_acl
event says the followingThe specification is incorrect that Server ACLs are only applied to the network layer, because in the server-server spec describing which endpoints need to be protected, the spec says:
Which implies that
federation/v1/send
cannot reply with403
andM_FORBIDDEN
. If we make a reasonable assumption of the specification's intent, then we can assume that implementations must fail PDUs but it is unclear how or when with regards to the section describing checks performed on PDUs.It is also unclear whether events are failed only when the federation send request originates from a server that is denied by the server ACL or whether the PDU itself originates from a server denied by the server ACL. It is understood to me that implementations can only reasonably perform the former, because backfilling is unprotected from server ACL. The reason being you would otherwise cause all historical events from a denied server to fail a per-PDU server ACL check.
Possible solution
A possible solution could be adding a step after
2. Passes signature checks, otherwise it is dropped.
that checks the event's origin against the current state form.room.server_acl
when the request origin also matches against the current state form.room.server_acl
.The text was updated successfully, but these errors were encountered: