ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » INQUIRE_ENTITY_AUTH is not working

Post new topic  Reply to topic
 INQUIRE_ENTITY_AUTH is not working « View previous topic :: View next topic » 
Author Message
Sunil
PostPosted: Thu Aug 14, 2008 5:00 am    Post subject: INQUIRE_ENTITY_AUTH is not working Reply with quote

Novice

Joined: 20 May 2008
Posts: 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
View user's profile Send private message
PhilBlake
PostPosted: Thu Aug 14, 2008 5:52 am    Post subject: Reply with quote

Acolyte

Joined: 25 Oct 2005
Posts: 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
View user's profile Send private message
Sunil
PostPosted: Sun Aug 17, 2008 8:53 am    Post subject: Reply with quote

Novice

Joined: 20 May 2008
Posts: 11

Thanks fill. Now code the is working after I did the changes suggested by you.
Back to top
View user's profile Send private message
Sunil
PostPosted: Tue Sep 23, 2008 3:08 am    Post subject: INQUIRE ENTITY AUTH Reply with quote

Novice

Joined: 20 May 2008
Posts: 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
View user's profile Send private message
bobbee
PostPosted: Wed Apr 20, 2022 10:31 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
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
View user's profile Send private message Send e-mail AIM Address
fjb_saper
PostPosted: Thu Apr 21, 2022 7:07 am    Post subject: Re: INQUIRE ENTITY AUTH Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
gbaddeley
PostPosted: Thu Apr 21, 2022 5:04 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » INQUIRE_ENTITY_AUTH is not working
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.