In order to give read permission to all objects of a queue manager (queues, channels, etc) for monitoring perspective, what command/permission is required. My monitoring client uses java api.
Will MQZAO_ALL_ADMIN
permission do for this purpose. Can setmqaut
be used to set this permission but this command has options like +put , +get, etc not MQZAO_ALL_ADMIN. Currently I am using setmqaut
for each queue, etc. with version 8.0.0.4.
For read only you do not want to use
MQZAO_ALL_ADMIN
since this would give administrative authority. In terms ofsetmqaut
that is+alladm
and provides+chg +clr +dlt +dsp
on queues.In general for read only you would provide
+connect +inq +dsp
against theqmgr
object, and+dsp
for any objects that you want to monitor.+dsp
allows you to see the name of the object and in some cases details of the object. For some objects (queue, process, namelist) you also need to add+inq
to see details of the object. You also need to provide+put
to theSYSTEM.ADMIN.COMMAND.QUEUE
and+get
to either a model queue if you are going to use dynamic queues, or to a normal local queue.You can use wildcards as well if you want to provide permission to multiple queues.
The example below would provide read only permission to all objects for all types:
*Note that I always prefix permissions with a
-all
so that you know the permissions you are granting will be the only permissions. If you did not have-all
and the group above already had other permissions for example+put
on a queue that permission would stay and you would be adding+dsp +inq
and end up with+put +dsp +inq
.If the queue manager is on Windows you can use
-p
and a username instead to grant the permission directly to that user. On Unix prior to v8 if you used -p it would actually grant the permission to the users primary group, in v8 and later if you addSecurityPolicy=user
to theService:
stanza of the qm.ini it will behave like Windows always had and grant permission only to the user specified with the-p
. In a large organization this can be preferred since you know you have provided permission only to a single user, were if you provide it at a group level it is possible someone can just get a second user added to that group and the second user now has the same permission.Note that an alternative to the
setmqaut
command, in MQ v7.1 and later you can grant permissions usingSET AUTHREC
MQSC commands. The commands below will provide the same permissions that the above setmqaut commands provide: