hyperhive/swarm-nats-auth/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas a977e30d66 swarm-nats-auth: grant the wanted-state bucket, scoped by direction
The bucket the previous commit adds had no grants, so the controller
could not create or write it and no hive could read its own key.

Measured against nats-server 2.14.4 rather than extended by analogy,
because the shapes are not symmetric:

- controller: `STREAM.INFO` + `STREAM.CREATE` on `KV_hive-wanted` and
  `$KV.hive-wanted.>`. With only today's status grants, `get_key_value`
  timed out and the server named the two missing stream subjects.
- hive: `STREAM.INFO` plus **one** direct-get subject carrying its own
  key. A KV read is a publish — `store.get` is a request — and the
  direct-get subject embeds the key, so the read scopes per hive. By
  analogy with `reader_subjects` this would have been `.>`, handing
  every hive every hive's wanted set.

Both refusals were verified to fire, not assumed: as `alpha`,
`get beta` was refused naming
`$JS.API.DIRECT.GET.KV_hive-wanted.$KV.hive-wanted.beta`, and
`put alpha` was refused naming `$KV.hive-wanted.alpha`.

`a_reader_may_list_and_fetch_but_not_write` asserted a reader holds no
`$KV.` subject at all, which held only while status was the sole
bucket. Narrowed to the status bucket — the invariant it defends is
that the controller cannot forge a hive's own report, and the wanted
bucket runs the other way.

Refs #3124
2026-08-31 20:50:06 +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 swarm-nats-auth: grant the wanted-state bucket, scoped by direction 2026-08-31 20:50:06 +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