Watch
0
0
Fork
You've already forked hyperhive
0

the log and metrics stores ask every request for a credential the gateway supplies

Each store runs with -httpAuth.* and a credential from the secret store, published to the namespace as a Secret by the host. The gateway's locations send it after auth_request has passed, and the collector's scrape and push take the same one, so a process on the node that bypasses the gateway is refused.
This commit is contained in:
atlas 2026-11-27 17:24:08 +01:00 • committed by maia
commit f54aae7927

View file

@ -92,17 +92,12 @@ queue secret, at the queue and at both stores' read routes alike. The two store
agent's `swarm/agents/<agent>/observability` leaf, which only the controller writes, and let
the agent through only with the `logs` or `metrics` permission it names.
### The log and metrics stores take writes and reads from the node
### The log and metrics stores check a credential of their own
VictoriaLogs and VictoriaMetrics check no credential: the gateway's vhost does.
Each store listens on its pod's address behind a ClusterIP Service, and the
Service's NetworkPolicy admits traffic from the node and from nothing else. A
process on the host that runs a store, whatever its user, can therefore read
every record in it and write records into it without a bearer. The metrics store
also serves its import and admin routes on that listener, so the same process
can delete series from it. An agent can't: its traffic doesn't come from the
node, and the hive's egress rules don't forward it to the pod network. Treat the
host that runs the stores as trusted for logs and metrics.
Each store asks every request for a credential of its own, beside the gateway's
per-agent checks, so a process on the host that goes around the gateway gets a 401. Root can read the credentials, so treat the host as trusted for what root
can do. The implementation notes say how the credential gets made and delivered:
[the stores' listener credential](../../4-implementation/k8s/runtime.md#the-stores-listener-credential).
### Per-hive credentials live under the hive kind