Only encrypted passwords are allowed for all password fields in WGS Rest API. Plain text passwords can be encrypted from command line using the respective jar file. Note that all jar files give same result or encrypted password. For instance, when adding an EMS Manager/Broker definition, user passwords or SSL passwords can be encrypted by running the following command:java -jar nsqcmems.jar -p 'password'
.
Below is a sample for encrypting the password P@$$word
.
[nastel@APM6-GA nsqcmkafka]$ java -jar nsqcmkafka.jar -p 'P@$$word'
ZXOtyzT1dnem/v2pe1i9TA==
Except for MQ, the same procedure is applicable for all supported middleware technologies (Kafka, Solace, RabbitMQ, IIB/ACE). For MQ Java CM, the command line options change. Sample below shows the required options.
[nastel@APM6-GA nsqcmmq]$ java -jar nsqcmmq.jar encrypt 'P@$$word'
2025-01-15T13:58:18,582 WARN [main] (AgentSettings) - The variable eventQueue does not exist in config file . It uses default value: NASTEL.EVENT.QUEUE
2025-01-15T13:58:18,594 WARN [main] (AgentSettings) - The variable DEFAULT_MODEL_QUEUE is optional in config . It uses default value: SYSTEM.DEFAULT.MODEL.QUEUE
2025-01-15T13:58:18,594 WARN [main] (AgentSettings) - The variable REPLYQUEUE is optional in config . It uses default value: NASTEL.REPLY.*
encrypted text: ZXOtyzT1dnem/v2pe1i9TA==
Below is a sample Rest API request body for creating a remote EMS manager definition.
{
"wgsName": "MQM",
"nodeName": "TEST",
"managerName": "TEST",
"general": {
"serverUrl": "tcp://localhost:7222",
"emsUser": "test",
"emsPassword": "yclOCChY58IGTZ8Q5kPpDA=="
}
}
Below is a sample Rest API request body for creating a remote MQ manager definition.
{
"wgsName": "MQM",
"nodeName": "TEST",
"qmgrName": "TEST",
"general": {
"connectUser": "test",
"connectPassword": "yclOCChY58IGTZ8Q5kPpDA=="
},
"communication": {
"connectionName": "localhost(1414)",
"cmdQName": "SYSTEM.ADMIN.COMMAND.QUEUE",
"channelName": "SYSTEM.DEF.SVRCONN"
}
}