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 API Support » Setting the MQCSP from C++

Post new topic  Reply to topic
 Setting the MQCSP from C++ « View previous topic :: View next topic » 
Author Message
h_wolf
PostPosted: Mon Jun 23, 2008 5:00 pm    Post subject: Setting the MQCSP from C++ Reply with quote

Novice

Joined: 04 Oct 2005
Posts: 11

I am writing a client application that connects to a remote queue manager which uses a Channel Security Exit to do user/pwd authentication. My client app is currently written in C++ and I am trying to avoid doing a complete re-write to port it to C.

From the description I was given of the Security Exit, I know that I need to do the equivalent of filling in the CSPUserIdPtr and CSPPasswordPtr fields of the MQCSP Security Parameters structure in the MQCNO connection options struct of MQCONNX.

The C++ API has setUserID and setPassword methods for both ImqQueueManager and ImqChannel classes. Which of these is appropriate to call in order to fill in the MQCSP struct? I assume that I also need to call ImqQueueManager::setAuthenticationType(MQCSP_AUTH_USER_ID_AND_PWD) .

Also, how can I set the MQCNO.Version field to MQCNO_VERSION_5 in C++ in order for the MQCSP to be recognized? When I was experimenting with the client code, I turned on tracing in the Queue Manager (strmqtrc -e -t all) but I was never able to see any effect in the hex display of the Connect Options struct of the MQCONN call - and I never could figure out how to get tracing to display the fields for MQCONNX. Is that even possible?

Thanks very much for any insight.

P.S. I am runing MQ v6.0.2.4 on AIX and Linux
Back to top
View user's profile Send private message
h_wolf
PostPosted: Mon Jun 23, 2008 6:01 pm    Post subject: Reply with quote

Novice

Joined: 04 Oct 2005
Posts: 11

I was able to answer some of my questions (but not all) with a little more digging through the docs. I learned from the MQI Cross Reference tables in the Using C++ guide that the ImqQueueManager attributes for authentication type, user id and password correspond to MQCSP. While the user id and password attributes of the ImqChannel class correspond to the MQCD struct, which is not what I want.

OK, so now I know that I definitely want to call:
ImqQueuemanager::setAuthenticationType()
ImqQueuemanager::seUserId()
and ImqQueuemanager::setPassword()

But how can I make sure that the MQCNO.Version field is set correctly? Will that just happen automatically?

Also, is it possible to set tracing (strmqtrc) so that it displays these values in the Queue Manager?
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Jun 23, 2008 7:59 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,
h_wolf wrote:
From the description I was given of the Security Exit, I know that I need to do the equivalent of filling in the CSPUserIdPtr and CSPPasswordPtr fields of the MQCSP Security Parameters structure in the MQCNO connection options struct of MQCONNX.

Is the server-side security exit expecting both the UserId and Password in plain text or are you supposed to encrypt one or both fields?

How do you tell the server-side which resource (server name or LDAP server) you want the UserId and Password to be authenticated against?

h_wolf wrote:
But how can I make sure that the MQCNO.Version field is set correctly? Will that just happen automatically?

The IMQ class will set it.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Setting the MQCSP from C++
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.