-
Notifications
You must be signed in to change notification settings - Fork 182
Closed
Description
We are using nats as a channel for JSON-RPC and exposed it to our client so that they can invoke our API using Message reply = nc.request("req.foo", request)
How do I prevent our client from subscribing to '_INBOX.>' and read other's response?
authorization {
CLIENT = {
publish = ["req.foo", "req.bar"]
subscribe = "_INBOX.>"
}
Only way I see now is to mimic NatsConnection.request method to use a custom inbox like _INBOX.clientid.*
and set client specific rule as below
authorization {
CLIENT1 = {
publish = ["req.foo", "req.bar"]
subscribe = "_INBOX.client1.>"
}
Exposing NatsConnection.INBOX_PREFIX might help?
Metadata
Metadata
Assignees
Labels
No labels