|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Creating a keystore for a JMS application |
« View previous topic :: View next topic » |
Author |
Message
|
jamesb |
Posted: Thu May 11, 2023 2:28 pm Post subject: Creating a keystore for a JMS application |
|
|
Novice
Joined: 09 Mar 2008 Posts: 17
|
I'm revisiting SSL as it's been ages since I last set this up from scratch. I've got my QM to QM communication going using CA certs and that's working fine. I now need to sort out keystores for a couple of JMS apps and looking for clarification on the commands to run:
The app team I work with are not particularly knowledgeable in this area (surprise, surprise), but I'm assuming the best, or only, way is to provide them with a .jks file with the client personal cert and CA certs in it. Based on what I did for the QM certs, I think the commands I need to run are:
runmqckm -keydb -create -db clientapp.jks -type jks -pw client_password
runmqckm -certreq -create -db clientapp.jks -pw client_password -label ibmwebspheremqclientapp -dn "long distinguished name" -size 2048 -file clientapp.csr -sig_alg SHA256WithRSA
(send to CA to be signed)
runmqckm -cert -import -db clientapp.jks -type jks -target clientapp.jks -target_type jks -file filename
Then give the keystore to the app team to install with their JMS app. However, I'm not particular sure of this command sequence, in particular the type.
In this case I don't want the label to be named ibmwebspheremqmyuserid as we have a number of apps running under a tomcat service account all under the same user ID as part of a shared service so I'd prefer them to be named after the app. I'm aware this seems to go against the 'recommendation', but hoping this won't cause an issue.
Can anyone clarify if this is correct or some variation needed? Also, should I stash the password?
Thanks, James. |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu May 11, 2023 4:42 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Hi James,
You seem to be on the right path.
It is not possible to "stash" the password for JKS, like it can be done with CMS.
The password needs to be provided to the application. eg. MQ Explorer has a Password Store.
Cheers, Glenn. _________________ Glenn |
|
Back to top |
|
 |
hughson |
Posted: Mon May 15, 2023 7:35 pm Post subject: Re: Creating a keystore for a JMS application |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
jamesb wrote: |
runmqckm -certreq -create -db clientapp.jks -pw client_password -label ibmwebspheremqclientapp -dn "long distinguished name" -size 2048 -file clientapp.csr -sig_alg SHA256WithRSA
In this case I don't want the label to be named ibmwebspheremqmyuserid as we have a number of apps running under a tomcat service account all under the same user ID as part of a shared service so I'd prefer them to be named after the app. I'm aware this seems to go against the 'recommendation', but hoping this won't cause an issue. |
The default label recommendation, which only applies to 'C' clients (and their variations) but not to Java clients, can be over-ridden these days with any label you want, so don't feel like you have to use that where it does apply.
For the Java client, if memory serves it will send the first personal certificate it comes across that matches the signer the queue manager suggests it supports, so it it quite hard to tell the Java client to use EXACTLY THAT certificate. Best practice is to have only one personal certificate in the JKS file so that there is no doubt about which one will be used.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 16, 2023 5:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Potentially, if you need to have multiple certs in the store, create an SSLSocketFactory class to pass on to the connection factory, that uses the specific cert you need. Word of advice, reserved for expert java programers...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jamesb |
Posted: Tue Jun 20, 2023 12:22 am Post subject: |
|
|
Novice
Joined: 09 Mar 2008 Posts: 17
|
Thanks to all who responded. Some great tips. No real issues from my side, it went very smoothly and the app teams I work with seem to be pretty clued up too which is bonus.
James. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|