Giter Club home page Giter Club logo

synapse's Introduction

Element Synapse - Matrix homeserver implementation

(get community support in #synapse:matrix.org) (discuss development on #synapse-dev:matrix.org) (Rendered documentation on GitHub Pages) (check license in LICENSE file) (latest version released on PyPi) (supported python versions)

Synapse is an open source Matrix homeserver implementation, written and maintained by Element. Matrix 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. There is no support provided from Element unless you have a subscription.

Alternatively, for those that need an enterprise-ready solution, Element Server Suite (ESS) is available as a subscription. ESS builds on Synapse to offer a complete Matrix-based backend including the full Admin Console product, giving admins the power to easily manage an organization-wide deployment. It includes advanced identity management, auditing, moderation and data retention options as well as Long Term Support and SLAs. ESS can be used to support any Matrix-based frontend client.

The Synapse documentation describes how to install Synapse. We recommend using Docker images or Debian packages from Matrix.org.

Synapse has a variety of config options which can be used to customise its behaviour after installation. There are additional details on how to configure Synapse for federation here.

It is recommended to put a reverse proxy such as nginx, Apache, Caddy, HAProxy or relayd in front of Synapse. One advantage of doing so is that it means that you can expose the default https port (443) to Matrix clients without needing to run Synapse with root privileges. For information on configuring one, see the reverse proxy docs.

The instructions for upgrading Synapse are in the upgrade notes. Please check these instructions as upgrading may require extra steps for some versions of Synapse.

Synapse uses a number of platform dependencies such as Python and PostgreSQL, and aims to follow supported upstream versions. See the deprecation policy for more details.

Matrix serves raw, user-supplied data in some APIs -- specifically the content repository endpoints.

Whilst we make a reasonable effort to mitigate against XSS attacks (for instance, by using CSP), a Matrix homeserver should not be hosted on a domain hosting other web applications. This especially applies to sharing the domain with Matrix web clients and other sensitive applications like webmail. See https://developer.github.com/changes/2014-04-25-user-content-security for more information.

Ideally, the homeserver should not simply be on a different subdomain, but on a completely different registered domain (also known as top-level site or eTLD+1). This is because some attacks are still possible as long as the two applications share the same registered domain.

To illustrate this with an example, if your Element Web or other sensitive web application is hosted on A.example1.com, you should ideally host Synapse on example2.com. Some amount of protection is offered by hosting on B.example1.com instead, so this is also acceptable in some scenarios. However, you should not host your Synapse on A.example1.com.

Note that all of the above refers exclusively to the domain used in Synapse's public_baseurl setting. In particular, it has no bearing on the domain mentioned in MXIDs hosted on that server.

Following this advice ensures that even if an XSS is found in Synapse, the impact to other applications will be minimal.

The easiest way to try out your new Synapse installation is by connecting to it from a web client.

Unless you are running a test instance of Synapse on your local machine, in general, you will need to enable TLS support before you can successfully connect from a client: see TLS certificates.

An easy way to get started is to login or register via Element at https://app.element.io/#/login or https://app.element.io/#/register respectively. You will need to change the server you are logging into from matrix.org and instead specify a Homeserver URL of https://<server_name>:8448 (or just https://<server_name> if you are using a reverse proxy). If you prefer to use another client, refer to our client breakdown.

If all goes well you should at least be able to log in, create a room, and start sending messages.

By default, registration of new users via Matrix clients is disabled. To enable it:

  1. In the registration config section set enable_registration: true in homeserver.yaml.
  2. Then either:
    1. set up a CAPTCHA, or
    2. set enable_registration_without_verification: true in homeserver.yaml.

We strongly recommend using a CAPTCHA, particularly if your homeserver is exposed to the public internet. Without it, anyone can freely register accounts on your homeserver. This can be exploited by attackers to create spambots targetting the rest of the Matrix federation.

Your new user name will be formed partly from the server_name, and partly from a localpart you specify when you create the account. Your name will take the form of:

@localpart:my.domain.name

(pronounced "at localpart on my dot domain dot name").

As when logging in, you will need to specify a "Custom server". Specify your desired localpart in the 'User name' box.

Enterprise quality support for Synapse including SLAs is available as part of an Element Server Suite (ESS) subscription.

If you are an existing ESS subscriber then you can raise a support request and access the knowledge base.

The Admin FAQ includes tips on dealing with some common problems. For more details, see Synapse's wider documentation.

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

Identity servers have the job of mapping email addresses and other 3rd Party IDs (3PIDs) to Matrix user IDs, as well as verifying the ownership of 3PIDs before creating that mapping.

They are not where accounts or credentials are stored - these live on home servers. Identity Servers are just for mapping 3rd party IDs to matrix IDs.

This process is very security-sensitive, as there is obvious risk of spam if it is too easy to sign up for Matrix accounts or harvest 3PID data. In the longer term, we hope to create a decentralised system to manage it (matrix-doc #712), but in the meantime, the role of managing trusted identity in the Matrix ecosystem is farmed out to a cluster of known trusted ecosystem partners, who run 'Matrix Identity Servers' such as Sydent, whose role is purely to authenticate and track 3PID logins and publish end-user public keys.

You can host your own copy of Sydent, but this will prevent you reaching other users in the Matrix ecosystem via their email address, and prevent them finding you. We therefore recommend that you use one of the centralised identity servers at https://matrix.org or https://vector.im for now.

To reiterate: the Identity server will only be used if you choose to associate an email address with your account, or send an invite to another user via their email address.

We welcome contributions to Synapse from the community! The best place to get started is our guide for contributors. This is part of our larger documentation, which includes

information for Synapse developers as well as Synapse administrators. Developers might be particularly interested in:

Alongside all that, join our developer community on Matrix: #synapse-dev:matrix.org, featuring real humans!

synapse's People

Contributors

aaronraimist avatar anoadragon453 avatar ara4n avatar babolivier avatar callahad avatar clokep avatar dbkr avatar dependabot[bot] avatar dklimpel avatar erikjohnston avatar fizzadar avatar h-shay avatar half-shot avatar hawkowl avatar illicitonion avatar jaywink avatar kaiyou avatar kegsay avatar lukebarnard1 avatar madlittlemods avatar michaelkaye avatar negativemjark avatar neilisfragile avatar notafile avatar reivilibre avatar richvdh avatar sandhose avatar squahtx avatar turt2live avatar uhoreg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

synapse's Issues

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Issues with docker images

Just wanted to chime in and say that I'm pretty confused by the changes that have been taken into place. Even though I can see that it was my mistake to use the latest tag of the docker image, I still was quite upset to see that my synapse server 'just stopped working' randomly.

I didn't see any form of announcement that this was gonna happen and to me it looks like this was decided from one moment to the other.

If there was an announcement, I clearly missed it though.

Cheers,
v.d.H.

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Docker images

Migration to the new repository has been already "enforced" as per matrix-org/synapse@e1f8440

Wich led to docker images latest ( https://hub.docker.com/layers/matrixdotorg/synapse/latest/images/sha256-f0b0eb32dfe513c3901c9ff4fa5672723c2c0c25c38b06261a95f985a441850b?context=explore ) and development ( https://hub.docker.com/layers/matrixdotorg/synapse/develop/images/sha256-e73a72c932d69d1ca28bb959ad3a48ed58a5e3e2743adfd90fd5058006721e2c?context=explore ) being broken.

As of now, every docker user that wants to have their images up-to-date can't really do it...

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Don't accept threaded receipts for reactions to/replies to/edits of a thread root

Description

Previously, the spec implied that threaded receipts were acceptable when referring to thread roots, or reactions to them etc. but this was a spec bug, which is fixed in matrix-org/matrix-spec#1677 . See matrix-org/matrix-spec-proposals#4037 for more detail.

Synapse's code at

async def _is_event_in_thread(self, event_id: str, thread_id: str) -> bool:
"""
The event must be related to the thread ID (in a vague sense) to ensure
clients aren't sending bogus receipts.
A thread ID is considered valid for a given event E if:
1. E has a thread relation which matches the thread ID;
2. E has another event which has a thread relation to E matching the
thread ID; or
3. E is recursively related (via any rel_type) to an event which
satisfies 1 or 2.
Given the following DAG:
A <---[m.thread]-- B <--[m.annotation]-- C
^
|--[m.reference]-- D <--[m.annotation]-- E
It is valid to send a receipt for thread A on A, B, C, D, or E.
It is valid to send a receipt for the main timeline on A, D, and E.
Args:
event_id: The event ID to check.
thread_id: The thread ID the event is potentially part of.
Returns:
True if the event belongs to the given thread, otherwise False.
"""
# If the receipt is on the main timeline, it is enough to check whether
# the event is directly related to a thread.
if thread_id == MAIN_TIMELINE:
return MAIN_TIMELINE == await self._main_store.get_thread_id(event_id)
# Otherwise, check if the event is directly part of a thread, or is the
# root message (or related to the root message) of a thread.
return thread_id == await self._main_store.get_thread_id_for_receipts(event_id)
reflects the spec bug, accepting incorrect receipts. It should not accept threaded receipts for events that are not in the thread.

Steps to reproduce

  • Create some messages in a room, including a thread
  • Create a reaction to the thread root
  • Send a threaded receipt for the reaction, that gives the thread_id as the ID of the thread root event, implying that the reaction is in the thread
  • Note that Synapse accepts this receipt

Synapse should reject this receipt since a reaction to a thread root is not in the thread.

Homeserver

matrix.org

Synapse Version

1.98.0rc1 (b=matrix-org-hotfixes,c2deef254a)

Installation Method

I don't know

Database

Workers

Multiple workers

Platform

Configuration

Relevant log output

-

Anything else that would be useful to know?

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

What's the plan with all the old issues?

Since the old repo just got archived, what's the plan element is having with all the issues from the old repo? There are surely still many which still apply and are not fixed, but some are probably rotten and can be kept closed.

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Dummy issue

This is a dummy issue so that issue and PR numbers do not conflict between matrix-org/synapse and element-hq/synapse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.