You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a solution where I have multiple services on a device that uses NATS for internal communication.
NATS uses the following configuration file:
I'm basically trying to publish sample.topic from one service to another.
I have created a stream called VolatileStream that contains the sample.topic subject.
The services are written in C# and I'm using CAP as an abstraction layer.
I have everything working, but I'm a bit confused by how to configure the permissions for the receiver service.
As I understand it CAP need the $JS.*-publish-permissions specified above.
What is not clear is that the subscribe-permission sample.topic seems to require $JS.API.CONSUMER.CREATE.VolatileStream.*.sample.topic publish-permission which in turn seems to make the sample.topic subscribe-permission obsolete.
So I can basically remove sample.topic from subscribe-permissions but keep $JS.API.CONSUMER.CREATE.VolatileStream.*.sample.topic in publish-permissions and I will still be able to subscribe to and receive the message.
The expected result here would be that I should not be able to subscribe to a topic that is not defined in the subscribe-permissions.
I guess I'm wondering if I'm I doing something wrong here or is this how it is supposed to be configured?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm building a solution where I have multiple services on a device that uses NATS for internal communication.
NATS uses the following configuration file:
I'm basically trying to publish
sample.topic
from one service to another.I have created a stream called
VolatileStream
that contains thesample.topic
subject.The services are written in C# and I'm using CAP as an abstraction layer.
I have everything working, but I'm a bit confused by how to configure the permissions for the receiver service.
As I understand it CAP need the
$JS.*
-publish-permissions specified above.What is not clear is that the subscribe-permission
sample.topic
seems to require$JS.API.CONSUMER.CREATE.VolatileStream.*.sample.topic
publish-permission which in turn seems to make thesample.topic
subscribe-permission obsolete.So I can basically remove
sample.topic
from subscribe-permissions but keep$JS.API.CONSUMER.CREATE.VolatileStream.*.sample.topic
in publish-permissions and I will still be able to subscribe to and receive the message.The expected result here would be that I should not be able to subscribe to a topic that is not defined in the subscribe-permissions.
I guess I'm wondering if I'm I doing something wrong here or is this how it is supposed to be configured?
Beta Was this translation helpful? Give feedback.
All reactions