Skip to content

Commit 0491fe5

Browse files
authored
Merge pull request #27 from trjohnson19/authentik-ldaps
`authentik` LDAPS with `traefik` proxy config
2 parents 34192fe + 646a28f commit 0491fe5

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ appdata/*
6363
!appdata/authelia
6464
appdata/authelia/*
6565

66+
!appdata/authentik
67+
appdata/authentik/*
68+
!appdata/authentik/config
69+
appdata/authentik/config/*
70+
!appdata/authentik/config/ak-outpost-ldap-conf.example.yml
71+
6672
!appdata/cf-ddns
6773
appdata/cf-ddns/*
6874
!appdata/cf-ddns/config.yaml.example
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
log_level: info
3+
docker_labels:
4+
traefik.enable: "true"
5+
traefik.tcp.routers.ak-outpost-ldaps-rtr.tls: "true"
6+
traefik.tcp.routers.ak-outpost-ldaps-rtr.rule: HostSNI(`*`) # Must bind to * because LDAPS does not send SNI https://community.traefik.io/t/15570
7+
traefik.tcp.routers.ak-outpost-ldaps-rtr.service: ak-outpost-ldap-svc
8+
traefik.tcp.routers.ak-outpost-ldaps-rtr.entrypoints: authentik-ldaps
9+
traefik.tcp.routers.ak-outpost-ldaps-rtr.tls.options: tls-opts@file
10+
traefik.tcp.routers.ak-outpost-ldaps-rtr.tls.passthrough: "false" # Do not use TLS between Traefik and Authentik
11+
traefik.tcp.routers.ak-outpost-ldaps-rtr.tls.certResolver: dns-cloudflare
12+
traefik.tcp.routers.ak-outpost-ldaps-rtr.tls.domains[0].main: ak-ldaps.<DOMAINNAME0>
13+
traefik.tcp.services.ak-outpost-ldap-svc.loadbalancer.server.port: "<AUTHENTIK_LDAP_PORT>" # Note: use LDAP (3389), not LDAPS (6636)
14+
traefik.http.routers.ak-outpost-ldap-healthcheck-rtr.rule: Host(`ak-ldaps.<DOMAINNAME0>`)
15+
traefik.http.routers.ak-outpost-ldap-healthcheck-rtr.service: ak-outpost-ldap-healthcheck-svc
16+
traefik.http.routers.ak-outpost-ldap-healthcheck-rtr.entrypoints: https
17+
traefik.http.routers.ak-outpost-ldap-healthcheck-rtr.middlewares: chain-no-auth@file
18+
traefik.http.routers.ak-outpost-ldap-healthcheck-rtr.tls.options: tls-opts@file
19+
traefik.http.services.ak-outpost-ldap-healthcheck-svc.loadbalancer.healthcheck.path: /outpost.goauthentik.io/ping
20+
traefik.http.services.ak-outpost-ldap-healthcheck-svc.loadbalancer.healthcheck.port: "<AUTHENTIK_LDAP_HEALTHCHECK_PORT>" # Likely 9300
21+
authentik_host: https://authentik.<DOMAINNAME0>/
22+
docker_network: t2_proxy
23+
container_image: null
24+
docker_map_ports: false
25+
authentik_host_browser: ""
26+
object_naming_template: ak-outpost-%(name)s
27+
authentik_host_insecure: false

docker-compose-t2.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,13 @@ services:
260260
# Set Wireguard entrypoint
261261
- --entryPoints.wireguard.address=:$WIREGUARD_PORT/udp
262262
# Set Minecraft entrypoint
263-
- --entryPoints.minecraft.address=:25565
264-
# # Set minecraft-rcon entrypoint
263+
# - --entryPoints.minecraft.address=:25565
264+
# Set minecraft-rcon entrypoint
265265
# - --entryPoints.minecraft-rcon.address=:4326
266266
# Set minecraft-rcon-websocket entrypoint
267267
# - --entryPoints.minecraft-rcon-websocket.address=:4327
268+
# Set Authentik LDAPS entrypoint
269+
- --entryPoints.authentik-ldaps.address=:$AUTHENTIK_LDAPS_PORT
268270
networks:
269271
t2_proxy:
270272
ipv4_address: $TRAEFIK_IPV4 # You can specify a static IP
@@ -296,6 +298,10 @@ services:
296298
published: $WIREGUARD_PORT
297299
protocol: udp
298300
mode: host
301+
- target: $AUTHENTIK_LDAPS_PORT # LDAPS port
302+
published: $AUTHENTIK_LDAPS_PORT
303+
protocol: tcp
304+
mode: host
299305
volumes:
300306
- $APPDIR/traefik2/rules:/rules # file provider directory
301307
# - /var/run/docker.sock:/var/run/docker.sock:ro # Use Docker Socket Proxy instead for improved security

0 commit comments

Comments
 (0)