Skip to content

Commit ec4cb0b

Browse files
committed
Added: ldap image including test users
1 parent 1fbd7e0 commit ec4cb0b

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

conf/keycloak/docker-compose-dev.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@ services:
293293
- shibboleth.mydomain.com
294294

295295
dev_ldap:
296-
image: bitnami/openldap:latest
296+
build:
297+
context: ../ldap
298+
dockerfile: Dockerfile
297299
container_name: dev_ldap
298300
hostname: ldap
299301
networks:
@@ -307,11 +309,6 @@ services:
307309
- LDAP_ADMIN_PASSWORD=admin
308310
- LDAP_ORGANISATION="Example Org"
309311
- LDAP_DOMAIN=example.org
310-
- LDAP_USER=admin
311-
- LDAP_PASSWORD=admin
312-
- LDAP_PORT_NUMBER=389
313-
- LDAP_USERS=user01,user02
314-
- LDAP_PASSWORDS=password01,password02
315312

316313
dev_minio:
317314
container_name: "dev_minio"

conf/ldap/50-users.ldif

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Organizational Unit for users
2+
dn: ou=users,dc=example,dc=org
3+
objectClass: organizationalUnit
4+
ou: users
5+
6+
# Test user 1
7+
dn: uid=ben,ou=users,dc=example,dc=org
8+
objectClass: inetOrgPerson
9+
objectClass: organizationalPerson
10+
objectClass: person
11+
objectClass: top
12+
sn: Affleck
13+
givenName: Ben
14+
cn: Ben Affleck
15+
uid: ben
16+
mail: ben.affleck@dataverse.org
17+
userPassword: benspassword
18+
19+
# Test user 2
20+
dn: uid=bob,ou=users,dc=example,dc=org
21+
objectClass: inetOrgPerson
22+
objectClass: organizationalPerson
23+
objectClass: person
24+
objectClass: top
25+
sn: Bob
26+
givenName: Bob
27+
cn: Bob Marley
28+
uid: bob
29+
mail: bob.marley@dataverse.org
30+
userPassword: bobspassword

conf/ldap/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM osixia/openldap:1.5.0
2+
3+
# Add custom LDIF users file
4+
COPY 50-users.ldif /container/service/slapd/assets/config/bootstrap/ldif/custom/50-users.ldif
5+
RUN chown 911:911 /container/service/slapd/assets/config/bootstrap/ldif/custom/50-users.ldif

0 commit comments

Comments
 (0)