I am trying to understand how to use LDAP authentication with LetsEncrypt, using Heimdall as an example.
this is my docker-compose:
---
version: "2.1"
services:
letsencrypt:
image: linuxserver/letsencrypt
container_name: letsencrypt
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- URL=myDomain.duckdns.org
- SUBDOMAINS=wildcard
- VALIDATION=duckdns
- DUCKDNSTOKEN=myToken
- STAGING=true
volumes:
- $PWD/letsencrypt:/config
ports:
- 443:443
- 80:80
restart: unless-stopped
ldap-auth:
image: linuxserver/ldap-auth
container_name: ldap-auth
restart: unless-stopped
heimdall:
image: linuxserver/heimdall
container_name: heimdall
environment:
- PUID=1000
- PGID=1000
volumes:
- $PWD/heimdall:/config
restart: unless-stopped
then I uncommented the relevant lines in the letsencrypt configs at /home/test/letsencrypt/nginx/site-confs/default
:
# sample reverse proxy config for "heimdall" via subdomain, with ldap authentication
# ldap-auth container has to be running and the /config/nginx/ldap.conf file should be filled with ldap info
# notice this is a new server block, you need a new server block for each subdomain
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /config/www;
index index.html index.htm index.php;
server_name heimdall.*;
include /config/nginx/ssl.conf;
include /config/nginx/ldap.conf;
client_max_body_size 0;
location / {
# the next two lines will enable ldap auth along with the included ldap.conf in the server block
auth_request /auth;
error_page 401 =200 /ldaplogin;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app heimdall;
set $upstream_port 443;
set $upstream_proto https;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
I am now at a loss about how to modify the /config/nginx/ldap.conf
file.
any suggestions?
what do I have to set up?
are there user/password combinations?
thanks