Skip to content

Commit

Permalink
Add Example Commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 25, 2024
1 parent c8be4e4 commit 5d19301
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,22 @@ Further help about a specific command can be obtained via something like:
npx deploy info --help
```

### Example Local Testing

1. Build the Docker Image

```sh
docker compose up --build
```

2. Populate the database with users

```sh
ldapmodify -D 'cn=admin,dc=cotak,dc=gov' -H ldap://localhost:3389 -w admin -f <INPUT FILE>
```

3. Ensure the service account can list users

```
ldapsearch -v -x -D 'uid=ldapsvcaccount,dc=cotak,dc=gov' -b 'dc=cotak,dc=gov' -H ldap://localhost:3389 -w service
```
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
services:
openldap:
build: ./
volumes:
- /var/lib/ldap
- /etc/ldap/slapd.d
- /etc/letsencrypt:/container/service/slapd/assets/certs/
environment:
- LDAP_DOMAIN=cotak.gov
- LDAP_ADMIN_PASSWORD=admin
- LDAP_SVC_PASSWORD=service
ports:
- "389:389"
- "3389:389"
1 change: 0 additions & 1 deletion templates/05-svc-service.ldif
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ replace: olcAccess
olcAccess: {0}to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by dn="uid=ldapsvcaccount,dc=CUSTOM_ORG,dc=CUSTOM_TLD" read by * break
olcAccess: {1}to attrs=userPassword,shadowLastChange by self write by dn="cn=admin,dc=CUSTOM_ORG,dc=CUSTOM_TLD" write by anonymous auth by * none
olcAccess: {2}to * by self read by dn.exact=cn=admin,dc=CUSTOM_ORG,dc=CUSTOM_TLD write by * none

0 comments on commit 5d19301

Please sign in to comment.