Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ibmMq auth with users without a password set #196

Merged
merged 1 commit into from
Jun 14, 2021
Merged

Conversation

faustin0
Copy link
Contributor

This PR fix the authentication with users without a password (like the default user app in the ibm docker image).
Currently if we try to use the default(non admin) user in the test we get the following error:

JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED')
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:203)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:453)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:8476)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7815)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:322)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createContext(JmsConnectionFactoryImpl.java:609)
...

The ibm client is expecting a null for a user without a password, otherwise a property is set that trigger the check:
see the line on the class:
com.ibm.mq.allclient- 9.2.2.0.jar/com/ibm/msg/client/jms/admin/JmsConnectionFactoryImpl.class:199.

In order to use the default user without admin permissions, we have to create the topics and queues used in the tests using a definitions.mqsc file that has been added to the script folder.

@faustin0 faustin0 requested review from azanin and r-tomassetti June 11, 2021 19:11
@faustin0 faustin0 merged commit 0d3efa3 into main Jun 14, 2021
@faustin0 faustin0 deleted the fix-ibmmq-auth branch June 14, 2021 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants