|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| INQUIRE_ENTITY_AUTH is not working | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | Sunil | 
			  
				|  Posted: Thu Aug 14, 2008 5:00 am    Post subject: INQUIRE_ENTITY_AUTH is not working |   |  |  
		  | Novice
 
 
 Joined: 20 May 2008Posts: 11
 
 
 | 
			  
				| Hi, 
 We are trying to fetch the MQ authorization detail using PCF programming. The version of MQ is 6.X. We do get 3015. Please let me know what is the problem with code. Any help would be appreciated.
 
 package com.mq.pcf.test;
 
 import java.io.IOException;
 
 import com.ibm.mq.MQException;
 import com.ibm.mq.pcf.CMQC;
 import com.ibm.mq.pcf.CMQCFC;
 import com.ibm.mq.pcf.CMQZC;
 import com.ibm.mq.pcf.PCFMessage;
 import com.ibm.mq.pcf.PCFMessageAgent;
 
 
 
 public class DispalyAuthorisation  {
 
 
 public void viewAuthorization() {
 
 
 try
 {
 PCFMessageAgent		agent;
 // Connect a PCFAgent to the specified queue manager
 agent = new PCFMessageAgent("192.168.128.640", Integer
 .parseInt("1010"),"PORTAL_SRV_CON");
 
 System.out.println ("Connected.");
 
 PCFMessage request = new  PCFMessage(CMQCFC.MQCMD_INQUIRE_ENTITY_AUTH);
 request.addParameter(CMQCFC.MQCACF_ENTITY_NAME,"mqm");
 request.addParameter(CMQCFC.MQIACF_ENTITY_TYPE,CMQZC.MQZAET_GROUP);
 request.addParameter(CMQCFC.MQCACF_OBJECT_NAME,"QM1");
 request.addParameter(CMQCFC.MQIACF_OBJECT_TYPE,CMQC.MQOT_Q_MGR);
 request.addParameter(CMQCFC.MQIACF_AUTH_OPTIONS,CMQCFC.MQAUTHOPT_CUMULATIVE);
 
 PCFMessage [] responses = agent.send (request);
 
 for (int i = 0; i < responses.length; i++)
 {
 PCFMessage response = responses [i];
 System.out.println("Queue Name = " + (String)response.getParameterValue (CMQC.MQOT_AUTH_INFO));
 System.out.println("Queue Depth " + (Integer)response.getParameterValue (CMQCFC.MQIACF_AUTHORIZATION_LIST));
 }
 
 // Disconnect
 
 System.out.print ("Disconnecting... ");
 agent.disconnect ();
 System.out.println ("Done.");
 }
 
 catch (MQException mqe)
 {
 System.err.println (mqe);
 }
 
 catch (IOException ioe)
 {
 System.err.println (ioe);
 }}
 public static void main(String[] args) {
 DispalyAuthorisation quqManager = new DispalyAuthorisation();
 quqManager.viewAuthorization();
 }}
 
 Regards
 Sunil
 |  |  
		  | Back to top |  |  
		  |  |  
		  | PhilBlake | 
			  
				|  Posted: Thu Aug 14, 2008 5:52 am    Post subject: |   |  |  
		  |  Acolyte
 
 
 Joined: 25 Oct 2005Posts: 64
 
 
 | 
			  
				| Hi Sunil.... unfortunately the ordering of the PCF parameters is important and the object name is not needed for queue manager object type. Try this 
 
 
   
	| Code: |  
	| request.addParameter(CMQCFC.MQIACF_AUTH_OPTIONS, CMQCFC.MQAUTHOPT_CUMULATIVE); request.addParameter(CMQCFC.MQIACF_OBJECT_TYPE, CMQC.MQOT_Q_MGR);
 request.addParameter(CMQCFC.MQIACF_ENTITY_TYPE, CMQZC.MQZAET_GROUP);
 request.addParameter(CMQCFC.MQCACF_ENTITY_NAME, "mqm");
 |  
 HTH
 Phil
 |  |  
		  | Back to top |  |  
		  |  |  
		  | Sunil | 
			  
				|  Posted: Sun Aug 17, 2008 8:53 am    Post subject: |   |  |  
		  | Novice
 
 
 Joined: 20 May 2008Posts: 11
 
 
 | 
			  
				| Thanks fill. Now code the is working after I did the changes suggested by you. |  |  
		  | Back to top |  |  
		  |  |  
		  | Sunil | 
			  
				|  Posted: Tue Sep 23, 2008 3:08 am    Post subject: INQUIRE ENTITY AUTH |   |  |  
		  | Novice
 
 
 Joined: 20 May 2008Posts: 11
 
 
 | 
			  
				| Hi 
 The below code is not working if I try to find out authority of user on object.
 
 The code is :-
 
 request.addParameter(CMQCFC.MQIACF_AUTH_OPTIONS, mqAuthzVO.getAuth_options());
 request.addParameter(CMQCFC.MQIACF_OBJECT_TYPE, CMQC.MQOT_Q);
 request.addParameter(CMQCFC.MQCACF_OBJECT_NAME,"TESTQ");
 request.addParameter(CMQCFC.MQIACF_ENTITY_TYPE, CMQZC.MQZAET_PRINCIPAL);
 request.addParameter(CMQCFC.MQCACF_ENTITY_NAME, "Administrator");
 
 Please let me know what is the issue with above code ?
 Does command server log message any where ? How do I find out what is correct order of parameter ?
 Regards
 Sunil
 |  |  
		  | Back to top |  |  
		  |  |  
		  | bobbee | 
			  
				|  Posted: Wed Apr 20, 2022 10:31 am    Post subject: |   |  |  
		  |  Knight
 
 
 Joined: 20 Sep 2001Posts: 546
 Location: Tampa
 
 | 
			  
				| Sunil, Your last post. Did you ever get it working. I am getting NOT FOUND although the same command under RUNMQSC is working and returns Queues with my ENTITY assigned.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | fjb_saper | 
			  
				|  Posted: Thu Apr 21, 2022 7:07 am    Post subject: Re: INQUIRE ENTITY AUTH |   |  |  
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| Sunil wrote: |  
	| Hi 
 The below code is not working if I try to find out authority of user on object.
 
 The code is :-
 
 request.addParameter(CMQCFC.MQIACF_AUTH_OPTIONS, mqAuthzVO.getAuth_options());
 request.addParameter(CMQCFC.MQIACF_OBJECT_TYPE, CMQC.MQOT_Q);
 request.addParameter(CMQCFC.MQCACF_OBJECT_NAME,"TESTQ");
 request.addParameter(CMQCFC.MQIACF_ENTITY_TYPE, CMQZC.MQZAET_PRINCIPAL);
 request.addParameter(CMQCFC.MQCACF_ENTITY_NAME, "Administrator");
 
 Please let me know what is the issue with above code ?
 Does command server log message any where ? How do I find out what is correct order of parameter ?
 Regards
 Sunil
 |  Yeah well Administrator is not a good example as it is over 8 and then even over 12 char in length... You may try it with a username that up to 12 chars  (Windows) only and preferably up to 8 chars only (Unix)...
  _________________
 MQ & Broker admin
 |  |  
		  | Back to top |  |  
		  |  |  
		  | gbaddeley | 
			  
				|  Posted: Thu Apr 21, 2022 5:04 pm    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 2538
 Location: Melbourne, Australia
 
 | 
			  
				| It would be interesting to know if Sunil was still around, after over 13 years since post above. _________________
 Glenn
 |  |  
		  | 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
 
 |  |  |  |