OIDC customization settings not persistent
Matrix (Synapse/Element)
2
Posts
1
Posters
17
Views
1
Watching
-
Hello,
I want to comment out the following entries inhomeserver.yamlso that users can define their matrix usernames.user_mapping_provider: config: #localpart_template: '{{ user.sub }}' #display_name_template: '{{ user.name }}' email_template: '{{ user.email }}'But when restarting the app, the two lines are added again, uncommented, overwriting my changes.
-
Guess it has something to do with
app/pkg/start.sh# oidc if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then echo " ==> Configuring OIDC auth" yq eval -i ".oidc_providers[0].idp_id=\"cloudron\"" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].idp_name=\"${CLOUDRON_OIDC_PROVIDER_NAME:-Cloudron}\"" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].issuer=\"${CLOUDRON_OIDC_ISSUER}\"" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].client_id=\"${CLOUDRON_OIDC_CLIENT_ID}\"" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].client_secret=\"${CLOUDRON_OIDC_CLIENT_SECRET}\"" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].scopes=[\"openid\", \"email\", \"profile\"]" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].authorization_endpoint=\"${CLOUDRON_OIDC_AUTH_ENDPOINT}\"" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].token_endpoint=\"${CLOUDRON_OIDC_TOKEN_ENDPOINT}\"" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].userinfo_endpoint=\"${CLOUDRON_OIDC_PROFILE_ENDPOINT}\"" /app/data/configs/homeserver.yaml # https://s3lph.me/ldap-to-oidc-migration-3-matrix.html yq eval -i ".oidc_providers[0].allow_existing_users=true" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].skip_verification=true" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].user_mapping_provider.config.localpart_template=\"{{ user.sub }}\"" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].user_mapping_provider.config.display_name_template=\"{{ user.name }}\"" /app/data/configs/homeserver.yaml yq eval -i ".oidc_providers[0].user_mapping_provider.config.email_template=\"{{ user.email }}\"" /app/data/configs/homeserver.yaml elseBasically, the script should not update the
homeserver.yamllocalpart_templatekey, if its value was set (manually) tonull(changing it tonullis maybe easier to detect than just commenting it out).