Skip to content

kenneth-larsson/matrix-saml-strip-hostname

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Matrix SAML hostname stripper

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 mappping 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.

About

SAML mapping provider to strip hostnames from mxids

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%