MQCMD_INQUIRE_AUTH_RECS requires CMQZC for optional parameter

Asked by Rik Baeten

Currently I'm implementing the automatic setting of ACL's from pymqi.

Apparently CMQZC is required for setting the optional parameter MQIACF_ENTITY_TYPE of MQCMD_INQUIRE_AUTH_RECS:
<code>
import pymqi
import CMQC
import CMQFC
qmgr = pymqi.QueueManager(None)
qmgr.connectTCPClient("myqm", pymqi.cd(), "SYSTEM.DEF.SVRCONN", "myhost(1414)")
pcf = pymqi.PCFExecute(qmgr)
pcf.MQCMD_INQUIRE_AUTH_RECS({CMQCFC.MQIACF_AUTH_OPTIONS: CMQCFC.MQAUTHOPT_NAME_ALL_MATCHING+CMQCFC.MQAUTHOPT_ENTITY_EXPLICIT+CMQCFC.MQAUTHOPT_NAME_AS_WILDCARD,CMQCFC.MQCACF_AUTH_PROFILE_NAME:'*',CMQCFC.MQIACF_OBJECT_TYPE:CMQC.MQOT_ALL,CMQCFC.MQCACF_ENTITY_NAME: 'mquser123',CMQCFC.MQIACF_ENTITY_TYPE:CMQZC.MQZAET_GROUP})
</code>

$ grep MQZAET_GROUP /opt/mqm/inc*
cmqzc.h: #define MQZAET_GROUP 0x00000002

Are there any plans to add support for CMQZC or is it already supported somehow? Thanks.

=========================
Another question (somehow related to the previous question)

As a workaround I'm trying the same command without specifying the MQIACF_ENTITY_TYPE, but now I get
MQRCCF_CFST_CONFLICTING_PARM.

Since the infocenter is suggesting the queue manager returns specifically which parameter is in conflict, it would be nice if pymqi would add that info as well to the MQMIError:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amqzao.doc/fm16990_.htm

At this time I'm forced to revert to trial and error.

Question information

Language:
English Edit question
Status:
Solved
For:
PyMQI Edit question
Assignee:
Dariusz Suchojad Edit question
Solved by:
Rik Baeten
Solved:
Last query:
Last reply:
Revision history for this message
Dariusz Suchojad (dsuch) said :
#1

Hi Rik,

I have a patched version which works fine for the code below. Can you please try it out and let me know how it works for you at the moment? I'd like you to run with and existing MQCMD_INQUIRE_AUTH_RECS ('mqm' should do). Thanks.

As for CMQZC - I've opened bug report #728594 for tracking it. It will be added in PyMQI 1.2.

The MQRCCF_CFST_CONFLICTING_PARM thing - I can't reproduce it right now because of the patch that I'm using which apparently makes the MQRCCF_CFST_CONFLICTING_PARM not happen in the first place but I'll see to how it could be added though I'm not really sure if it isn't just a peculiar wording being used in the InfoCenter, I mean, I'm not sure if MQ really returns such an information. But anyhow, we'll see.

Again, many thanks for suggesting it all!

import pymqi
import CMQC
import CMQCFC

qm = "QM01"
channel = "SVRCONN.1"
conn_info = "127.0.0.1(1418)"

qmgr = pymqi.QueueManager(None)
qmgr.connectTCPClient(qm, pymqi.cd(), channel, conn_info)
pcf = pymqi.PCFExecute(qmgr)

print pcf.MQCMD_INQUIRE_AUTH_RECS(
    {CMQCFC.MQIACF_AUTH_OPTIONS: CMQCFC.MQAUTHOPT_NAME_ALL_MATCHING+CMQCFC.MQAUTHOPT_ENTITY_EXPLICIT+CMQCFC.MQAUTHOPT_NAME_AS_WILDCARD,
     CMQCFC.MQCACF_AUTH_PROFILE_NAME:'*',
     CMQCFC.MQIACF_OBJECT_TYPE:CMQC.MQOT_ALL,
     CMQCFC.MQCACF_ENTITY_NAME: 'mqm'
    })

Revision history for this message
Dariusz Suchojad (dsuch) said :
#2

Err I'm sorry, I meant running the code with an existing MQCACF_ENTITY_NAME of course :-)

Revision history for this message
Dariusz Suchojad (dsuch) said :
#3

Rik, can I assist you in any way? Please do note that the question will expire due to inactivity in some time. Of course, feel free to re-open it any time you wish!

Revision history for this message
Rik Baeten (rik-baeten) said :
#4

Thank you, Dariusz! I confirm it's correctly working in pymqi 1.2.

Since the bazaar client cannot download files through a proxy, it's rather difficult to download a branch other than downloading file by file from the web interface or downloading at home.

Is there a reason not to generate the modules for the other header files as well? Currently I don't require anything in particular, but we could assume that other constants could be useful for some people some day: for example constants for publish subscribe (CMQPSC) .

Concerning the MQRCCF_CFST_CONFLICTING_PARM, I'm also unable to reproduce at this moment. If it occurs again, I will post it here.