Kerberos becomes the authoritative password store for the identity tenant #299
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos#299
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Epic. Design recorded in ADR-0023 (
docs/adr/0023-kerberos-authoritative-for-the-identity-tenant.md).Reverses ADR-0022 decision 3 for
dc=cloonar,dc=comhumans. The two-store debt that ADR booked is already live:passwdonnbwrites Kerberos (hosts/nb/modules/ldap-login.nix:30),passwdon a server writes LDAP (utils/modules/ldap-auth.nix:35). Which host you are on decides which store moves.The model
Partition, not synchronisation. The identity tenant is Kerberos-only with
userPasswordlocked to{CRYPT}!. Mail-only tenants keepuserPassword, get no principal, and are not federated into Keycloak. No identity holds two credentials, so drift is impossible by construction — not prevented by a hook that has to keep working.MIT krb5 stays. No Heimdal, no
smbk5pwd, no LDAP-backed KDB, and therefore no keytab invalidated: Keycloak SPNEGO and the two Dovecot SPNs are untouched by all of this.Milestones
The execution order is no longer the numeric sequence — M1 (#301) changed it. See Order below.
kdb5_util dumpand a restore actually performed; break-glass local accounts onmailandweb-arm. Both stop being optional the moment{CRYPT}!removes the fallback credential.max_life = 10h,max_renewable_life = 7d;helpdesk/adminprincipal withconly. kpasswd (464) onmailis done (#305). Still open: permitweb-arm→mailon 88 and 464 including UDP and IPv6 (see findings), and fix the stale port-88 comment athosts/mail/modules/kerberos.nix:5.hosts/mail/modules/dovecot.nix:171-186). Acheckpasswordscript, notdriver = pam— spike 1 settled this. Additive:result_failuredefaults tocontinue, so every other tenant falls through unchanged. GSSAPI regression check is mandatory — it is the thing most likely to be noticed if it breaks, and ticket login is already in production use.kc_action=. No privileged credential, port 749 stays closed. Must land before M4. Must surface a failed kpasswd explicitly rather than trusting a clean return — #305 showed that failure mode is otherwise silent.userPasswordstays live. Also sets-maxlife/-maxrenewlifeper principal (see Deferred).useKerberosForPasswordAuthentication(cloonar-realm.json:727), andutils/modules/ldap-auth.nix:35fromldaptokrb5. These move together orpasswdon a server silently writes a store nothing reads. Only safe once M6a is complete for everyone.userPasswordto{CRYPT}!.Order
M5 moves ahead of M4, and M6 splits, because
useKerberosForPasswordAuthenticationis a realm-level flag while enrolment is per-user. No ordering of M4 and M6 as originally written works: M4 first locks out everyone not yet enrolled; M6 first locks out each user at the moment they are enrolled, because Keycloak is still binding to LDAP when theiruserPasswordis locked.M4, M5 and M6 are blocked by #308, which decides how the transition works and how ADR-0023 decisions 4 and 6 are amended. Those issues should not be filed until it lands.
M1 findings (#301)
dominik.polakovics@cloonar.com), so pam_krb5 cannot form a valid principal. M3 is acheckpasswordscript. It must return user unknown — not auth failed — for non-identity-tenant addresses, and must verify against a keytab or accept KDC-spoofing exposure as a stated decision.useKerberosForPasswordAuthenticationhas no LDAP fallback. Verified live on thecloonarrealm. This is what forces the reordering above, and #308.web-armhad never been able to reach the KDC.keycloak/default.nix:153-156states the assumption — "Accepting a ticket needs no KDC contact" — which is true for SPNEGO and false for M4. The rule permitting it lives in the Hetzner console, outside git, and that comment is now misleading.mail.cloonar.comis dual-stack (ADR-0016) andweb-armhas v6 egress (ADR-0010), so RFC 6724 makes clients prefer v6. The JVM's Kerberos client has no v6→v4 fallback and hung, wherekinitfell back and succeeded. Rules are currently TCP-only; Kerberos tries UDP first and falls back to TCP for oversized responses.Deferred, deliberately
kprop/iprop). Accepted single point of failure for now; the consequence is spelled out in the ADR. Purely additive later.Maximum ticket life: 1 dayandMaximum renewable life: 0, against ADR-0023 decision 9's10h/7d— and that ADR is explicit thatmax_lifeis a security setting, being the only bound on an already-issued service ticket after-allow_tix.kdc.confrealm defaults do not apply retroactively, so M6a must set these per principal.modprinc -allow_tixstops new TGTs and new service tickets; already-issued service tickets are validated against the service keytab without touching the KDC, somax_lifeis the only bound. Web and mail revoke properly at their own layers.