Seed OpenLDAP with bootstrap users including email addresses
All checks were successful
linter / quality (pull_request) Successful in 1m20s
security / Dependency Audit (pull_request) Successful in 2m22s
security / Static Analysis (pull_request) Successful in 1m42s
tests / ci (8.4) (pull_request) Successful in 1m25s
tests / ci (8.5) (pull_request) Successful in 1m24s
All checks were successful
linter / quality (pull_request) Successful in 1m20s
security / Dependency Audit (pull_request) Successful in 2m22s
security / Static Analysis (pull_request) Successful in 1m42s
tests / ci (8.4) (pull_request) Successful in 1m25s
tests / ci (8.5) (pull_request) Successful in 1m24s
Add docker/openldap/bootstrap.ldif which creates an ou=people OU and three test users (admin, approver, staff) each with a mail attribute, matching the database seeder. Mount the LDIF into the openldap container and add --copy-service so it is loaded on first boot.
This commit is contained in:
@@ -84,6 +84,7 @@ services:
|
||||
- sail
|
||||
openldap:
|
||||
image: 'osixia/openldap:1.5.0'
|
||||
command: '--copy-service'
|
||||
ports:
|
||||
- '${FORWARD_LDAP_PORT:-389}:389'
|
||||
- '${FORWARD_LDAPS_PORT:-636}:636'
|
||||
@@ -98,6 +99,7 @@ services:
|
||||
volumes:
|
||||
- 'sail-ldap-data:/var/lib/ldap'
|
||||
- 'sail-ldap-config:/etc/ldap/slapd.d'
|
||||
- './docker/openldap/bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/bootstrap.ldif'
|
||||
networks:
|
||||
- sail
|
||||
healthcheck:
|
||||
|
||||
46
docker/openldap/bootstrap.ldif
Normal file
46
docker/openldap/bootstrap.ldif
Normal file
@@ -0,0 +1,46 @@
|
||||
# People OU
|
||||
dn: ou=people,dc=travel,dc=local
|
||||
objectClass: organizationalUnit
|
||||
ou: people
|
||||
|
||||
# Administrator
|
||||
dn: uid=admin,ou=people,dc=travel,dc=local
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: shadowAccount
|
||||
cn: Administrator
|
||||
sn: Administrator
|
||||
uid: admin
|
||||
mail: admin@travel.local
|
||||
uidNumber: 1000
|
||||
gidNumber: 1000
|
||||
homeDirectory: /home/admin
|
||||
userPassword: password
|
||||
|
||||
# Travel Approver
|
||||
dn: uid=approver,ou=people,dc=travel,dc=local
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: shadowAccount
|
||||
cn: Travel Approver
|
||||
sn: Approver
|
||||
uid: approver
|
||||
mail: approver@travel.local
|
||||
uidNumber: 1001
|
||||
gidNumber: 1000
|
||||
homeDirectory: /home/approver
|
||||
userPassword: password
|
||||
|
||||
# Staff Member
|
||||
dn: uid=staff,ou=people,dc=travel,dc=local
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: shadowAccount
|
||||
cn: Staff Member
|
||||
sn: Member
|
||||
uid: staff
|
||||
mail: staff@travel.local
|
||||
uidNumber: 1002
|
||||
gidNumber: 1000
|
||||
homeDirectory: /home/staff
|
||||
userPassword: password
|
||||
Reference in New Issue
Block a user