ungleich-user/dal
Sajeyks 3e630b53d8 Verify LDAP server certificates
ldap3 does not verify TLS certificates by default, and the app never
configured it to. ldaps:// and StartTLS were encrypted but accepted any
certificate, so anyone able to intercept LDAP traffic could pose as the
server and collect the admin password and every password used to log in.

All LDAP servers now use VerifiedTls, which leaves verification to
Python's ssl module: certificate chain and hostname, IP literals
included (ldap3's own matcher cannot handle IPv6 literals). It also
sends SNI and requires TLS 1.2 or newer. LDAP_CA_FILE adds a CA bundle
for a private CA. LDAP_TLS_VERIFY=False turns verification off, with a
logged warning. A failed StartTLS now always raises instead of
continuing in plaintext.

New tests against the dev LDAP cover ldaps, StartTLS and ldaps over an
IPv6 literal with the CA (and check the socket is encrypted), plain LDAP
over IPv6, rejection of an untrusted certificate (ldaps and StartTLS),
rejection of a hostname mismatch, and the opt-out.
2026-11-10 14:56:12 +03:00
..
management Add migrate_locked to run migrations safely from several pods 2026-11-06 15:36:37 +03:00
migrations Keep passwords out of activation links 2026-11-06 15:02:41 +03:00
static added red btn similar to blue one 2019-04-16 11:52:22 -04:00
templates Remove the unused _navbar_user.html template 2026-11-06 15:54:18 +03:00
tests Verify LDAP server certificates 2026-11-10 14:56:12 +03:00
__init__.py Move project files to root directory 2019-02-17 17:43:06 +01:00
backends.py Replace django-auth-ldap and python-ldap with an ldap3 backend 2026-11-06 15:15:03 +03:00
forms.py Remove APIs that Django 4.0 drops 2026-11-06 15:08:02 +03:00
health.py Add /healthz and /readyz endpoints for Kubernetes probes 2026-11-06 15:31:38 +03:00
models.py Keep passwords out of activation links 2026-11-06 15:02:41 +03:00
settings.py Verify LDAP server certificates 2026-11-10 14:56:12 +03:00
ungleich_ldap.py Verify LDAP server certificates 2026-11-10 14:56:12 +03:00
urls.py Remove APIs that Django 4.0 drops 2026-11-06 15:08:02 +03:00
views.py Don't report a failed signup when only the OTP seed failed 2026-11-06 15:52:21 +03:00
wsgi.py Move project files to root directory 2019-02-17 17:43:06 +01:00