From 912b3cbc95734a4b301375afce0241078d4bb89d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 30 Dec 2019 16:29:56 -0700 Subject: [PATCH 1/3] Move auth events selection to a more appropriate section of the spec This was pretty buried, and feels like a common question. --- .../newsfragments/2392.clarification | 1 + specification/server_server_api.rst | 44 ++++++++++--------- 2 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 changelogs/server_server/newsfragments/2392.clarification diff --git a/changelogs/server_server/newsfragments/2392.clarification b/changelogs/server_server/newsfragments/2392.clarification new file mode 100644 index 00000000..b09420e4 --- /dev/null +++ b/changelogs/server_server/newsfragments/2392.clarification @@ -0,0 +1 @@ +Move auth event selection to a more obvious location. diff --git a/specification/server_server_api.rst b/specification/server_server_api.rst index 62f6916a..a3a57dbf 100644 --- a/specification/server_server_api.rst +++ b/specification/server_server_api.rst @@ -391,28 +391,9 @@ creating a new event in this room should populate the new event's | E4 -.. _`auth events selection`: - -The ``auth_events`` field of a PDU identifies the set of events which give the -sender permission to send the event. The ``auth_events`` for the -``m.room.create`` event in a room is empty; for other events, it should be the -following subset of the room state: - -- The ``m.room.create`` event. -- The current ``m.room.power_levels`` event, if any. -- The sender's current ``m.room.member`` event, if any. -- If type is ``m.room.member``: - - - The target's current ``m.room.member`` event, if any. - - If ``membership`` is ``join`` or ``invite``, the current - ``m.room.join_rules`` event, if any. - - If membership is ``invite`` and ``content`` contains a - ``third_party_invite`` property, the current - ``m.room.third_party_invite`` event with ``state_key`` matching - ``content.third_party_invite.signed.token``, if any. - For a full schema of what a PDU looks like, see the `room version specification`_. + Checks performed on receipt of a PDU ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -466,6 +447,29 @@ specified above. Each room version can have a different algorithm for how the rules work, and which rules are applied. For more detailed information, please see the `room version specification`_. + +Auth events selection +^^^^^^^^^^^^^^^^^^^^^ + +The ``auth_events`` field of a PDU identifies the set of events which give the +sender permission to send the event. The ``auth_events`` for the +``m.room.create`` event in a room is empty; for other events, it should be the +following subset of the room state: + +- The ``m.room.create`` event. +- The current ``m.room.power_levels`` event, if any. +- The sender's current ``m.room.member`` event, if any. +- If type is ``m.room.member``: + + - The target's current ``m.room.member`` event, if any. + - If ``membership`` is ``join`` or ``invite``, the current + ``m.room.join_rules`` event, if any. + - If membership is ``invite`` and ``content`` contains a + ``third_party_invite`` property, the current + ``m.room.third_party_invite`` event with ``state_key`` matching + ``content.third_party_invite.signed.token``, if any. + + Rejection +++++++++ From f59aa563dd6626bbff56bae92d4af82cb56a367f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 1 Jan 2020 11:59:37 -0700 Subject: [PATCH 2/3] Add missing tags to push rules endpoints Without the tags, the endpoints don't end up in the swagger. No changelog for this because it doesn't affect the spec itself. --- api/client-server/pushrules.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/client-server/pushrules.yaml b/api/client-server/pushrules.yaml index a1cbc354..32c3c9a1 100644 --- a/api/client-server/pushrules.yaml +++ b/api/client-server/pushrules.yaml @@ -498,6 +498,8 @@ paths: type: boolean description: Whether the push rule is enabled or not. required: ["enabled"] + tags: + - Push notifications put: summary: "Enable or disable a push rule." description: |- @@ -601,6 +603,8 @@ paths: items: type: string required: ["actions"] + tags: + - Push notifications put: summary: "Set the actions for a push rule." description: |- From 82a626a98a0f6b9ad6cf8db14576c3c10dfa54d2 Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Thu, 2 Jan 2020 02:30:24 -0600 Subject: [PATCH 3/3] Fix link to v4 event ID format in identity service spec Signed-off-by: Aaron Raimist --- specification/identity_service_api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/identity_service_api.rst b/specification/identity_service_api.rst index 7e5a0f02..704f763e 100644 --- a/specification/identity_service_api.rst +++ b/specification/identity_service_api.rst @@ -336,7 +336,7 @@ it would first format the query as ``alice@example.org email ThePepperGoesHere`` After formatting each query, the string is run through SHA-256 as defined by `RFC 4634 `_. The resulting bytes are then encoded using URL-Safe `Unpadded Base64`_ (similar to `room version 4's -event ID format <../../rooms/v4.html#event-ids>`_). +event ID format <../rooms/v4.html#event-ids>`_). An example set of queries when using the pepper ``matrixrocks`` would be::