Grant access to a user to subscribe to a topic
This topic is the first one in a list of tasks that tells you how to grant access to topics by more than one user.
About this task
An application can make a subscription by providing a topic object, or a topic string, or a combination of both. Whichever way the application selects, the effect is to make a subscription at a certain point in the topic tree. If this point in the topic tree is represented by an administrative topic object, a security profile is checked based on the name of that topic object.
Topic | Subscribe access required | Topic object |
---|---|---|
Price | No user | None |
Price/Fruit | USER1 | FRUIT |
Define a new topic object as follows:
Procedure
Results
When USER1
attempts to subscribe to topic
the result is success.
Price/Fruit
When
USER2
attempts to subscribe to topic Price/Fruit
the result is failure with an MQRC_NOT_AUTHORIZED
message, together with:- On z/OS, the following messages seen on the console that show the full security path through the topic tree that has been attempted:
ICH408I USER(USER2 ) ... hlq.SUBSCRIBE.FRUIT ... ICH408I USER(USER2 ) ... hlq.SUBSCRIBE.SYSTEM.BASE.TOPIC ...
- On other platforms, the following authorization event:
MQRC_NOT_AUTHORIZED ReasonQualifier MQRQ_SUB_NOT_AUTHORIZED UserIdentifier USER2 AdminTopicNames FRUIT, SYSTEM.BASE.TOPIC TopicString "Price/Fruit"
- On IBMi, the following authorization event:
MQRC_NOT_AUTHORIZED ReasonQualifier MQRQ_SUB_NOT_AUTHORIZED UserIdentifier USER2 AdminTopicNames FRUIT, SYSTEM.BASE.TOPIC TopicString "Price/Fruit"
Note that this is an illustration of what you see; not all the fields.