Commit graph

4 commits

Author SHA1 Message Date
24fe2122b4 Match the production LDAP layout from ungleich's sample entries
Sample entries from production show:
- customers live in ou=customer (singular), not ou=customers
- customers have gidNumber 10004 and staff 10002; uidNumbers are in
  the 10000s
- staff entries list organizationalPerson and person explicitly
- the servers serve ldaps:// on port 636

The app reads all of these from settings, so its behaviour is
unchanged; the customer entry it creates already matches production
attribute for attribute. The defaults and test setups were wrong:
env.sample, the Kubernetes ConfigMap (now ldaps:// without StartTLS,
gid 10004, start uid 10000), dev/env.dev and the dev LDAP seed now
mirror production. The made-up ou=groups is gone. The tests take the
customer DN and gidNumber from settings instead of hardcoding them.
2026-11-11 20:52:49 +03:00
b9c043dcd4 Serve LDAPS, StartTLS and IPv6 from the dev LDAP
Production and the client's test server use ldaps://, so the dev server
now offers TLS as well: ldaps on 636 (localhost:3636) and StartTLS on
389, with both ports also published on [::1].

A throwaway CA and server certificate are generated on every start, with
the full CA extensions that Python 3.13+ strict verification requires.
The CA certificate is copied to dev/ldap/export/ca.crt (gitignored).
The server certificate covers localhost, the service names and ::1, but
not 127.0.0.1, so tests can show that hostname mismatches are
rejected.
2026-11-10 14:54:20 +03:00
e3d359b751 Cap slapd's open-file limit in the dev LDAP image
slapd sizes its descriptor table by the open-file limit. Under
kind/containerd that limit is about 10^9, and slapd was OOM-killed on
start.
2026-11-06 15:53:50 +03:00
692c1b1657 Add local OpenLDAP 2.6 test server for development
Alpine 3.24 based slapd with the production directory layout
(dc=ungleich,dc=ch, ou=customers, ou=users) and the openssh-lpk schema.
The app runs natively against it on ldap://localhost:3389.
Includes dev/env.dev with dev-only settings (cp dev/env.dev .env).
2026-11-06 14:46:24 +03:00