Skip to content

Commit

Permalink
add ldap testing image with active directory schema
Browse files Browse the repository at this point in the history
  • Loading branch information
eformat committed Jul 4, 2023
1 parent 7b05ea8 commit c254981
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
29 changes: 29 additions & 0 deletions testing/centos7-oj17-openldap-active-directory/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c254981

Please sign in to comment.