Skip to content

Commit 72e6d9f

Browse files
committed
backend config
1 parent ca6fa45 commit 72e6d9f

File tree

14 files changed

+40
-26
lines changed

14 files changed

+40
-26
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Merge pull request :
88

99
Update to light-baseimage:0.2.4
1010

11+
Release Note:
12+
In this version the new environment variable LDAP_BACKEND let you set the the backend used by your ldap database.
13+
By default it's hdb. In comming versions 1.2.x the default will be changed to mdb.
14+
15+
Environment variable LDAP_REPLICATION_HDB_SYNCPROV changed to LDAP_REPLICATION_DB_SYNCPROV
16+
1117
## 1.1.2
1218
Merge pull request :
1319
- Honor LDAP_LOG_LEVEL on startup #39

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ Required and used for new ldap server only:
240240
- **LDAP_READONLY_USER_USERNAME** Read only user username. Defaults to `readonly`
241241
- **LDAP_READONLY_USER_PASSWORD** Read only user password. Defaults to `readonly`
242242

243+
Backend:
244+
- **LDAP_BACKEND**: Ldap backend. Defaults to `hdb` (In comming versions v1.2.x default will be mdb)
245+
246+
Help: http://www.openldap.org/doc/admin24/backends.html
247+
243248
TLS options:
244249
- **LDAP_TLS**: Add openldap TLS capabilities. Defaults to `true`
245250
- **LDAP_TLS_CRT_FILENAME**: Ldap ssl certificate filename. Defaults to `ldap.crt`
@@ -257,7 +262,7 @@ Replication options:
257262

258263
- **LDAP_REPLICATION_CONFIG_SYNCPROV**: olcSyncRepl options used for the config database. Without **rid** and **provider** which are automatically added based on LDAP_REPLICATION_HOSTS. Defaults to `binddn="cn=admin,cn=config" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical`
259264

260-
- **LDAP_REPLICATION_HDB_SYNCPROV**: olcSyncRepl options used for the HDB database. Without **rid** and **provider** which are automatically added based on LDAP_REPLICATION_HOSTS. Defaults to `binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical`
265+
- **LDAP_REPLICATION_DB_SYNCPROV**: olcSyncRepl options used for the database. Without **rid** and **provider** which are automatically added based on LDAP_REPLICATION_HOSTS. Defaults to `binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical`
261266

262267
- **LDAP_REPLICATION_HOSTS**: list of replication hosts, must contain the current container hostname set by --hostname on docker run command. Defaults to :
263268
```yaml

example/extend-osixia-openldap/environment/my-env.yaml.startup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ LDAP_REPLICATION: false
3333
# are automaticaly replaced at run time
3434

3535
# if you want to add replication to an existing ldap
36-
# adapt LDAP_REPLICATION_CONFIG_SYNCPROV and LDAP_REPLICATION_HDB_SYNCPROV to your configuration
36+
# adapt LDAP_REPLICATION_CONFIG_SYNCPROV and LDAP_REPLICATION_DB_SYNCPROV to your configuration
3737
# avoid using $LDAP_BASE_DN, $LDAP_ADMIN_PASSWORD and $LDAP_CONFIG_PASSWORD variables
3838
LDAP_REPLICATION_CONFIG_SYNCPROV: binddn="cn=admin,cn=config" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical
39-
LDAP_REPLICATION_HDB_SYNCPROV: binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical
39+
LDAP_REPLICATION_DB_SYNCPROV: binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical
4040
LDAP_REPLICATION_HOSTS:
4141
- ldap://ldap.example.org # The order must be the same on all ldap servers
4242
- ldap://ldap2.example.org

example/kubernetes/simple/ldap-rc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ spec:
6363
value: "false"
6464
- name: LDAP_REPLICATION_CONFIG_SYNCPROV
6565
value: "binddn=\"cn=admin,cn=config\" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase=\"cn=config\" type=refreshAndPersist retry=\"60 +\" timeout=1 starttls=critical"
66-
- name: LDAP_REPLICATION_HDB_SYNCPROV
66+
- name: LDAP_REPLICATION_DB_SYNCPROV
6767
value: "binddn=\"cn=admin,$LDAP_BASE_DN\" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase=\"$LDAP_BASE_DN\" type=refreshAndPersist interval=00:00:00:10 retry=\"60 +\" timeout=1 starttls=critical"
6868
- name: LDAP_REPLICATION_HOSTS
6969
value: "#PYTHON2BASH:['ldap://ldap-one-service', 'ldap://ldap-two-service']"

example/kubernetes/using-secrets/environment/my-env.yaml.startup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ LDAP_REPLICATION: false
3333
# are automaticaly replaced at run time
3434

3535
# if you want to add replication to an existing ldap
36-
# adapt LDAP_REPLICATION_CONFIG_SYNCPROV and LDAP_REPLICATION_HDB_SYNCPROV to your configuration
36+
# adapt LDAP_REPLICATION_CONFIG_SYNCPROV and LDAP_REPLICATION_DB_SYNCPROV to your configuration
3737
# avoid using $LDAP_BASE_DN, $LDAP_ADMIN_PASSWORD and $LDAP_CONFIG_PASSWORD variables
3838
LDAP_REPLICATION_CONFIG_SYNCPROV: binddn="cn=admin,cn=config" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical
39-
LDAP_REPLICATION_HDB_SYNCPROV: binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical
39+
LDAP_REPLICATION_DB_SYNCPROV: binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical
4040
LDAP_REPLICATION_HOSTS:
4141
- ldap://ldap.example.org # The order must be the same on all ldap servers
4242
- ldap://ldap2.example.org

image/environment/default.yaml.startup

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ LDAP_READONLY_USER: false
1818
LDAP_READONLY_USER_USERNAME: readonly
1919
LDAP_READONLY_USER_PASSWORD: readonly
2020

21+
# Backend
22+
LDAP_BACKEND: hdb
23+
2124
# Tls
2225
LDAP_TLS: true
2326
LDAP_TLS_CRT_FILENAME: ldap.crt
@@ -35,10 +38,10 @@ LDAP_REPLICATION: false
3538
# are automaticaly replaced at run time
3639

3740
# if you want to add replication to an existing ldap
38-
# adapt LDAP_REPLICATION_CONFIG_SYNCPROV and LDAP_REPLICATION_HDB_SYNCPROV to your configuration
41+
# adapt LDAP_REPLICATION_CONFIG_SYNCPROV and LDAP_REPLICATION_DB_SYNCPROV to your configuration
3942
# avoid using $LDAP_BASE_DN, $LDAP_ADMIN_PASSWORD and $LDAP_CONFIG_PASSWORD variables
4043
LDAP_REPLICATION_CONFIG_SYNCPROV: binddn="cn=admin,cn=config" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical
41-
LDAP_REPLICATION_HDB_SYNCPROV: binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical
44+
LDAP_REPLICATION_DB_SYNCPROV: binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical
4245
LDAP_REPLICATION_HOSTS:
4346
- ldap://ldap.example.org # The order must be the same on all ldap servers
4447
- ldap://ldap2.example.org

image/service/slapd/assets/config/bootstrap/ldif/02-security.ldif

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dn: olcDatabase={1}mdb,cn=config
1+
dn: olcDatabase={1}{{ LDAP_BACKEND }},cn=config
22
changetype: modify
33
delete: olcAccess
44
-

image/service/slapd/assets/config/bootstrap/ldif/03-memberOf.ldif

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ add: olcModuleLoad
55
olcModuleLoad: memberof
66

77
# Backend memberOf overlay
8-
dn: olcOverlay={0}memberof,olcDatabase={1}mdb,cn=config
8+
dn: olcOverlay={0}memberof,olcDatabase={1}{{ LDAP_BACKEND }},cn=config
99
changetype: add
1010
objectClass: olcOverlayConfig
1111
objectClass: olcMemberOf

image/service/slapd/assets/config/bootstrap/ldif/04-refint.ldif

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ add: olcModuleLoad
55
olcModuleLoad: refint
66

77
# Backend refint overlay
8-
dn: olcOverlay={1}refint,olcDatabase={1}mdb,cn=config
8+
dn: olcOverlay={1}refint,olcDatabase={1}{{ LDAP_BACKEND }},cn=config
99
changetype: add
1010
objectClass: olcOverlayConfig
1111
objectClass: olcRefintConfig

image/service/slapd/assets/config/bootstrap/ldif/05-index.ldif

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Add indexes
2-
dn: olcDatabase={1}mdb,cn=config
2+
dn: olcDatabase={1}{{ LDAP_BACKEND }},cn=config
33
changetype: modify
44
replace: olcDbIndex
55
olcDbIndex: uid eq

0 commit comments

Comments
 (0)