Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas a6935e57c3 swarm-queue-client: re-read a held OIDC client secret when the IdP refuses it
hive-c0re (`hive-<name>`), swarm-controller and swarm-review-classifier
read their queue client secret from the store once and held it as
`ClientSecret::Value` for the life of the process. After authelia
re-minted a secret and swarm-secret-publish stored the new one, every
later token mint presented the old value and was refused until the
daemon restarted.

`ClientSecret::Stored` replaces `Value`: a `StoredSecret` holds the
secret in memory with a caller-supplied read callback, so the crate
takes no store dependency. When the token endpoint answers 400 or 401,
`mint_token` (and its blocking sibling, used by the controller's OTLP
exporters) re-reads it and, if the store holds a different secret,
mints once more with it. One re-read runs at a time and is spawned so
it outlives a caller that gives up. A re-read that fails or finds the
refused value delays the next one, 5 s doubling to 5 min, so a secret
that stays wrong costs one store read per delay. Logs name the client
id and never the secret.

swarm-nats-auth's `oidc_secret` was the template; its re-read machinery
now sits on `StoredSecret`, so the tree has one copy. The responder
gains the same re-read backoff.

The controller keeps its `IDENTITY` OnceLock: it now holds a
`QueueConfig` whose secret is re-read, and the lazily built vcs-metrics
exporter reads the identity from it.

agent_renewal.rs's module doc said a re-minted agent queue secret only
reaches the agent at its next start; hive-agent reads the store on every
connection attempt after its first, so the doc now says that.

Part of #5017 (slice Q).
2026-10-13 19:16:04 +02:00
..
agent_config hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
dashboard hive: remove the read-only schedules page and the old schedule store 2026-10-13 01:45:12 +02:00
forge hive-c0re: a refused rev is an error log + Grafana alert, not a PR comment 2026-10-09 22:25:39 +02:00
job_queue docs: the agent config meta-flake input is the local applied mirror, not forge git+http 2026-10-10 14:06:43 +02:00
lifecycle hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
socket_server agents: the send(operator) refusal also covers agents without matrix 2026-10-12 08:50:06 +02:00
stats hive-c0re/swarm-*: drop clippy allows and dedupe unix_now + KV open_or_create 2026-10-09 10:25:48 +02:00
stores hive: remove the read-only schedules page and the old schedule store 2026-10-13 01:45:12 +02:00
workers hive-c0re: read each agent's swarm caps from agent-limits 2026-10-12 20:22:21 +02:00
actions.rs hive-c0re: a deploy request for a rev applied/main already contains is a no-op 2026-10-09 22:25:39 +02:00
container_view.rs hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
coordinator.rs hive: remove the read-only schedules page and the old schedule store 2026-10-13 01:45:12 +02:00
dashboard_events.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
gateway_nginx.rs hive-c0re, hivectl: make the htpasswd and wg key tests fail on the in-place write 2026-10-09 17:22:25 +02:00
loose_ends.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
main.rs hive: remove the read-only schedules page and the old schedule store 2026-10-13 01:45:12 +02:00
matrix.rs hive-c0re: stop silently dropping errors on credential/marker writes 2026-10-09 10:24:15 +02:00
meta.rs agents: read the memory cap at boot, not from the build 2026-10-12 10:59:11 +02:00
migrate.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
paths.rs hive-c0re: stop silently dropping errors on credential/marker writes 2026-10-09 10:24:15 +02:00
priv_client.rs agents: read the hive's name and domain at runtime, not from the build 2026-10-12 10:52:21 +02:00
secret_file.rs hive-c0re: stop silently dropping errors on credential/marker writes 2026-10-09 10:24:15 +02:00
server.rs hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
snapshot_push.rs hive-c0re: clear O_NONBLOCK on the snapshot-store socket before btrfs send gets it 2026-10-11 02:42:45 +02:00
swarm_agent_status.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
swarm_notices.rs swarm: present tense + no-queue-coordinates wording 2026-09-13 12:01:58 +02:00
swarm_queue.rs swarm-queue-client: re-read a held OIDC client secret when the IdP refuses it 2026-10-13 19:16:04 +02:00
swarm_status.rs hive-c0re: read each agent's swarm caps from agent-limits 2026-10-12 20:22:21 +02:00
test_env.rs test(hive-c0re): one crate-wide lock for env-mutating tests 2026-08-19 01:38:54 +02:00