LDAP + Kerberos — research for reverie mesh auth #

Status: research (2026-04-08, control-room lane) Source: background research subagent + control-room synthesis Cross-refs: docs/architecture/pseudoagents.md, Part H env-map

TL;DR #

Part 1 — Background #

LDAP (RFC 4511) #

Kerberos (RFC 4120) #

How they compose #

LDAP is the identity store. Kerberos is the auth protocol. SASL/GSSAPI is the glue: a client binds to LDAP with a Kerberos ticket, no password crosses the wire. FreeIPA packages all three plus a CA so you can issue X.509 certs from the same identity database.

Part 2 — Modern context (2025–2026) #

Part 3 — Reverie applicability #

Reverie today:

Does a single-user WSL2 mesh need this stack? No.

Cases where it would start to matter:

A “reverie adopts Kerberos” experiment would require: a KDC (MIT or Heimdal), krb5.conf, a keytab per service, SASL configuration on redis, GSSAPI-enabled SSH, and a convention for mapping reverie roles to Kerberos principals. Non-trivial.

Part 4 — Lightweight alternatives worth comparing #

SPIFFE / SPIRE #

Tailscale / Headscale #

Biscuit tokens / Macaroons #

systemd unit-level credentials #

TPM2-backed secrets (systemd-creds) #

Part 5 — Rust ecosystem #

CrateVersionPurposeVerdict
ldap30.12+Full LDAP client incl. SASL/GSSAPIMature, binds to libsasl2 + libgssapi (C FFI, painful errors)
libgssapi0.8+Thin wrapper around MIT libgssapiWorks but unergonomic. No pure-Rust alternative. Kerberos in Rust is painful.
rustls0.23+TLS 1.2/1.3 implementationFirst-class. Async-friendly, memory-safe, no openssl dependency.
rcgen0.13+Generate X.509 certs programmaticallyFirst-class for building an internal CA.
x509-parser0.16+Parse X.509 certsSolid.
biscuit-auth5.xCapability tokensPure Rust, production-ready for the right use case.
tonic-tls / axum-serverlatestmTLS wiring for gRPC / HTTPBoth support client-cert verification out of the box.

Verdict: the pure-Rust mTLS path (rustls + rcgen) is dramatically easier to build and maintain than the Kerberos path. Kerberos in Rust means C FFI, cryptic error messages, and a whole separate KDC to run. Only pay that cost if you have a compliance requirement forcing it.

Part 6 — Recommendation #

Three options, ranked by (security gain / effort):

Part 7 — Open questions #

Before any of B or C is worth pursuing, answer these:

  1. Will reverie ever run multi-host? GPU workers on remote boxes? If yes, B is on the table.
  2. Will reverie ever support multi-user? Multiple humans sharing the same reverie instance? If yes, C may be on the table.
  3. Audit / compliance requirements? SOC2, HIPAA, FedRAMP would all push toward C. Pure dev box: neither.
  4. Downstream service auth? Do openrouter, anthropic api, ollama HTTP support token-based auth that could integrate with an identity provider? (Anthropic API: bearer token. OpenRouter: bearer token. Ollama: no auth by default, OLLAMA_HOST trusts localhost.)
  5. Encryption in transit OR audit+non-repudiation OR both? mTLS covers the first. Kerberos ticket logs cover the second. Both together = FreeIPA.
  6. Team expertise? Windows AD shop → Kerberos is familiar. Cloud-native team → OIDC or mTLS is familiar.
  7. Hardware? TPM2 available on any reverie host? Unlocks systemd-creds as a cheap secret-at-rest story.

Citations #


Control-room lane · research only · not a decision.