the fleet gets a realm: kerberos + ldap on verdandi, and web + mail SSO onto it #108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kerberization"
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?
verdandicomes up - friend-hosted Proxmox VM (::53, same box asminerva/brigid), the identity root the realm hangs offuefi-luksdisko layout: unencrypted ESP -> LUKS -> btrfs@nix/@persist/@log, tmpfs root; TPM2 auto-unlock sealed to PCR7 (survives kernel/nixos-rebuildupdates), format-time passphrase kept as the permanent recovery keyslotdirectory(ip.internal/site/keys), carries the new flatidentityrole, site-hubs over thefateLAN like the other Fate boxes; claims borgsub4(hestia's parked slot)kerberosrealm - MIT KDC onverdandi, realmLAMENT.GAYservices/identity/kdc.nixis server-only (identityrole); the client config ridescoreviasystem/net/krb5.nix(default_realm, kdc = theidentityhost,rdns/dns_canonicalize_hostnameoff - WG has no PTR by default)programs.ssh.package = pkgs.openssh_gssapi(the Debian gssapi-with-mic patch -opensshWithKerberosis the wrong one, it rejectsGSSAPIAuthentication)GSSAPITrustDnsis reverse DNS: ssh buildshost/<name>from the peer's PTR, sokresdhad to stop empty-zoning the ULA reverse for our/48(RFC 6303/8375 served it as authoritative NXDOMAIN) and emit each host's own PTR last so it wins the reverse collision against the service vhosts (athena's::1was reversing tovault)host/<host>.lament.gaykey is a binary sops secret at/etc/krb5.keytab(newmkSopsBin->sops/keytab/<host>.bin), minted byjust keytab <host>;gssapi-with-micworks fleet-wide with pubkey + password disableddefault_principal_flags = +preauth); the realm DB backed up to borg for DR (kdb5_util dump+ master stash +slapcat, guarded by repokey-blake2 - the live Berkeley/mdb is never copied directly)ldapdirectory - OpenLDAP onverdandi, the realm migrated onto itservices/identity/openldap.nix: mdb atdc=lament,dc=gay(ou=people/ou=groups), listensldapi:///+ the WG-internal address only - no ldaps, WG is the encrypted transportkldapbackend), SASL/EXTERNAL peercred bind, no stashed bind passwordwithLdapkrb5 build omitscyrus_sasl-> a stub SASL that dies on EXTERNAL; added it back viaoverrideAttrs(a nixpkgs gap worth upstreaming){SASL}princuserPasswordhands every simple bind tosaslauthd -a kerberos5-> the KDC, so an app's plain LDAP bind is a kerberos auth; the stored value is just the principal namecn=svc-ldapread-only bind account for directory search;memberof+refintoverlays so apps map roles with(memberOf=cn=admins,...)the web tier goes
ldap-grafana,forgejo,wiki-jsall SSO through thesvc-ldapsearch-bind ->{SASL}-> KDCcn=admins(groupOfNames, viamemberof) for forgejo/wiki-js,cn=lament(posixGroup) for grafana's group-search - posixGroup and groupOfNames are both structural so they can't share one entryldap.toml+$__file), forgejoadmin auth {add,update}-ldapCLI oneshot, wiki-js GraphQLupdateStrategiesoneshot; vaultwarden stays out (bootstrap deadlock)mail goes on the directory too
mailserverbinds to the realm via nixos-mailserver's native LDAP in auth-bind mode (attributes.password = null) -dovecotbinds each login as the user againstverdandi's slapd, so the edge holds NO kerberos, just a plain LDAP clientsarah@account gives way to the directory: login is now the uidlament;sarah@/lament@/sarahlament@ride a multi-valuedmailattr (the alias mechanism - the native module has no alias option); homes key offuidso they survive a directory-DB rebuild;admin@stays the local break-glass fallbackathenaadded to theidentity.yamlsops group for the bind password; the existing mailbox (99 msgs) migrated onto the uid-keyed home, verified send + receive against an external providerhosts derive from the directory - the per-host
nixosConfigurations/<host>.nixfiles collapse into onehosts.nixgenerator that builds every host from itsdirectoryentry +static/<host>/also - niri screencast routing restored through the portal, discord un-broken
left for later:
Negotiateis the endgame but no caddy module exists yetverdandi's/var/lib/krb5kdc.pre-ldaprollback snapshot,rmthe migrated/var/vmail/lament.gay/sarah.old, and point remaining mail clients' username atlamentverdandijoins the group b2955c74d2verdandibecomes a local site hub e1acc2e9a0kerberosrealm creation 1900c46bc4sshdbecomes kerberizedkresdneeds to serve reverse pointerskresdhands each host its own reverse, not a service name a4d8dfeeabkerberoskeytabs go durable and fleet-wide5b13dfd9be43246fc404kerberosgets backed upopenldapcomes in to play 2e18b556cfkldapwanted in on the funab3750abf0570d804a91ldapmailserverbinds to the directory e396d57fd5sarah@gives way to the directoryWIP: kerberizationto the fleet gets a realm:kerberos+ldaponverdandi, and web + mail SSO onto it436575e8a401bcdf804a