Watch
0
0
Fork
You've already forked hyperhive
0

add an ssh ca to bao, agent ssh certificates and a target module

This commit is contained in:
atlas 2026-11-16 16:24:37 +01:00 • committed by mara
commit 0afb111862

View file

@ -0,0 +1,23 @@
# What the swarm's SSH CA and its agent role fix, spelled once for the two
# files that must agree: ../swarm-bao.nix writes the role, and
# ../../agent-modules/ssh.nix signs through it and renews on a schedule
# derived from the certificate's lifetime.
#
# `mountPath` and `roleName` are also `swarm_secret_client::policy::SSH_MOUNT`
# and `SSH_ROLE`, which the shared agent policy names; the bao-grants module-eval
# suite reads that file and fails when the two disagree.
#
# Pure attrset, not a NixOS module.
{ }:
rec {
mountPath = "ssh-agents";
roleName = "swarm-agent";
# A certificate is valid this long, and the role refuses a longer request.
certTtlMinutes = 60;
certMaxTtlMinutes = 180;
# A third of the lifetime: a run that fails once still leaves the old
# certificate valid for the retry, and a few failed runs still do.
renewEveryMinutes = certTtlMinutes / 3;
}