mirror of
https://github.com/ViViDboarder/bitwarden_rs_ldap.git
synced 2024-11-22 03:06:27 +00:00
Add some additional configs for easier testing
This commit is contained in:
parent
2f6ecc6860
commit
adf460c05e
3
Makefile
3
Makefile
@ -49,6 +49,9 @@ check-version:
|
|||||||
clean:
|
clean:
|
||||||
rm -f ./target
|
rm -f ./target
|
||||||
|
|
||||||
|
.PHONY: docker-build-all
|
||||||
|
docker-build-all: docker-build docker-build-alpine
|
||||||
|
|
||||||
.PHONY: docker-build
|
.PHONY: docker-build
|
||||||
docker-build:
|
docker-build:
|
||||||
docker build -f ./Dockerfile -t $(DOCKER_TAG) .
|
docker build -f ./Dockerfile -t $(DOCKER_TAG) .
|
||||||
|
@ -69,6 +69,10 @@ From there you can set up your test group and users.
|
|||||||
docker-compose up ldap_sync
|
docker-compose up ldap_sync
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternately, you can bootstrap some of this by running:
|
||||||
|
|
||||||
|
docker-compose -f docker-compose.yml -f itest/docker-compose.itest.yml up
|
||||||
|
|
||||||
## Future
|
## Future
|
||||||
|
|
||||||
* Any kind of proper logging
|
* Any kind of proper logging
|
||||||
|
@ -27,9 +27,6 @@ services:
|
|||||||
|
|
||||||
ldap:
|
ldap:
|
||||||
image: osixia/openldap
|
image: osixia/openldap
|
||||||
ports:
|
|
||||||
- 389:389
|
|
||||||
- 636:636
|
|
||||||
volumes:
|
volumes:
|
||||||
- /var/lib/ldap
|
- /var/lib/ldap
|
||||||
- /etc/ldap/slapd.d
|
- /etc/ldap/slapd.d
|
||||||
|
53
itest/50-seed-user.ldif
Normal file
53
itest/50-seed-user.ldif
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# LDIF Export for cn=Users,dc=example,dc=org
|
||||||
|
# Server: ldap (ldap)
|
||||||
|
# Search Scope: sub
|
||||||
|
# Search Filter: (objectClass=*)
|
||||||
|
# Total Entries: 2
|
||||||
|
#
|
||||||
|
# Generated by phpLDAPadmin (http://phpldapadmin.sourceforge.net) on May 4, 2021 6:06 pm
|
||||||
|
# Version: 1.2.5
|
||||||
|
|
||||||
|
version: 1
|
||||||
|
|
||||||
|
# Entry 1: cn=Users,dc=example,dc=org
|
||||||
|
dn: cn=Users,dc=example,dc=org
|
||||||
|
cn: Users
|
||||||
|
gidnumber: 500
|
||||||
|
objectclass: posixGroup
|
||||||
|
objectclass: top
|
||||||
|
|
||||||
|
# Entry 2: cn=Someone,cn=Users,dc=example,dc=org
|
||||||
|
dn: cn=Someone,cn=Users,dc=example,dc=org
|
||||||
|
cn: Someone
|
||||||
|
gidnumber: 500
|
||||||
|
homedirectory: /home/users/someone
|
||||||
|
mail: test@example.com
|
||||||
|
objectclass: inetOrgPerson
|
||||||
|
objectclass: posixAccount
|
||||||
|
objectclass: top
|
||||||
|
sn: Someone
|
||||||
|
uid: someone
|
||||||
|
uidnumber: 1000
|
||||||
|
|
||||||
|
# Entry 3: cn=SomeoneNoEmail,cn=Users,dc=example,dc=org
|
||||||
|
dn: cn=SomeoneNoEmail,cn=Users,dc=example,dc=org
|
||||||
|
cn: SomeoneNoEmail
|
||||||
|
gidnumber: 500
|
||||||
|
homedirectory: /home/users/someonenoemail
|
||||||
|
objectclass: inetOrgPerson
|
||||||
|
objectclass: posixAccount
|
||||||
|
objectclass: top
|
||||||
|
sn: SomeoneNoEmail
|
||||||
|
uid: someonenoemail
|
||||||
|
uidnumber: 1001
|
||||||
|
|
||||||
|
# Entry 4: cn=SomeoneNoEmailNoUid,cn=Users,dc=example,dc=org
|
||||||
|
# dn: cn=SomeoneNoEmailNoUid,cn=Users,dc=example,dc=org
|
||||||
|
# cn: SomeoneNoEmailNoUid
|
||||||
|
# gidnumber: 500
|
||||||
|
# homedirectory: /home/users/someonenoemailnoUid
|
||||||
|
# objectclass: inetOrgPerson
|
||||||
|
# objectclass: posixAccount
|
||||||
|
# objectclass: top
|
||||||
|
# sn: SomeoneNoEmail
|
||||||
|
# uidnumber: 1002
|
11
itest/docker-compose.itest.yml
Normal file
11
itest/docker-compose.itest.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
ldap_sync:
|
||||||
|
|
||||||
|
vaultwarden:
|
||||||
|
|
||||||
|
ldap:
|
||||||
|
command: ["--copy-service"]
|
||||||
|
volumes:
|
||||||
|
- ./itest/50-seed-user.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/50-seed-user.ldif
|
Loading…
Reference in New Issue
Block a user