A machine may bind its consumer and hear the answer

Binding to a consumer asks the server about it and hears the answer on the
client's inbox; hearing a declaration acknowledges it. A machine's user was granted
none of that and was refused the first time one dialled a permissioned server:
"this node cannot read its declarations". Its inbox is its own prefix, which the
host now sets.
This commit is contained in:
2026-09-28 01:16:46 +02:00
parent ffa390f916
commit 64d154d9d7
+10 -2
View File
@@ -244,8 +244,16 @@ func PermissionsFor(p Principal) (Permissions, error) {
case KindNode:
// A host publishes its own node's control traffic and subscribes its own declaration —
// and nothing of any other node's.
pub = []string{"mesh.control." + p.Node + ".>"}
sub = []string{"mesh.node." + p.Node + ".declare"}
// And what the host does with its consumer, nothing more: binding to it asks the server
// about it (CONSUMER.INFO) and hears the answer on its own inbox; hearing a declaration
// acknowledges it. Found the first time a machine dialled a permissioned server: refused
// for both, and "this node cannot read its declarations" (2026-09-28).
pub = []string{
"mesh.control." + p.Node + ".>",
"$JS.API.CONSUMER.INFO.NODES." + p.Node,
"$JS.ACK.NODES." + p.Node + ".>",
}
sub = []string{"mesh.node." + p.Node + ".declare", p.inbox()}
case KindModule:
// 1. Its own namespace: it publishes its events there and serves its tools there. Nothing