From 8b90b17701f8ef9ce385e453a90925d17eb395e2 Mon Sep 17 00:00:00 2001 From: Akhil Date: Wed, 5 Oct 2022 21:54:27 +0530 Subject: [PATCH 1/2] Add oidc login app --- Dockerfile | 9 +++++++++ custom_entrypoint.sh | 1 + 2 files changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 02371989..e8a2a259 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ ARG EA_TAG="2.1.1" ARG ECLOUD_LAUNCHER_JOB_ID="389373" ARG GOOGLE_INTEGRATION_VERSION="1.0.8" ARG LDAP_WRITE_SUPPORT_VERSION="1.4.0" +ARG OIDC_LOGIN_VERSION="2.3.3" RUN sed -i 's/23,0,9,1/23,0,9,10/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / @@ -101,6 +102,11 @@ RUN curl -fsSL -o ldap_write_support.tar.gz \ tar -xf ldap_write_support.tar.gz -C ${BASE_DIR}/custom_apps && \ rm ldap_write_support.tar.gz +RUN curl -fsSL -o oidc_login.tar.gz \ + "https://github.com/pulsejet/nextcloud-oidc-login/releases/download/v${OIDC_LOGIN_VERSION}/oidc_login.tar.gz" && \ + tar -xf oidc_login.tar.gz -C ${BASE_DIR}/custom_apps && \ + rm oidc_login.tar.gz + # Remove unzip when unzipping is done RUN apt-get -y remove unzip @@ -133,6 +139,9 @@ RUN rm -rf ${TMP_PATCH_DIR} # show reset pwd page with a query param RUN cd ${BASE_DIR}/core/js/dist && sed -i 's/resetPassword:!1/resetPassword:!1||Z.showResetPassword==="1"/' login.js +# hide oidc login button +RUN sed -i 's/$context->registerAlternativeLogin(OIDCLoginOption::class);/\/\/$context->registerAlternativeLogin(OIDCLoginOption::class);/' ${BASE_DIR}/custom_apps/oidc_login/lib/AppInfo/Application.php + # sed version of ldap_write_support RUN cd ${BASE_DIR}/custom_apps/ldap_write_support && sed -i 's/max-version="22"/max-version="23"/' appinfo/info.xml diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 08a5ec07..7609ff33 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -31,6 +31,7 @@ if version_greater "$image_version" "$installed_version"; then rsync $rsync_options --include "/murena_launcher/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/integration_google/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/ldap_write_support/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ + rsync $rsync_options --include "/oidc_login/" --exclude '/*' $SRC_DIR/custom_apps /$DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ else -- GitLab From fd52577a2fed658a51fae53994b33cf541343c0c Mon Sep 17 00:00:00 2001 From: Akhil Date: Wed, 5 Oct 2022 22:12:45 +0530 Subject: [PATCH 2/2] Correct path --- Dockerfile | 2 +- custom_entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e8a2a259..d10e6b6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ARG GOOGLE_INTEGRATION_VERSION="1.0.8" ARG LDAP_WRITE_SUPPORT_VERSION="1.4.0" ARG OIDC_LOGIN_VERSION="2.3.3" -RUN sed -i 's/23,0,9,1/23,0,9,10/' ${BASE_DIR}/version.php +RUN sed -i 's/23,0,9,1/23,0,9,11/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 7609ff33..caaf8d8b 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -31,7 +31,7 @@ if version_greater "$image_version" "$installed_version"; then rsync $rsync_options --include "/murena_launcher/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/integration_google/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/ldap_write_support/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ - rsync $rsync_options --include "/oidc_login/" --exclude '/*' $SRC_DIR/custom_apps /$DST_DIR/custom_apps/ + rsync $rsync_options --include "/oidc_login/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ else -- GitLab