I'm using azure service bus topics and need to generate connection string which allows for one topic only to write and only to read from second. I know that I can group both topics into one namespace and generate connection string for this namespace, but in this case permissions will be to broad - writes and reads will be posiblle from both topics. Is three any option to get fine-grade connection string in this case?
Asked
Active
Viewed 143 times
1 Answers
1
You can configure rules at the namespace level, on Service Bus queues and topics.
To achieve what you need to achieve, you'd need two Shared Access Authorization Policies:
- One to write to a topic you want to give access to
- One to read from the subscription you want to give access to (note you cannot read from a topic).
This would mean creating sender and receiver using different connections strings.

Sean Feldman
- 23,443
- 7
- 55
- 80
-
But is there any option to create single connection string which allows to write to one topic and to read from subscription on another topic? – IgorekPotworek Jun 26 '19 at 21:32
-
No. Please see my answer and the link to the documentation. – Sean Feldman Jun 26 '19 at 22:08