Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IBM MQ 8.0, How to provide username and password to amqsget as command line parameters

Tags:

ibm-mq

I have an error popping up after upgrading to IBM MQ 8.0 from 7.5 reason being -

In MQ 8.0, a new function is introduced that requires MQ administrators using remote access to supply the userid and password. When the userid and password are not supplied or the password is incorrect

Error: 2035 Code : 2 The queue manager is configured to require a user ID and password, but none was supplied.

The problem is described better in this link. There are three scenarios that are talked about. My solution would fall in Scenario A) MQ samples: Provide the user and password to the MQ client application

I'm trying to read from the MQ using a program. Is there a way I can pass the username and password as part of the command line parameters rather than inputting it when prompted. Because this exe is invoked by my program.

$ amqsputc qName qMgr
like image 220
Ganesh Kumar Avatar asked Feb 26 '16 07:02

Ganesh Kumar


People also ask

What is Mqcsp authentication?

MQCSP authentication mode In this mode, the client side user ID is sent as well as the user ID and password to be authenticated, so you are able to use ADOPTCTX(NO). The user ID and password are available to a server-connection security exit in the MQCSP structure provided in the MQCXP structure.


1 Answers

IBM provides a client-side channel security exit called mqccred to perform this task. The full documentation is at the link provided but in general it requires the following:

  • Specify the exit in a CCDT file.
  • Configure the exit by placing ID and password in an ini file
  • Execute the runmqccred command against the ini file to obfuscate the passwords.
  • Make sure the ini file is set so that world- and group-read are disabled.

Note that Java/JMS programs can easily be modified and the exit is intended mainly for programs using the native C API or that are compiled on top of that.

like image 189
T.Rob Avatar answered Sep 24 '22 04:09

T.Rob