From c2549818877f978ee3bea402cd11ffc68cb08726 Mon Sep 17 00:00:00 2001 From: Mike Hepburn Date: Sat, 20 May 2023 08:25:32 +1000 Subject: [PATCH] add ldap testing image with active directory schema --- .github/workflows/release.yml | 1 + .../files/usr/bin/extract_rpms.sh | 2 +- .../Dockerfile | 29 +++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 testing/centos7-oj17-openldap-active-directory/Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5a045b7..f675adb5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,6 +73,7 @@ jobs: testing/centos7-oj17 testing/centos7-oj17-openldap testing/centos7-oj17-openldap-referrals + testing/centos7-oj17-openldap-active-directory testing/hive3.1-hive testing/kerberos testing/phoenix5 diff --git a/testing/cdh5.15-hive-kerberized-kms/files/usr/bin/extract_rpms.sh b/testing/cdh5.15-hive-kerberized-kms/files/usr/bin/extract_rpms.sh index 0d744cdb..507ff06f 100755 --- a/testing/cdh5.15-hive-kerberized-kms/files/usr/bin/extract_rpms.sh +++ b/testing/cdh5.15-hive-kerberized-kms/files/usr/bin/extract_rpms.sh @@ -16,7 +16,7 @@ do rpm -i -U https://vault.centos.org/6.10/os/x86_64/Packages/${dependency} done -rpm -i https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/r/rpmrebuild-2.11-3.el7.noarch.rpm +rpm -i https://kojipkgs.fedoraproject.org/packages/rpmrebuild/2.11/3.el7/noarch/rpmrebuild-2.11-3.el7.noarch.rpm mkdir /rpms/ diff --git a/testing/centos7-oj17-openldap-active-directory/Dockerfile b/testing/centos7-oj17-openldap-active-directory/Dockerfile new file mode 100644 index 00000000..74931255 --- /dev/null +++ b/testing/centos7-oj17-openldap-active-directory/Dockerfile @@ -0,0 +1,29 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ARG ARCH +FROM testing/centos7-oj17-openldap-base:unlabelled$ARCH + +# CONFIGURE OPENLDAP SERVER +# Run supervisord in background +RUN supervisord -c /etc/supervisord.conf && \ + /usr/bin/wait-for-slapd.sh && \ + ldapmodify -Y EXTERNAL -H ldapi:/// -f /etc/openldap/setup/modify_server.ldif && \ + ldapmodify -Y EXTERNAL -H ldapi:/// -f /etc/openldap/setup/ldap_disable_bind_anon.ldif && \ + # active dictory schema from https://git.openldap.org/openldap/openldap/-/raw/master/servers/slapd/schema/msuser.ldif + ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/setup/msuser.ldif && \ + # Next two ldifs are required in order to have inetOrgPerson object class + ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif && \ + ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif && \ + ldapadd -f /etc/openldap/setup/createOU.ldif -D cn=admin,dc=trino,dc=testldap,dc=com -w admin + +CMD supervisord -n -c /etc/supervisord.conf