hyperhive/swarm-nats-auth/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 3b038425f2 fix(#3987): join the agent-status key with a dot so a hive's write grant can be scoped
A KV entry publishes to $KV.<bucket>.<key> and NATS wildcards match whole
.-delimited tokens, so a /-joined {hive}/{agent} key is a single token: the
only expressible write grants are one exact subject per agent (needs a roster
in the auth responder, which Policy::hive_name argues against) or a bucket-wide
wildcard that lets any hive overwrite any other hive's agents.

Joining with a dot puts the hive in its own token, so hive_subjects can grant
$KV.agent-status.<hive>.* — every agent of one hive and nothing else, the same
containment hive-status already has.

The grant lands with the bucket-open pair (STREAM.INFO + STREAM.CREATE):
open_or_create resolves the bucket before it writes, so alone the publish
subject is unreachable and the sweep fails one step later instead.

Verified the client accepts a dotted key rather than assuming it: async-nats
0.50.0 VALID_KEY_RE is \A[-/_=.a-zA-Z0-9]+\z and is_valid_key rejects only
empty / leading / trailing dot; the subject is prefix + key verbatim.
2026-09-02 20:30:30 +02:00
..
introspect.rs feat(#3297): read the caller's identity out of introspection 2026-08-16 23:48:32 +02:00
main.rs strip ansi escapes from systemd-managed daemon logs 2026-08-30 23:23:00 +02:00
policy.rs fix(#3987): join the agent-status key with a dot so a hive's write grant can be scoped 2026-09-02 20:30:30 +02:00
request.rs feat(swarm): the auth-callout responder (#3112 slice 2) 2026-08-15 09:34:33 +02:00
respond.rs feat(#3297): scope a hive's queue grant to its own subjects 2026-08-17 17:34:27 +02:00