Host foo is an IBM MQ client (i.e. client mode connection over TCP/IP). Host bar is the system on which the queue manager is running. Bar grants permission (by IP address) for foo to instantiate a com.ibm.mq.MQQueueManager object but does not grant permission to host foobar.
Therefore, I am encapsulating all of the IBM MQ contact into a new app running on foo. Together with foobar, a client/server app is forming, using sockets, where foo is the server and foobar is the client. Foo is still the IBM MQ client, as before.
So far, all I’ve tried to do on foo in the new app (MQ-related) is to instantiate an MQQueueManager object. That’s successful, until I introduce java.lang.SecurityManager.
Local applications executed via the java command, such as this one on foo, are by default not run with a SecurityManager installed. Now it is run with a SecurityManager installed. The reason is to control access to this app running on foo. The security policy accepts connections from foobar (java.net.SocketPermission). This works. The owner of foo can now control the permission granted to foobar.
But we’re getting some interference in the interaction between foo and bar. The interference is coming from the SecurityManager. Don’t run with a SecurityManager installed and foo can instantiate MQQueueManager. Run with a SecurityManager and foo hangs in the MQQueueManager constructor.
Foo is using the Policy reference implementation described in https://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html
The following permission on foo results in the MQQueueManager constructor hanging.
permission java.net.SocketPermission "bar", "connect, accept";
-Dcom.ibm.msg.client.commonservices.trace.status=ON
-Djava.security.debug="access,failure"
... access denied ("java.util.PropertyPermission" "mqs.disable.all.intercept" "read") [java.security.AccessControlException] ...
... access denied ("java.util.PropertyPermission" "mqs.intercept.serializeconn" "read") [java.security.AccessControlException] ...