Kegan DougalandClaude Opus 5 cac8b6e343 Learn, verify and use MSC4430 member links
A member key names no server, so a room full of them is a room whose members
cannot be routed to, served to, or shown to anyone. What a key stands for is
the linkage information on its `m.room.member` event, and this teaches the
server to read it: another server's member can now join one of our member key
rooms over federation, and we learn who they are from the event that put them
there.

A member key's link is the linkage information on its *current*
`m.room.member` event, and nothing else. A member who has left has no link,
because the event that removed them was somebody else's and asserts nothing
about them. Making the mapping a function of the room's current state means
every server that has the state agrees on it, no history is needed to compute
it, and an event arriving late or by backfill cannot change it.

Two signatures decide what a claim is worth. The member key's own makes the
claim theirs, and without it the claim is ignored entirely: on an event the
member sent, the `sender` signature is already that; on an event somebody
else sent about them, it is the signature under `state_key`. The current
server signing key of the claimed domain makes the claim *verified*, and that
is the half that needs the network, so it is the half that can fail for
reasons that are nobody's fault: a domain that does not answer leaves the link
unverified rather than refused, and unverified links are re-checked on a small
bounded loop so that a member whose server was briefly unreachable does not
stay invisible until they next change their membership.

What a link is used for depends on which half holds. The claimed domain is
where the room's traffic goes, verified or not: an unverified claim is
somewhere to send to, and grants nothing. Only a verified link makes a server
a member server — able to be told the room's history, to be served its state,
to be treated as present in it — because anybody can claim anybody's domain.
Events from a key with no verified link are soft failed, so their state
changes still count (membership and power levels are decided by keys, not by
who holds them) but their messages are not shown to clients.

Joining a room of this kind works from either end. A joining server does not
know the room's version until `/make_join` answers, so it cannot know whether
to name its user by ID or by key: it sends the user ID in the path and the key
in `org.matrix.msc4430.member_key`, which a server that has never heard of
MSC4430 ignores. The key is held in memory until the room turns out to want
it, so joining a room without member keys leaves nothing behind, and it is
stored before the join is sent, so a join that succeeds is never one we cannot
sign for afterwards. A resident server accepts a key in either place and
refuses a bare user ID for such a room. Because the sender of a membership
event is a key and not a user ID, the check that the sender belongs to the
requesting server no longer applies: the origin is simply who relayed it, and
what the member claims about their own server is in the event, signed by them.

The end-to-end tests build the remote half by hand, so that a server can be
made to vouch for its member, decline to, vouch for a different one, or lie
about somebody else's. They cover a verified join, an unverified one, a
re-check that succeeds on a later attempt, a member key that moves to another
server and takes its member with it, and a moderator who bans a member while
naming a domain they control and changes nothing about who that member is.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-16 14:02:14 +02:00
2026-09-29 11:15:31 -05:00
2026-09-18 12:00:45 +01:00
2026-09-29 11:15:31 -05:00
2024-11-20 15:01:56 +00:00
2023-12-13 16:15:22 +00:00
2023-12-13 16:15:22 +00:00

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
.. image:: https://github.com/element-hq/synapse/raw/develop/docs/element_logo_white_bg.svg
   :height: 60px

**Element Synapse - Matrix homeserver implementation**

|support| |development| |documentation| |license| |pypi| |python|

Synapse is an open source `Matrix <https://matrix.org>`__ homeserver
implementation, written and maintained by `Element <https://element.io>`_.
`Matrix <https://github.com/matrix-org>`__ is the open standard for secure and
interoperable real-time communications. You can directly run and manage the
source code in this repository, available under an AGPL license (or
alternatively under a commercial license from Element).

There is no support provided by Element unless you have a subscription from
Element.

🚀 Getting started
==================

This component is developed and maintained by `Element <https://element.io>`_.
It gets shipped as part of the **Element Server Suite (ESS)** which provides the
official means of deployment.

ESS is a Matrix distribution from Element with focus on quality and ease of use.
It ships a full Matrix stack tailored to the respective use case.

There are three editions of ESS:

- `ESS Community <https://github.com/element-hq/ess-helm>`_ - the free Matrix
  distribution from Element tailored to small-/mid-scale, non-commercial
  community use cases
- `ESS Pro <https://element.io/server-suite>`_ - the commercial Matrix
  distribution from Element for professional use
- `ESS TI-M <https://element.io/server-suite/ti-messenger>`_ - a special version
  of ESS Pro focused on the requirements of TI-Messenger Pro and ePA as
  specified by the German National Digital Health Agency Gematik


🛠️ Standalone installation and configuration
============================================

The Synapse documentation describes `options for installing Synapse standalone
<https://element-hq.github.io/synapse/latest/setup/installation.html>`_. See
below for more useful documentation links.

- `Synapse configuration options <https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html>`_
- `Synapse configuration for federation <https://element-hq.github.io/synapse/latest/federate.html>`_
- `Using a reverse proxy with Synapse <https://element-hq.github.io/synapse/latest/reverse_proxy.html>`_
- `Upgrading Synapse <https://element-hq.github.io/synapse/develop/upgrade.html>`_


🎯 Troubleshooting and support
==============================

🚀 Professional support
-----------------------

Enterprise quality support for Synapse including SLAs is available as part of an
`Element Server Suite (ESS) <https://element.io/pricing>`_ subscription.

If you are an existing ESS subscriber then you can raise a `support request <https://customer.element.io/support>`_
and access the `Element product documentation <https://docs.element.io>`_.

🤝 Community support
--------------------

The `Admin FAQ <https://element-hq.github.io/synapse/latest/usage/administration/admin_faq.html>`_
includes tips on dealing with some common problems. For more details, see
`Synapse's wider documentation <https://element-hq.github.io/synapse/latest/>`_.

For additional support installing or managing Synapse, please ask in the community
support room |room|_ (from a matrix.org account if necessary). We do not use GitHub
issues for support requests, only for bug reports and feature requests.

.. |room| replace:: ``#synapse:matrix.org``
.. _room: https://matrix.to/#/#synapse:matrix.org

.. |docs| replace:: ``docs``
.. _docs: docs


🛠️ Development
==============

We welcome contributions to Synapse from the community!
The best place to get started is our
`guide for contributors <https://element-hq.github.io/synapse/latest/development/contributing_guide.html>`_.
This is part of our broader `documentation <https://element-hq.github.io/synapse/latest>`_, which includes
information for Synapse developers as well as Synapse administrators.

Developers might be particularly interested in:

* `Synapse's database schema <https://element-hq.github.io/synapse/latest/development/database_schema.html>`_,
* `notes on Synapse's implementation details <https://element-hq.github.io/synapse/latest/development/internal_documentation/index.html>`_, and
* `how we use git <https://element-hq.github.io/synapse/latest/development/git.html>`_.

Alongside all that, join our developer community on Matrix:
`#synapse-dev:matrix.org <https://matrix.to/#/#synapse-dev:matrix.org>`_, featuring real humans!

Copyright and Licensing
=======================

  | Copyright 2014–2017 OpenMarket Ltd
  | Copyright 2017 Vector Creations Ltd
  | Copyright 2017–2025 New Vector Ltd
  | Copyright 2025 Element Creations Ltd

This software is dual-licensed by Element Creations Ltd (Element). It can be
used either:

(1) for free under the terms of the GNU Affero General Public License (as
    published by the Free Software Foundation, either version 3 of the License,
    or (at your option) any later version); OR

(2) under the terms of a paid-for Element Commercial License agreement between
    you and Element (the terms of which may vary depending on what you and
    Element have agreed to).

Unless required by applicable law or agreed to in writing, software distributed
under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the
specific language governing permissions and limitations under the Licenses.

Please contact `licensing@element.io <mailto:licensing@element.io>`_ to purchase
an Element commercial license for this software.


.. |support| image:: https://img.shields.io/badge/matrix-community%20support-success
  :alt: (get community support in #synapse:matrix.org)
  :target: https://matrix.to/#/#synapse:matrix.org

.. |development| image:: https://img.shields.io/matrix/synapse-dev:matrix.org?label=development&logo=matrix
  :alt: (discuss development on #synapse-dev:matrix.org)
  :target: https://matrix.to/#/#synapse-dev:matrix.org

.. |documentation| image:: https://img.shields.io/badge/documentation-%E2%9C%93-success
  :alt: (Rendered documentation on GitHub Pages)
  :target: https://element-hq.github.io/synapse/latest/

.. |license| image:: https://img.shields.io/github/license/element-hq/synapse
  :alt: (check license in LICENSE file)
  :target: LICENSE

.. |pypi| image:: https://img.shields.io/pypi/v/matrix-synapse
  :alt: (latest version released on PyPi)
  :target: https://pypi.org/project/matrix-synapse

.. |python| image:: https://img.shields.io/pypi/pyversions/matrix-synapse
  :alt: (supported python versions)
  :target: https://pypi.org/project/matrix-synapse
S
Description
No description provided
Readme
638 MiB
0 Stars 1 Watchers 0 Forks
Languages
Python 95.2%
Rust 3.5%
HTML 0.4%
Shell 0.3%
Go 0.2%
Other 0.1%