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.

Installation

This plugin can be installed via PyPi:

pip install matrix-synapse-saml-mozilla

Config

Add the following in your Synapse config:

   saml2_config:
     user_mapping_provider:
       module: "matrix_synapse_saml_mozilla.SamlMappingProvider"

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

listeners:
  - port: <port>
    type: http

    resources:
      - names: [client]

    additional_resources:
      "/_matrix/saml2/pick_username":
        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.

Linting

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

Tests

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.

Source Distribution

matrix-synapse-saml-mozilla-0.1.dev5.tar.gz (15.0 kB view details)

Uploaded Source

File details

Details for the file matrix-synapse-saml-mozilla-0.1.dev5.tar.gz.

File metadata

  • Download URL: matrix-synapse-saml-mozilla-0.1.dev5.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for matrix-synapse-saml-mozilla-0.1.dev5.tar.gz
Algorithm Hash digest
SHA256 aa3492acf5a006289fdbf60b65b7af13a2b00bf221bd599dbbdceb7cb57caf86
MD5 bcafef661caf696295aebb5d81de36f9
BLAKE2b-256 aa92b17ab0b183806660f182bcc5238cfdac302628178c37c3ff47d490576972

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page