From 599f771a0b06ae2e6ce15b3e5113908b982066f8 Mon Sep 17 00:00:00 2001 From: Matt Craddock <5796417+craddm@users.noreply.github.com> Date: Fri, 2 Aug 2024 15:07:54 +0000 Subject: [PATCH] don't setup ldap on external gitea server --- .../gitea_external/gitea/configure.mustache.sh | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/data_safe_haven/resources/gitea_external/gitea/configure.mustache.sh b/data_safe_haven/resources/gitea_external/gitea/configure.mustache.sh index 4108c5c9dd..eaa4d39399 100644 --- a/data_safe_haven/resources/gitea_external/gitea/configure.mustache.sh +++ b/data_safe_haven/resources/gitea_external/gitea/configure.mustache.sh @@ -6,17 +6,3 @@ until su-exec "$USER" /usr/local/bin/gitea admin user list --admin | grep "{{adm su-exec "$USER" /usr/local/bin/gitea admin user create --admin --username "{{admin_username}}" --random-password --random-password-length 20 --email "{{admin_email}}" 2> /dev/null sleep 1 done - -# Ensure that LDAP authentication is enabled -until su-exec "$USER" /usr/local/bin/gitea admin auth list | grep "DataSafeHavenLDAP" > /dev/null 2>&1; do - echo "$(date -Iseconds) Attempting to register LDAP authentication..." | tee -a /var/log/configuration - su-exec "$USER" /usr/local/bin/gitea admin auth add-ldap \ - --name DataSafeHavenLDAP \ - --security-protocol "unencrypted" \ - --host "{{ldap_server_hostname}}" \ - --port "{{ldap_server_port}}" \ - --user-search-base "{{ldap_user_search_base}}" \ - --user-filter "(&{{{ldap_user_filter}}}({{ldap_username_attribute}}=%[1]s))" \ - --email-attribute "mail" - sleep 1 -done