1

Does anyone have an experience or just thoughts about securing MQ TCP communication channels using stunnel?

I am integration with third party S.W which has MQ support built in but it can not support SSL. So to have some kind of security over the TCP we would like to use stunnel. Does any one have any thoughts how to implement and any best practices

2 Answers 2

1

I haven't used stunnel so I'll leave that part of the answer to another responder. With regard to WMQ, keep in mind that this will provide you with data privacy and data integrity over the stunnel link but will not give you channel-level services such as WMQ authentication. True, you will have some level of authentication on the stunnel connection itself, but anyone with a TCP route to the QMgr that does not arrive via stunnel will also be able to start that channel.

Your requirement for security obviously includes data privacy. If it also includes authentication and authorization, you might need to use something like BlockIP2 (from http://mrmq.dk )to filter incoming connections on that channel by IP address to insure they arrive over the stunnel link. Of course, there is nothing to prevent someone at the remote end from specifying any channel name to connect to so if you secure one channel, you need to secure them all - i.e. make sure that SYSTEM.DEF.* and SYSTEM.AUTO.* channels are disabled or that they use SSL and/or an exit to authenticate the inbound connection.

Finally, be aware that if WMQ is configured to accept the ID presented by the client then the connection has full administrative access and that includes remote code execution. To prevent this you must configure all inbound channels (RCVR, RQSTR, CLUSRCVR and SVRCONN) that are not administrative with a low-privileged ID in the channel's MCAUSER. For any channels that are intended for administrators, authenticate these with SSL. (Hopefully your 3rd party SW is an application and not an administrative tool! Any WMQ admin tool must support SSL or else don't use it!)

So by all means use stunnel to secure this link, just be sure to secure the rest of the QMgr or else anyone who can legitimately connect (or even anonymous remote users if you leave MCAUSER blank and aren't using SSL and/or exits) will just bypass the security or disable it.

There's a copy of the IMPACT presentation Hardening WMQ Security at https://t-rob.net/links/ which explains all this in more detail.

0

Rob - I agree with you. For that only we have MQIPT. Which is much better. For STunnel for MQ i have sloved the problem.

Keys -U need a .pem key (From Key manager you can create .p12 and use open ssl to covert to .PEM).

Client Side: Download and install stunnel have followoling entries in the config file

cert = XXX.pem
client = yes
[MQ]
accept  = 1415
connect = DestinationIP:1415

Server Side:

cert = xxx.pem
client = no
[MQ]
accept  = 1415
connect = MQIP:1415

Once you do this all you have do is just call the amquputc with the Queue name.

1
  • This is a old post but you could use MQIPT without stunnel for this purpose. It can be configured to accept a unencrypted MQ connection and send it on encrypted and on the other end accept the encrypted MQ connection and send it on unencrypted. All of T.Rob's comments about securing the receiving queue manager still apply no matter if you use stunnel or MQIPT, so I am unsure about your comment that MQIPT resolves the issues T.Rob pointed out.
    – JoshMc
    Aug 18, 2018 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.