Watch
0
0
Fork
You've already forked hyperhive
0

swarm-agent-verify: lift the agent-token store check out of swarm-nats-auth

`CredentialSource`, `Store` and `verify` move from swarm-nats-auth's
`agent_token` module into a small library crate, so a second verifier
can make the same check: the secret in a `swarm-agent.<agent>.<secret>`
token equals the one stored at `swarm/agents/<agent>/queue`, read under
the verifier's own certificate.

`verify` now takes its timeout as an argument; swarm-nats-auth passes
`INTROSPECTION_TIMEOUT` as before. No behaviour change. The store-denial
tests moved with the code; swarm-nats-auth keeps the ones that go
through its policy and its bound.

Part of #4459.
This commit is contained in:
atlas 2026-10-12 22:47:37 +02:00 • committed by mara
commit e7dbb94f28
7 changed files with 275 additions and 191 deletions

View file

@ -0,0 +1,18 @@
[package]
name = "swarm-agent-verify"
version.workspace = true
edition.workspace = true
[dependencies]
anyhow.workspace = true
# Comparing an agent's presented secret with the stored one.
subtle.workspace = true
# The agent-token spelling the agent also uses.
swarm-queue-client.workspace = true
# The read of the stored credential the token is checked against.
swarm-secret-client.workspace = true
tokio.workspace = true
tracing.workspace = true
[lints]
workspace = true