8 Commits
Author SHA1 Message Date
Bertrand Gouny 288df9e3f5 Merge branch 'hotfix-0.2.2' into stable 2014-05-05 14:31:18 +02:00
Bertrand Gouny cc9d731b8a baseimage 2014-05-05 14:31:15 +02:00
Bertrand Gouny fc8d97628f [twgit] Init hotfix 'hotfix-0.2.2'. 2014-05-05 14:29:41 +02:00
osixia 37c816a1ce Update README.md 2014-05-05 14:24:40 +02:00
osixia d6a9b1cb3f Update README.md 2014-05-05 14:19:29 +02:00
Bertrand Gouny 9e3d056cc1 Merge branch 'hotfix-0.2.1' into stable 2014-05-05 13:58:14 +02:00
Bertrand Gouny a7f76b5604 tls.ldif 2014-05-05 13:56:51 +02:00
Bertrand Gouny c00fd8cfc7 [twgit] Init hotfix 'hotfix-0.2.1'. 2014-05-05 13:53:36 +02:00
3 changed files with 29 additions and 2 deletions

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
FROM osixia-baseimage FROM osixia/baseimage
MAINTAINER Bertrand Gouny <bertrand.gouny@osixia.fr> MAINTAINER Bertrand Gouny <bertrand.gouny@osixia.fr>
# From Nick Stenning's work # From Nick Stenning's work
+27
View File
@@ -2,3 +2,30 @@
Fork of Nick Stenning docker-slapd : Fork of Nick Stenning docker-slapd :
https://github.com/nickstenning/docker-slapd https://github.com/nickstenning/docker-slapd
Add support of tls.
### How to use tls
Add `-v some/host/dir:/etc/ldap/ssl` and `--dns=127.0.0.1` to the run command.
`some/host/dir` must contain a least 3 files :
- `ca.crt` certificate authority certificate
- `ldap.crt` ldap server certificate
- `ldap.key` ldap server certificate private key
and optionaly `dhparam.pem` this file is genereted automaticaly if not present.
`--dns=127.0.0.1` allow to use certificate cn correctly.
### Example
docker run --dns=127.0.0.1 \
-v /data/ldap/db:/var/lib/ldap \
-v /data/ldap/ssl/:/etc/ldap/ssl \
-v /data/ldap/log/:/var/log \
-e LDAP_DOMAIN=example.com \
-e LDAP_ORGANISATION="Example Corp." \
-e LDAP_ROOTPASS=toor \
-p 389:389 -d osixia/openldap
+1 -1
View File
@@ -52,7 +52,7 @@ if [ -e /etc/ldap/ssl/ldap.crt ] && [ -e /etc/ldap/ssl/ldap.key ] && [ -e /etc/l
# create DHParamFile if not found # create DHParamFile if not found
[ -f /etc/ldap/ssl/dhparam.pem ] || openssl dhparam -out /etc/ldap/ssl/dhparam.pem 2048 [ -f /etc/ldap/ssl/dhparam.pem ] || openssl dhparam -out /etc/ldap/ssl/dhparam.pem 2048
ldapmodify -Y EXTERNAL -H ldapi:/// -f /etc/ldap/config/auto/tls_add.ldif ldapmodify -Y EXTERNAL -H ldapi:/// -f /etc/ldap/config/auto/tls.ldif
# add fake dnsmasq route to certificate cn # add fake dnsmasq route to certificate cn
cn=$(openssl x509 -in /etc/ldap/ssl/ldap.crt -subject -noout | sed -n 's/.*CN=\(.*\).\^*/\1/p') cn=$(openssl x509 -in /etc/ldap/ssl/ldap.crt -subject -noout | sed -n 's/.*CN=\(.*\).\^*/\1/p')