fix(relay): grant process.send to user hubs via user_security_scope#88
Merged
Conversation
The user hub delivers welcome and relay payloads with process.send under the user actor, but user_security_scope only fed user_hub_registry (registry register/unregister), so every delivery was silently denied unless the application hand-rolled a messaging policy. Bind the scope into a user_hub_messaging policy shipped by the module; the resource is '*' because process.send is checked against the raw destination pid. The test harness drops its local copy of the grant — the suite now proves the module's own policy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The user hub delivers welcome and relay payloads with
process.sendunder the user actor, butuser_security_scopeonly feduser_hub_registry(registry register/unregister) — so every hub-to-client delivery was silently denied unless the application hand-rolled a messaging policy (the hub code drops the send result, so nothing surfaces). Found via the relay welcome test in #87, which was temporarily green only because the harness carried a local grant.Adds
wippy.relay.security:user_hub_messaging(actions:process.send, resources'*'— the check runs against the raw destination pid, which has no matchable pattern) and bindsuser_security_scopeinto its groups alongside the registry policy. The harness drops its local copy, so the relay suite now proves the module's own grant.