Adding the secure Property to the Topic
When the secure property is added to a topic, only users who have been assigned a certain permission can perform the actions allowed by that permission. For example, only users with publish permission on the topic can publish, while other users cannot publish.
If the secure property is not added to a topic, all authenticated users have all permissions (publish, subscribe, create durable subscribers) on that topic.
For more information on the secure property, see the section about
secure
. For more information on topic permissions, see
Authentication and Permissions,.
To enable server authorization and add the
secure
property to a topic, do the following steps:
- Procedure
- In each subscriber window, enter Control-C to stop each subscriber.
- In the administration tool, use the
set server
command to enable theauthorization
property:tcp://localhost:7222> set server authorization=enabled
The
authorization
property enables checking of permissions set on destinations. - Enter the following command to add the
secure
property to a topic namedmyTopic
:tcp://localhost:7222> addprop topic myTopic secure
For more information on the
set server
command, refer toset server
. For more information on theaddprop topic
command, refer toaddprop topic
.