hyperhive/hive-c0re/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 0e1a975f9f fix(3179): the gateway's config files get their own state dir
`agents.conf` and `gateway.htpasswd` move from /var/lib/hyperhive/gateway
to /var/lib/hive-gateway/conf, alongside the `tls/` the gateway already
kept there.

nginx reads both as an unprivileged user. Under c0re's state dir it could
only reach them by traversing a directory systemd re-declares `0750
hive-core` on every c0re start — so nginx was given `SupplementaryGroups
= [ "hive-core" ]`, which also handed it read access to everything else
group-readable in that tree. The tokens are individually 0600, but the
broker sqlite carries no explicit mode: every message between every agent
was readable by the process whose job is parsing untrusted network input.

Moving the files removes the need and the exposure together. The group is
gone, and its absence is now commented as load-bearing so it doesn't come
back as a fix for a symptom it would recreate.

Also drops this module's `/var/lib/hyperhive` tmpfiles rule. It declared
`0755 root root` and could never win against `StateDirectoryMode`, and a
losing declaration still reads as a guarantee — that is what sent the
first diagnosis of the outage looking for who had changed the mode.

Ordering is unchanged and still the thing that makes a fresh boot work:
tmpfiles runs before services and seeds both files empty-but-valid, nginx
names them (an `include` of a missing file is fatal, not empty), and
content arrives when c0re writes and reloads — which it does on every
topology change, so a boot against the empty seed resolves itself.

Folds in the mode fix: `write` now sets 0644 on the tmp file before the
rename, because a rename carries the source's mode and discards the
destination's, and the tmpfiles rule that declares 0644 is
create-if-absent so it never re-applies.
2026-08-12 10:29:27 +02:00
..
agent_config hive-sh4re: split tool-group + capability enums into their own topic module 2026-08-10 23:05:18 +02:00
dashboard docs(gateway): describe what is, not what changed 2026-08-11 18:09:51 +02:00
forge hive-sh4re: split approval-queue schema into its own topic module 2026-08-10 23:05:18 +02:00
job_queue hive-c0re: drop needless async from pause_many (clippy pedantic) 2026-08-11 23:47:09 +02:00
lifecycle feat(3088): move the gateway's nginx + dnsmasq onto the host 2026-08-11 18:01:03 +02:00
socket_server hive-c0re/hivectl/hive-agent: pause as a job-queue DAG node (closes #3056) 2026-08-11 23:47:09 +02:00
stats feat(#3139): tell a container that gave up from one stopped on purpose 2026-08-10 23:49:33 +02:00
stores hive-sh4re: split inbox, container, journal, and schedule wire shapes into their own modules 2026-08-10 23:26:15 +02:00
workers docs(gateway): describe what is, not what changed 2026-08-11 18:09:51 +02:00
actions.rs hive-sh4re: split manager-socket constants + HelperEvent into their own topic module 2026-08-10 23:05:18 +02:00
container_view.rs feat(#3139): tell a container that gave up from one stopped on purpose 2026-08-10 23:49:33 +02:00
coordinator.rs hive-c0re/hivectl/hive-agent: pause as a job-queue DAG node (closes #3056) 2026-08-11 23:47:09 +02:00
dashboard_events.rs hive-sh4re: split inbox, container, journal, and schedule wire shapes into their own modules 2026-08-10 23:26:15 +02:00
gateway_nginx.rs fix(3179): the gateway's config files get their own state dir 2026-08-12 10:29:27 +02:00
loose_ends.rs hive-sh4re: split inbox, container, journal, and schedule wire shapes into their own modules 2026-08-10 23:26:15 +02:00
main.rs knowledge: ping every agent when internal/knowledge changes 2026-08-02 03:10:06 +02:00
matrix.rs fix(#2851): warn when the state read breaks but the write still works 2026-08-09 21:31:04 +02:00
meta.rs fix(3179): the gateway's config files get their own state dir 2026-08-12 10:29:27 +02:00
migrate.rs refactor(#2916): drop the two obsolete startup migrations 2026-08-02 01:41:37 +02:00
paths.rs fix(3179): the gateway's config files get their own state dir 2026-08-12 10:29:27 +02:00
priv_client.rs feat(3088): move the gateway's nginx + dnsmasq onto the host 2026-08-11 18:01:03 +02:00
questions.rs hive-sh4re: split inbox, container, journal, and schedule wire shapes into their own modules 2026-08-10 23:26:15 +02:00
server.rs hive-c0re: drop needless async from pause_many (clippy pedantic) 2026-08-11 23:47:09 +02:00
snapshot_push.rs refactor(#2862): one snapshot store per swarm, not one per peer 2026-07-31 22:15:37 +02:00
webhook_secret.rs chore(#2510): bump indicatif/tower-http/hmac/sha2 to latest majors 2026-07-16 10:42:30 +02:00