diff --git a/modules/mesh-grants/internal/buscompose/buscompose_test.go b/modules/mesh-grants/internal/buscompose/buscompose_test.go index 191dbae7c..a9afefdc8 100644 --- a/modules/mesh-grants/internal/buscompose/buscompose_test.go +++ b/modules/mesh-grants/internal/buscompose/buscompose_test.go @@ -1462,10 +1462,10 @@ func chunkSubjectsFollowTheAnswerer(t *testing.T) { if rec := perms["a.recovery.recover"]; !has(rec.Subscribe, chunks) || !has(rec.Publish, acks) { t.Errorf("the process naming the verb may not hear chunks and send acks") } - for _, u := range []string{"a.admin-ish", "a.nats"} { - if p := perms[u]; has(p.Subscribe, chunks) || has(p.Publish, chunks) || has(p.Publish, acks) { - t.Errorf("%s, naming no chunked verb, is granted chunk subjects: %v / %v", u, p.Publish, p.Subscribe) - } + // Principle 6 (the operator, 2026-11-15): an account naming no chunked verb still hears its chunks and sends their acks; it + // never sends the chunks, which are the answering account's. + if p := perms["a.admin-ish"]; !has(p.Subscribe, chunks) || !has(p.Publish, acks) || has(p.Publish, chunks) { + t.Errorf("a.admin-ish may not hear chunks and send acks, or may send chunks: %v / %v", p.Publish, p.Subscribe) } keeper := perms["a.nats.keeper"] if !MayPublish(keeper, "$JS.API.STREAM.RESTORE.SECRETS") || !MayPublish(keeper, "$JS.SNAPSHOT.RESTORE.SECRETS.abc") { diff --git a/modules/mesh-grants/internal/buscompose/chunks.go b/modules/mesh-grants/internal/buscompose/chunks.go index b7bb2ae94..81401043f 100644 --- a/modules/mesh-grants/internal/buscompose/chunks.go +++ b/modules/mesh-grants/internal/buscompose/chunks.go @@ -53,7 +53,10 @@ func chunkGrants(p Principal) (pub, sub []string) { if (p.Kind == KindProcess || p.Kind == KindModule) && slices.Contains(p.AnswersSeat, "seat:"+c.Seat+"."+c.Verb) { pub, sub = append(pub, chunkSubject(c)), append(sub, ackServed(c)) } - if slices.Contains(p.Invokes, "seat:"+c.Seat+"."+c.Verb) { + // Any account of a module, its processes, its node or the tool runner may receive a verb's chunks, invoked or not + // (principle 6; the operator, 2026-11-15: no fine-grained permissions inside the mesh): a check program on a build seat + // asks seat:mesh-catalog.input and no manifest of the seat's holder names it. + if slices.Contains(p.Invokes, "seat:"+c.Seat+"."+c.Verb) || slices.Contains([]Kind{KindModule, KindProcess, KindNodeTools, KindNode}, p.Kind) { sub, pub = append(sub, chunkSubject(c)), append(pub, ackSubject(c)) } }