Skip to content

Commit

Permalink
example for lldap
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Dec 11, 2023
1 parent f3673e9 commit 8291baf
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 0 deletions.
53 changes: 53 additions & 0 deletions lldap/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
UID=1000
GID=1000
TZ=America/Denver
LLDAP_LDAPS_OPTIONS__ENABLED=true
LLDAP_JWT_SECRET=xxxxxxxxxxxxxxxx
LLDAP_LDAP_USER_PASS=xxxxxxxxxxxxxxxx
LLDAP_LDAP_BASE_DN=dc=local,dc=lan

# LLDAP_ADMIN_PASSWORD
# LLDAP_ADMIN_PASSWORD_FILE
# LLDAP_ADMIN_USERNAME
# LLDAP_ADMIN_USERNAME_FILE
# LLDAP_CONFIG_FILE
# LLDAP_DATABASE_URL
# LLDAP_DATABASE_URL=mysql://mysql-user:password@mysql-server/my-database
# LLDAP_DATABASE_URL=postgres://postgres-user:password@postgres-server/my-database
# LLDAP_HTTP_HOST
# LLDAP_HTTP_PORT
# LLDAP_HTTP_URL
# LLDAP_JWT_SECRET
# LLDAP_JWT_SECRET_FILE
# LLDAP_KEY_FILE
# LLDAP_KEY_SEED
# LLDAP_LDAP_BASE
# LLDAP_LDAP_BASE_DN
# LLDAP_LDAP_HOST
# LLDAP_LDAP_PORT
# LLDAP_LDAPS_OPTIONS__CERT_FILE
# LLDAP_LDAPS_OPTIONS__ENABLED
# LLDAP_LDAPS_OPTIONS__KEY_FILE
# LLDAP_LDAPS_OPTIONS__PORT
# LLDAP_LDAP_USER_DN
# LLDAP_LDAP_USER_EMAIL
# LLDAP_LDAP_USER_PASS
# LLDAP_LDAP_USER_PASS_FILE
# LLDAP_PASSWORD
# LLDAP_SERVER_KEY_FILE
# LLDAP_SERVER_KEY_SEED
# LLDAP_SET_PASSWORD_PATH
# LLDAP_SMTP_OPTIONS__ENABLE_PASSWORD_RESET
# LLDAP_SMTP_OPTIONS__FROM
# LLDAP_SMTP_OPTIONS__PASSWORD
# LLDAP_SMTP_OPTIONS__PORT
# LLDAP_SMTP_OPTIONS__SERVER
# LLDAP_SMTP_OPTIONS__SMTP_ENCRYPTION
# LLDAP_SMTP_OPTIONS__TLS_REQUIRED
# LLDAP_SMTP_OPTIONS__TO
# LLDAP_SMTP_OPTIONS__USER
# LLDAP_TEST_EMAIL_TO
# LLDAP_URL
# LLDAP_URL_FILE
# LLDAP_USERNAME
# LLDAP_VERBOSE
2 changes: 2 additions & 0 deletions lldap/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
.envrc
3 changes: 3 additions & 0 deletions lldap/certs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!.gitignore

4 changes: 4 additions & 0 deletions lldap/certs/gen_self_signed_certs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# one may wish to consider not using self-signed certificates in production
openssl req -subj '/CN=localhost' -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 3650
3 changes: 3 additions & 0 deletions lldap/data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!.gitignore

31 changes: 31 additions & 0 deletions lldap/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: "3"

# LDAPTLS_REQCERT=never ldapsearch -LLL -H "ldaps://localhost:6360" -D "uid=admin,ou=people,dc=local,dc=lan" -w 'xxxxxxxxxxxxxxxx' -b "dc=local,dc=lan"

services:
lldap:
image: lldap/lldap:stable
ports:
# For LDAP
- "127.0.0.1:3890:3890"
# For LDAPS (if LLDAP_LDAPS_OPTIONS__ENABLED=true)
- "127.0.0.1:6360:6360"
# For the web front-end
- "127.0.0.1:17170:17170"
networks:
- default
volumes:
- ./certs/cert.pem:/certs/cert.pem:ro
- ./certs/key.pem:/certs/key.pem:ro
- ./data:/data:rw
env_file:
- .env
environment:
- LLDAP_LDAPS_OPTIONS__ENABLED=true
- LLDAP_LDAPS_OPTIONS__CERT_FILE=/certs/cert.pem
- LLDAP_LDAPS_OPTIONS__KEY_FILE=/certs/key.pem

networks:
default:
external: false

0 comments on commit 8291baf

Please sign in to comment.