Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/swarm-secret-client/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 6170e74a31 swarm-bao: agent certificates issued by a store-generated agent CA
An agent's store identity was signed in swarm-controller's memory by a CA
a controller-host unit generated on disk, and the listener never trusted
that CA. Agent leaves now come from the store itself: a `pki-agents` PKI
mount whose root openbao generates internally, so the agent CA's key
never exists outside the store.

- swarm-bao-agent-pki (new, store host, as the bao granter): enables and
  tunes the mount, generates the root once (guarded on an empty issuer
  list, no replace branch), upserts the `swarm-agent` role (client
  certificates named `hive-agent-*` only, 90 days), caches the CA at
  /var/lib/swarm-bao-tls/agent-ca.pem and composes the listener bundle.
- The listener's tls_client_ca_file is a new listener-client-ca.pem
  (client-ca.pem, then the agent CA). Host cert-auth roles still pin
  client-ca.pem, so an agent leaf satisfies no host role. swarm-bao-certs
  composes the same bundle before openbao starts.
- openbao reads tls_client_ca_file only at start, so when the bundle
  changed after openbao started, swarm-bao-agent-pki restarts
  openbao.service in the container; under `seal = "shamir"` it prints
  the step instead. Once swarm-bao-certs has a cached CA, later boots
  start openbao with it and do not restart.
- The controller policy gains exactly `update` on
  pki-agents/issue/swarm-agent. mint_and_verify now asks that role for
  the leaf (the store generates the key), writes the agent's cert-auth
  role pinning the issuing CA bao returned, and writes the agent's
  policy as render_agent alone: the hive-shared queue credential stanza
  is gone.
- deploy.bao.agentPkiRoleName (must start `swarm-`, asserted with the
  other pki role names); swarm-controller gets
  SWARM_CONTROLLER_AGENT_PKI_MOUNT/_ROLE from the deploy.bao options.

Deleted: swarm-controller-agent-ca and its options (agentCaFile,
agentCaKeyFile), env, LoadCredential entries and assertion;
agent_identity's Authority, rcgen signing and validity window; the
rcgen and time dependencies of swarm-controller (rcgen leaves the
workspace); policy::render_agent_with_queue and its tests. The CN-prefix
assertion policy.rs said was owed is not: agent and host roles pin
different CAs.

Migration is re-creating each agent after deploy; that overwrites the
stale role and policy.

Closes #4756
2026-09-27 22:59:27 +02:00
..
client.rs swarm-bao: agent certificates issued by a store-generated agent CA 2026-09-27 22:59:27 +02:00
forge.rs swarm-bao: agent certificates issued by a store-generated agent CA 2026-09-27 22:59:27 +02:00
lib.rs swarm-bao: agent certificates issued by a store-generated agent CA 2026-09-27 22:59:27 +02:00
matrix.rs swarm-matrix-ctl: mint the swarm's own appservice registration 2026-09-25 08:31:01 +02:00
mtls.rs swarm: mint, publish and login-verify an agent's store identity at create 2026-09-18 15:05:24 +02:00
path.rs fix doc-comment pointers broken by the module-eval split 2026-09-20 04:31:08 +02:00
policy.rs swarm-bao: agent certificates issued by a store-generated agent CA 2026-09-27 22:59:27 +02:00
queue.rs swarm: mint a per-agent queue credential beside the agent's store identity 2026-09-21 20:38:55 +02:00