Update for closed regsitration release

This commit is contained in:
Johannes Zellner
2024-02-23 16:45:18 +01:00
parent 6fa11cf195
commit 0c77e8c32a
6 changed files with 12 additions and 78 deletions

View File

@@ -30,33 +30,7 @@ sed -e "s/DB_HOST=.*/DB_HOST=${CLOUDRON_POSTGRESQL_HOST}/g" \
-e "s/WEB_DOMAIN=.*/WEB_DOMAIN=${CLOUDRON_APP_DOMAIN}/g" \
-i /app/data/env.production
# migrate LDAP settings to OIDC (should be removed on the next release)
if grep -q "^LDAP_ENABLED" /app/data/env.production; then
# get rid LDAP settings
sed -e "s/LDAP_.*//g" \
-e "s/# SSO configuration//g" \
-i /app/data/env.production
cat >> /app/data/env.production <<EOT
# SSO configuration
OIDC_ENABLED=
OIDC_DISPLAY_NAME=
OIDC_ISSUER=
OIDC_CLIENT_ID=
OIDC_CLIENT_SECRET=
OIDC_REDIRECT_URI=
OIDC_DISCOVERY=
OIDC_SCOPE=
OIDC_UID_FIELD=
OIDC_SECURITY_ASSUME_EMAIL_IS_VERIFIED=
EOT
fi
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
# should be removed on the next release
echo "==> migrating LDAP users to OIDC"
/app/pkg/migrateUsers.js
echo "==> Setting up OIDC"
sed -e "s/OIDC_ENABLED=.*/OIDC_ENABLED=true/g" \
-e "s/OIDC_DISPLAY_NAME=.*/OIDC_DISPLAY_NAME=Cloudron/g" \