__matrix_synapse: add --saml2-mapping-provider-extra-settings flag

This commit is contained in:
fnux 2022-01-16 12:41:03 +01:00
parent c198a74a34
commit 974e42e20e
No known key found for this signature in database
GPG key ID: 4502C902C00A1E12
4 changed files with 21 additions and 0 deletions

View file

@ -1846,6 +1846,17 @@ cat << EOF
# value will be used instead.
#
#mxid_mapping: dotreplace
EOF
if [ -n "$SAML2_MAPPING_PROVIDER_EXTRA_CONFIG" ]; then
echo "$SAML2_MAPPING_PROVIDER_EXTRA_CONFIG" | while IFS= read -r entry; do
cat << EOF
$entry
EOF
done
fi
cat << EOF
# In previous versions of synapse, the mapping from SAML attribute to
# MXID was always calculated dynamically rather than stored in a

View file

@ -201,6 +201,10 @@ saml2-sp-cert
saml2-mapping-provider-module
Name of custom Python module used to map SAML2 attributes to synapse internals.
saml2-mapping-provider-extra-settings
Extra YAML-formatted key/pair values provided as configuration to the SAML2
mapping provider module (e.g. 'key: value'). Can be specified multiple times.
extra-setting
Arbitrary string to be added to the configuration file. Can be specified multiple times.

View file

@ -215,6 +215,11 @@ if [ -f "$__object/parameter/saml2-mapping-provider-module" ]; then
export SAML2_MAPPING_PROVIDER_MODULE
fi
if [ -f "$__object/parameter/saml2-mapping-provider-extra-config" ]; then
SAML2_MAPPING_PROVIDER_EXTRA_CONFIG=$(cat "$__object/parameter/saml2-mapping-provider-extra-config")
export SAML2_MAPPING_PROVIDER_EXTRA_CONFIG
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

View file

@ -5,3 +5,4 @@ app-service-config-file
extra-setting
bind-address
outbound-federation-worker
saml2-mapping-provider-extra-config