secrets: rotate hermes@ mailbox password, wire gateway + dovecot restarts #351
No reviewers
Labels
No labels
backlog
bug
enhancement
in-progress
review
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ymrtech/nix-config!351
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/hermes-cred-rot"
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?
Rotates the operator's mailbox credential end to end, and fixes the reason the previous value would have survived the rotation.
What changed (one commit):
secrets/secrets.yaml: newhermes-mail-passwordand theEMAIL_PASSWORD=line inside vpn'shermes-env— the same plaintext in both places, so they are edited together. Only those two of 43 top-level keys differ; the other 8 env key names are unchanged and the recipients are byte-identical.hosts/mail/default.nix:hermes-mail-password.restartUnits = [ "dovecot.service" ]. The passwd-file is rebuilt at activation, but the running dovecot keeps serving the cached credential for its TTL — including a revoked one.hosts/vpn/default.nix:hermes-env.restartUnits = [ "hermes-agent.service" "hermes-backend.service" ], plus a comment listing what the file actually holds (it had gone stale) and the measurement that motivated it.Evidence for the restart wiring.
$HERMES_HOME/.envis composed at activation, so the file on disk is fresh after every switch — measured.envat2026-09-17 18:16:56whilehermes-agent.servicehad been up since2026-09-16 23:02:17. A rotatedEMAIL_PASSWORDwould therefore have sat inert in a file the long-lived gateway had already read: the same reader-drift class as the AutoKuma and coturn findings, and the reason both readers now declare their restart. sops-nix restarts only when the rendered content changes, so ordinary deploys do not bounce the gateway.Verification plan (post-deploy):
doveadm auth teston mail with the new credential → expectsauth succeeded; the old credential → expects rejection. The same test with the current value was run pre-change as a control (it succeeded), so the method is known-good before it is used as evidence.hermes-agent.service/hermes-backend.serviceActiveEnterTimestampafter the secret's mtime;.envcontent matching the rendered secret.