This mapping provider strips the @domain.com part from UIDs coming from a SAML2 identity provider (IDP). This is useful for example when using Google Apps as an IDP, to avoid getting Matrix IDs like jane.doe=40domain.com@domain.com (instead you’ll get jane.doe@domain.com).
Note: At the time of this writing, the support for user-configurable mapping providers hasn’t been released yet. You will probably have to wait for Synapse 1.7 or 1.8, or install an unreleased version of Synapse.
Installation
Run the following command in the same virtual environment of your Synapse install:
pip install matrix-saml-strip-hostname
Then edit the homeserver.yaml file on your Synapse install to use the new mapping provider:
saml2_config:
user_mapping_provider:
module: matrix_saml_strip_hostname.mapping_providers.StripHostnameSamlMappingProvider
Configuration
This mapper inherits from the default mapping provider. It will first strip the hostname, and then pass the result to the synapse.handlers.saml_handler.DefaultSamlMappingProvider mapping provider. There is no support for disabling this post-processing.
Refer to the default configuration file for configuration options for the default provider.
Release files for matrix-saml-strip-hostname 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| matrix_saml_strip_hostname-0.2.2.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| matrix_saml_strip_hostname-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / matrix_saml_strip_hostname-0.2.2.tar.gz
| Download URL | matrix_saml_strip_hostname-0.2.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
002516124dd75e9fcc3bfe4141607624cece72cb4aa5d17f7c2c4c33457f4c4d
|
|
BLAKE2b-256 checksum How to use checksums |
9810842a8e670d7684a0ede890791c7a316a86d0237369bf9658af3beb0c1115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|
Release files / matrix_saml_strip_hostname-0.2.2-py3-none-any.whl
| Download URL | matrix_saml_strip_hostname-0.2.2-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9585b0595700457245f63b62eac7a246ca777f669e6eb87ebf18fc6578fc690
|
|
BLAKE2b-256 checksum How to use checksums |
69fe19a6b3cf992eefd846e52855254e1b95cb48978957eb9143ccda94992ff2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|