Hello,
Best wishes to all for this new year!
Thanks to Morag and Mark for their suggestions, both interesting and effective.
In the end I preferred mqccred, because :
- I had used this option very little, and I wanted to study it more closely
- The .ini file allows to store user and password, which simplifies the operations for deployments
The password is encrypted in the file, and seems complicated to retrieve.
I don't know how robust this encryption is, but it's better than leaving it in the clear in the MQSC file as the KC propose (and in any case, the password travels in clear over the channel, so TLS is highly recommended).
Now I can comfortably deploy my MQonCloud configurations from my Windows workstation!
------------------------------
Luc-Michel Demey
DEMEY CONSULTING
lmd@demey-consulting.fr#IBMChampion
------------------------------
Original Message:
Sent: Sat December 24, 2022 08:20 AM
From: Mark Taylor
Subject: Use the -f and -u options simultaneously with runmqsc
I always use regular redirection instead of the -f option. At its simplest, you can then do(echo $password; cat commands.mqsc) | runmqsc -u userid
with the way you get/set the password being up to you. It has the benefit of being ephemeral - not showing up on any command line or the environment or in the MQSC file itself.
------------------------------
Mark Taylor
Winchester
Original Message:
Sent: Fri December 23, 2022 05:38 PM
From: Luc-Michel Demey
Subject: Use the -f and -u options simultaneously with runmqsc
Hello,
To use runmqsc in client mode to a Queue Manager with security enabled, the command looks like
runmqsc -c -u USER QM
with the password given at the prompt.
If now I want to use an MQSC file, the syntax is :
runmqsc -c -u USER -f file.mqsc QM
But in this case, the prompt does not allow me to enter a password, the only solution is to provide the password in the first line of the MQSC file.
Leaving a password in a configuration file does not suit me. Is there another solution for example by combining "-f" for the MQSC file and "<" for the password?
Thanks and Merry Christmas!
------------------------------
Luc-Michel Demey
DEMEY CONSULTING
lmd@demey-consulting.fr
#IBMChampion
------------------------------