__matrix_synapse: add --saml2-mapping-provider-module flag

pull/13/head
fnux 1 year ago
parent eecb2b4629
commit b2c1fee672
No known key found for this signature in database
GPG Key ID: 4502C902C00A1E12

@ -1808,7 +1808,15 @@ cat << EOF
# The custom module's class. Uncomment to use a custom module.
#
#module: mapping_provider.SamlMappingProvider
EOF
if [ -n "$SAML2_MAPPING_PROVIDER_MODULE" ]; then
cat << EOF
module: "$SAML2_MAPPING_PROVIDER_MODULE"
EOF
fi
cat << EOF
# Custom configuration values for the module. Below options are
# intended for the built-in provider, they should be changed if
# using a custom module. This section will be passed as a Python

@ -198,6 +198,9 @@ saml2-sp-key
saml2-sp-cert
Path to PEM-formatted cert file for use by PySAML2.
saml2-mapping-provider-module
Name of custom Python module used to map SAML2 attributes to synapse internals.
extra-setting
Arbitrary string to be added to the configuration file. Can be specified multiple times.

@ -210,6 +210,11 @@ if [ -f "$__object/parameter/saml2-sp-cert" ]; then
export SAML2_SP_CERT
fi
if [ -f "$__object/parameter/saml2-mapping-provider-module" ]; then
SAML2_MAPPING_PROVIDER_MODULE=$(cat "$__object/parameter/saml2-mapping-provider-module")
export SAML2_MAPPING_PROVIDER_MODULE
fi
if [ -n "$SAML2_SP_KEY" ] && [ -z "$SAML2_SP_CERT" ]; then
echo "--saml2-sp-cert must be set if --saml2-sp-key is provided." >&2
exit 1

@ -40,3 +40,4 @@ saml2-idp-metadata-url
saml2-sp-key
saml2-sp-cert
default-identity-server
saml2-mapping-provider-module

Loading…
Cancel
Save