Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Microsoft Service Bus for Windows Server - providing access for sending, receive message on Topic

$
0
0

I would like to implement security to restrict some users that can only send message. similar some users should only receive/listen the messages. Below is the code for creating the topic:

                    TopicDescription myTopic = namespaceManager.CreateTopic(DefaultTopicName);
                    myTopic.EnableFilteringMessagesBeforePublishing = true;

                    AuthorizationRule rule = new AllowRule("ServiceBusDefaultNamespace", "nameidentifier", "test.user1@domain", new List<AccessRights>() { AccessRights.Listen, AccessRights.Send, AccessRights.Manage });
                    myTopic.Authorization.Add(rule);

                    rule = new AllowRule("ServiceBusDefaultNamespace", "nameidentifier", "test.user2@domain", new List<AccessRights>() { AccessRights.Listen});
                    myTopic.Authorization.Add(rule);

Topic is created successfully but when subscription the topic from client and listening for message, it gives authentication error for test.user2 user.

Test.user1 has manage rights to the namespace and and service bus. I installed certificate on the client machine after exporting from the server and by using test.user1 it works fine. But if I use test.user2 it does not work and gives error.

Please provide some help on how to resolve the issue and what thing should I check/take care for test.user2.

Thanks in advance



Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>