Skip to main content

An Mozilla-flavoured SAML MXID mapper for Synapse

Project description

Synapse Mozilla SAML MXID Mapper

A Synapse plugin module which allows users to choose their username when they first log in.


This plugin can be installed via PyPi:

pip install matrix-synapse-saml-mozilla


Add the following in your Synapse config:

       module: "matrix_synapse_saml_mozilla.SamlMappingProvider"

Also, under the HTTP client listener, configure an additional_resource as per the below:

  - port: <port>
    type: http

      - names: [client]

        module: "matrix_synapse_saml_mozilla.pick_username_resource"

Configuration Options

Synapse allows SAML mapping providers to specify custom configuration through the saml2_config.user_mapping_provider.config option.

There are no options currently supported by this provider.

Implementation notes

The login flow looks something like this:

login flow

Development and Testing

This repository uses tox to run linting and tests.


Code is linted with the flake8 tool. Run tox -e lint to check for linting errors in the codebase.


This repository uses unittest to run the tests located in the tests directory. They can be ran with tox -e tests.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for matrix-synapse-saml-mozilla, version 0.1.dev2
Filename, size File type Python version Upload date Hashes
Filename, size matrix-synapse-saml-mozilla-0.1.dev2.tar.gz (14.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page