Skip to content
This repository was archived by the owner on Jul 14, 2019. It is now read-only.

Commit a5c1e59

Browse files
committed
Add and update crew members.
1 parent 1df4de4 commit a5c1e59

13 files changed

+2412
-42
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OpenLDAP Docker Image for testing
22

3-
This image provides an OpenLDAP Server for testing LDAP applications, i.e. unit tests. The server is initialized with data from Futurama, Planet Express, Inc. Currently there are only entries for Fry, Lila and Bender. In the future I will add more Crew members and other objects, for more complex tests.
3+
This image provides an OpenLDAP Server for testing LDAP applications, i.e. unit tests. The server is initialized with the example domain `planetexpress.com` with data from the [Futurama Wiki][futuramawikia]. Currently there are only entries for Fry, Lila and Bender. In the future I will add more Crew members and other objects, for more complex tests.
44

55
Parts of the image are based on the work from Nick Stenning [docker-slapd][slapd] and Bertrand Gouny [docker-openldap][openldap].
66

@@ -9,6 +9,7 @@ The Flask extension [flask-ldapconn][flaskldapconn] use this image for unit test
99
[slapd]: https://github.com/nickstenning/docker-slapd
1010
[openldap]: https://github.com/osixia/docker-openldap
1111
[flaskldapconn]: https://github.com/rroemhild/flask-ldapconn
12+
[futuramawikia]: http://futurama.wikia.com
1213

1314
## Features
1415

File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dn: ou=people,dc=planetexpress,dc=com
22
objectClass: top
33
objectClass: organizationalUnit
4-
description: Springfield citizens
4+
description: Planet Express crew
55
ou: people

bootstrap/data/10_people_bender.ldif

Lines changed: 495 additions & 0 deletions
Large diffs are not rendered by default.

bootstrap/data/10_people_fry.ldif

Lines changed: 411 additions & 0 deletions
Large diffs are not rendered by default.

bootstrap/data/10_people_hermes.ldif

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
dn: cn=Hermes Conrad,ou=people,dc=planetexpress,dc=com
2+
objectClass: top
3+
objectClass: person
4+
objectClass: organizationalPerson
5+
objectClass: inetOrgPerson
6+
cn: Hermes Conrad
7+
sn: Conrad
8+
description: Human
9+
employeeType: Bureaucrat
10+
employeeType: Accountant
11+
givenName: Hermes
12+
mail: hermes@planetexpress.com
13+
ou: Office Management
14+
uid: hermes
15+
userPassword:: e3NzaGF9M3UzcUdCSmFMc2tiUEg0OVJrYlFtUk9HTktFb1lOUXZkU2lOZmc9P
16+
Q==
17+

bootstrap/data/10_people_leela.ldif

Lines changed: 489 additions & 0 deletions
Large diffs are not rendered by default.

bootstrap/data/10_people_professor.ldif

Lines changed: 497 additions & 0 deletions
Large diffs are not rendered by default.

bootstrap/data/10_people_zoidberg.ldif

Lines changed: 489 additions & 0 deletions
Large diffs are not rendered by default.

bootstrap/ldif/10_people.ldif

Lines changed: 0 additions & 34 deletions
This file was deleted.

bootstrap/slapd-init.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/sh
22
set -eu
33

4+
readonly DATA_DIR="/bootstrap/data"
5+
readonly CONFIG_DIR="/bootstrap/config"
46

57
readonly LDAP_BINDDN="cn=admin,dc=planetexpress,dc=com"
68

@@ -30,28 +32,31 @@ slapd slapd/no_configuration boolean false
3032
slapd slapd/dump_database select when needed
3133
EOL
3234

33-
dpkg-reconfigure -f noninteractive slapd
35+
dpkg-reconfigure slapd
3436
}
3537

3638

3739
configure_tls() {
3840
echo "Configure TLS..."
39-
ldapmodify -Y EXTERNAL -H ldapi:/// -f /bootstrap/ldif/tls.ldif -Q
41+
ldapmodify -Y EXTERNAL -H ldapi:/// -f ${CONFIG_DIR}/tls.ldif -Q
4042
}
4143

4244

4345
configure_logging() {
4446
echo "Configure logging..."
45-
ldapmodify -Y EXTERNAL -H ldapi:/// -f /bootstrap/ldif/logging.ldif -Q
47+
ldapmodify -Y EXTERNAL -H ldapi:/// -f ${CONFIG_DIR}/logging.ldif -Q
4648
}
4749

4850

4951
load_initial_data() {
5052
echo "Load data..."
51-
data=$(find /bootstrap/ldif -maxdepth 1 -name \*_\*.ldif -type f | sort)
53+
local data=$(find ${DATA_DIR} -maxdepth 1 -name \*_\*.ldif -type f | sort)
5254
for ldif in ${data}; do
5355
echo "Processing file ${ldif}..."
54-
ldapadd -x -D ${LDAP_BINDDN} -w ${LDAP_ADMIN_SECRET} -H ldapi:/// -f ${ldif}
56+
ldapadd -x -H ldapi:/// \
57+
-D ${LDAP_BINDDN} \
58+
-w ${LDAP_ADMIN_SECRET} \
59+
-f ${ldif}
5560
done
5661
}
5762

run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ make_snakeoil_certificate() {
1616
-keyout ${LDAP_SSL_KEY} \
1717
-out ${LDAP_SSL_CERT}
1818

19-
chmod 600 /etc/ldap/ssl/ldap.key
19+
chmod 600 ${LDAP_SSL_KEY}
2020
}
2121

2222

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy