|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
|
|
Admin API: Display all objects that a group has access to |
« View previous topic :: View next topic » |
Author |
Message
|
tx58g |
Posted: Wed Feb 15, 2023 3:39 am Post subject: Admin API: Display all objects that a group has access to |
|
|
Newbie
Joined: 15 Feb 2023 Posts: 4
|
Hi all,
I'm currently working on a little intranet self-service app through which users can order themselves MQ objects and permissions in a controlled way. I am using the admin REST API which has been working OK so far.
Now I would like to display all objects that a group has access to. For that I could do a DISPLAY AUTHREC command on each and every object (I have the full list already). BUT: if there are 3000 queues that means 3000 individual REST calls... not very effective. I didn't find a way to send batch MQSC commands via POST runCommand / runCommandJSON...
Another way would be to use DISPLAY AUTHREC with some wildcard parameters, but I haven't been able to figure out what I need. For example, if I have a group "g_lima_px", and I do
Code: |
dis authrec group(g_lima_px) |
or
Code: |
dis authrec profile(**) group(g_lima_px) |
I get nothing.
Code: |
dis authrec profile(**) |
doesn't work either, it only returns the (**) matches...
If I do name one object specifically, I get results:
Code: |
dis authrec profile(LIMA/TST) |
not only the specific ones, but wildcard ones as well, eg:
Code: |
Display authority record details.
PROFILE(LIMA*) ENTITY(g_lima_px)
ENTTYPE(GROUP) OBJTYPE(TOPIC)
AUTHLIST(DSP) |
Is there a way to avoid asking for the authrec of each MQ object individually? As a last resort I could build up a cache, for all groups and all objects, and refresh it every now and then, but this is something that I would really like to avoid, if at all possible.
Any suggestions would be appreciated. |
|
Back to top |
|
|
tx58g |
Posted: Wed Feb 15, 2023 3:55 am Post subject: |
|
|
Newbie
Joined: 15 Feb 2023 Posts: 4
|
As soon as I posted the above, I had an idea out of the blue and tried (in the terminal)
Code: |
dis authrec group('g_lima_px') |
And it worked! I'm very confused about when names need to be quoted in MQSC commands (for example:
Code: |
dis authrec profile(LIMA.TST) |
and
Code: |
dis authrec profile('LIMA.TST') |
both work), but it doesn't hurt trying both ways...
Rubberducking FTW.
(I'm still interested in alternatives, especially how to batch runCommand requests, as there are some other usecases where it would be useful...) |
|
Back to top |
|
|
bruce2359 |
Posted: Wed Feb 15, 2023 8:43 am Post subject: |
|
|
Poobah
Joined: 05 Jan 2008 Posts: 9445 Location: US: west coast, almost. Otherwise, enroute.
|
tx58g wrote: |
I'm very confused about when names need to be quoted in MQSC commands |
The well-documented rule is: if you want to maintain 'lower-case' or 'MixedCase', then enclose in quotes/apostrophes, otherwise the name will be automatically folded into UPPER-CASE. The also well-documented object naming allowable characters are:
letters A-Z upper case
letters a-z lower case
numbers 0-9
special characters ./_% _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
|
hughson |
Posted: Thu Feb 16, 2023 1:40 am Post subject: |
|
|
Padawan
Joined: 09 May 2013 Posts: 1949 Location: Bay of Plenty, New Zealand
|
bruce2359 wrote: |
The well-documented rule is: ... |
And in case you are wondering WHERE said documentation is, here's a couple of pages for you.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
|
bruce2359 |
Posted: Thu Feb 16, 2023 5:51 am Post subject: |
|
|
Poobah
Joined: 05 Jan 2008 Posts: 9445 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
|
tx58g |
Posted: Thu Feb 16, 2023 6:04 am Post subject: |
|
|
Newbie
Joined: 15 Feb 2023 Posts: 4
|
TBH I can hardly think of anything more evil than a command failing silently, instead of complaining (about missing quotes, for example).
Another example for this is the DEFINE PROCESS command, where the APPLTYPE parameter is a string (according to the docs), but it _must not_ be quoted. (But it at least does complain, instead of failing silently.)
To my simple programmer's mind a string is a string because of the quotation marks, and anything else is a keyword, an identifier, or an atom/literal... Oh well. I'm old enough to remember the compulsory TAB characters in Makefiles, life is too easy now! |
|
Back to top |
|
|
tx58g |
Posted: Thu Feb 16, 2023 6:15 am Post subject: |
|
|
Newbie
Joined: 15 Feb 2023 Posts: 4
|
It does not seem to work with DISPLAY AUTHREC though... or is it just missing from the docs? |
|
Back to top |
|
|
|
|
|
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|