__matrix_synapse: add --sso-template-dir parameter

This commit is contained in:
fnux 2022-01-24 11:23:38 +01:00
parent 287d8df9bd
commit c32a1836aa
No known key found for this signature in database
GPG key ID: 4502C902C00A1E12
5 changed files with 9 additions and 1 deletions

View file

@ -2191,7 +2191,7 @@ sso:
# You can see the default templates at: # You can see the default templates at:
# https://github.com/matrix-org/synapse/tree/master/synapse/res/templates # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
# #
#template_dir: "res/templates" template_dir: "${SSO_TEMPLATE_DIR:?}"
# JSON web token integration. The following settings can be used to make # JSON web token integration. The following settings can be used to make

View file

@ -205,6 +205,9 @@ saml2-mapping-provider-extra-settings
Extra YAML-formatted key/pair values provided as configuration to the SAML2 Extra YAML-formatted key/pair values provided as configuration to the SAML2
mapping provider module (e.g. 'key: value'). Can be specified multiple times. mapping provider module (e.g. 'key: value'). Can be specified multiple times.
sso-template-dir
Directory used to source SSO-related HTML templates.
extra-setting extra-setting
Arbitrary string to be added to the configuration file. Can be specified multiple times. Arbitrary string to be added to the configuration file. Can be specified multiple times.

View file

@ -220,6 +220,9 @@ if [ -f "$__object/parameter/saml2-mapping-provider-extra-config" ]; then
export SAML2_MAPPING_PROVIDER_EXTRA_CONFIG export SAML2_MAPPING_PROVIDER_EXTRA_CONFIG
fi fi
SSO_TEMPLATE_DIR=$(cat "$__object/parameter/sso-template-dir")
export SSO_TEMPLATE_DIR
if [ -n "$SAML2_SP_KEY" ] && [ -z "$SAML2_SP_CERT" ]; then if [ -n "$SAML2_SP_KEY" ] && [ -z "$SAML2_SP_CERT" ]; then
echo "--saml2-sp-cert must be set if --saml2-sp-key is provided." >&2 echo "--saml2-sp-cert must be set if --saml2-sp-key is provided." >&2
exit 1 exit 1

View file

@ -0,0 +1 @@
res/template

View file

@ -41,3 +41,4 @@ saml2-sp-key
saml2-sp-cert saml2-sp-cert
default-identity-server default-identity-server
saml2-mapping-provider-module saml2-mapping-provider-module
sso-template-dir