Reputation: 1994
Currently i am having below properties in my spring boot application.yaml.
ibm:
mq:
queueManager: <queue-manager>
channel: <channel>
connName: <host>(<port>)
queue: <queue-name>
user: <user>
password: <password>
I want to connect without password and for that i have to set jmsConnectionFactory.setBooleanProperty(WMQConstants.USER_AUTHENTICATION_MQCSP, false);
property.
Is there anyway i can specify this property in application.yaml by passing parameter to connName ?
Where can I find all the pre-defined key spring-boot application properties related to IBM MQ?
Upvotes: 1
Views: 5565
Reputation: 41
One part of your question was if you could set WMQConstants.USER_AUTHENTICATION_MQCSP in your yaml file with spring boot. You can easily set additional mq properties like so:
ibm:
mq:
conn-name: "localhost(1414)"
queue-manager: "TEST"
channel: "TEST"
user: "TEST"
password: ""
additional-properties:
XMSC_WMQ_QMGR_CCSID: 1208
XMSC_WMQ_CONNECTION_MODE: 1
XMSC_USER_AUTHENTICATION_MQCSP: false
Upvotes: 1
Reputation: 7525
The choice about whether or not you can connect without a password is not something you can make from the application. It is configuration in the queue manager that determines whether or not you are allowed in without a password.
The boolean property you mention in your question does not turn on/off the user of a password or not, it switches between two possible mechanisms to send the password, the pre-V8 mechanism, and the MQCSP mechanism.
If you don't want to send a user id and password, just don't set a user id and a password.
Upvotes: 0
Reputation: 1017
This is answered in the README for the MQ Spring Boot package.
But in summary, the MQ Spring Boot default configuration is set up to authenticate with admin/passw0rd to match the default configuration of the Developer Edition of MQ. To do no authentication at all, then set the userid to be empty in the config file.
ibm.mq.user=
To force an unauthenticated connection to run as a specific id, then CHLAUTH rules can be applied.
The complete set of configuration parameters available, along with their default values, is listed in that README. Some IDEs can pick it up as well from the jar files when editing config files.
The authentication strategy is discussed further at https://github.com/ibm-messaging/mq-jms-spring/issues/18
Upvotes: 5