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 141be16c6d hive-forge: the controller-token mint writes straight to the store, and the on-disk token goes
`forgejo-swarm-controller-account`, in the forge's container, now puts
the swarm-controller's forge token into the swarm secret store itself,
under the forge publisher's leaf. The container already receives that
leaf as nspawn system credentials for its journal forwarder; the mint
loads the same three. The token reaches bao on stdin (`value=-`) and
the forge's API through a header file, never as an argument, and never
touches disk.

The mint's guard is a marker holding the published token's name, at
/var/lib/forgejo/swarm-controller-token-name, written last: after the
put, and after every other `swarm-controller-boot-*` token of the
account is revoked through forgejo's admin API, authenticated as the
new token. So a put that failed, or a marker lost while the store kept
an older token, leaves no live token behind once a mint completes. The
mint logs in to the store and checks that the account is a site admin
before it mints, so a store that is down or an account the admin API
would refuse mints nothing on each retry. Failures retry under
store-retry; forgejo does not wait for the mint. No bao read and no
grant change: the forge publisher keeps create/update on the token.

Removed: the host's `swarm-bao-forge-publisher` service and path unit,
which read the token file through the container's root, and their
entries in the store and policy ordering glue. The forge publisher's
policy unit stays; `swarm-bao-forge-oidc` still uses the leaf.

On deploy, an existing forge host has no marker, so the mint runs once:
it mints a new token, publishes it, revokes the old one, and deletes
the old /var/lib/forgejo/swarm-controller-token. The controller's next
forge call gets a 401, re-reads the store and carries on.
2026-10-16 17:48:56 +02:00
..
acp.rs hive-runtime: read the ACP provider key from bao 2026-09-30 22:55:03 +02:00
builder.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
ci.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
claude_login.rs swarm UI: log an agent into claude from its card; the credentials go to bao and the agent picks them up 2026-10-15 13:26:29 +02:00
client.rs swarm UI: log an agent into claude from its card; the credentials go to bao and the agent picks them up 2026-10-15 13:26:29 +02:00
forge.rs hive-forge: the controller-token mint writes straight to the store, and the on-disk token goes 2026-10-16 17:48:56 +02:00
github.rs github swarm bao: address argus review on #4892 2026-10-02 17:54:45 +02:00
grafana.rs swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
lib.rs swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
matrix.rs matrix: back up agents' room keys with a controller-minted recovery passphrase 2026-10-14 02:09:57 +02:00
mtls.rs agents: re-pull the agent's own bao mTLS leaf on a timer 2026-10-11 10:00:43 +02:00
path.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
policy.rs swarm-secret-client: hives no longer read swarm/services/* 2026-10-04 23:11:11 +02:00
queue.rs hive status publishing: read the hive's OIDC secret from the store, retry until it is there 2026-10-10 01:05:33 +02:00
review_classifier.rs review classifier: run on ACP when the swarm settings choose it 2026-10-14 10:14:36 +02:00