I have used MC4J successfully to connect to JBoss 3.2.5 without any security turned on. It is great! I need to secure the MBean server so I specified a security interceptor for my Jboss RMI invoker. When I attempt to connect to JBoss and get an error that my principal is null even though I set it in the properties for the connection! It seems as though MC4J is not passing security credentials to JBoss. Has anyone else been successful in securing the RMI adapter for JBoss and connecting with MC4J? Any help would be appreciated. Thanks.
Below is part of the stack trace from MC4J.
<code>
Caused by: java.lang.RuntimeException: java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=esm-wsgw
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:203)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:58)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:55)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy8.queryNames(Unknown Source)
at org.jboss.jmx.connector.rmi.RMIConnectorImpl.queryNames(RMIConnectorImpl.java:304)
[catch] ... 24 more
</code>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am having the same problem with JBoss 4.0.3SP1 and 1.2b9, so this is still broken. I posted a note over on the JBoss wiki and a bug to this project, hopefully someone, somewhere, has a fix. For development, I can disable security on the jmx-invoker, but that's not acceptable for production.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have used MC4J successfully to connect to JBoss 3.2.5 without any security turned on. It is great! I need to secure the MBean server so I specified a security interceptor for my Jboss RMI invoker. When I attempt to connect to JBoss and get an error that my principal is null even though I set it in the properties for the connection! It seems as though MC4J is not passing security credentials to JBoss. Has anyone else been successful in securing the RMI adapter for JBoss and connecting with MC4J? Any help would be appreciated. Thanks.
Below is part of the stack trace from MC4J.
<code>
Caused by: java.lang.RuntimeException: java.lang.SecurityException: Failed to authenticate principal=null, securityDomain=esm-wsgw
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:203)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:58)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:55)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy8.queryNames(Unknown Source)
at org.jboss.jmx.connector.rmi.RMIConnectorImpl.queryNames(RMIConnectorImpl.java:304)
[catch] ... 24 more
</code>
I am having the same problem with JBoss 4.0.3SP1 and 1.2b9, so this is still broken. I posted a note over on the JBoss wiki and a bug to this project, hopefully someone, somewhere, has a fix. For development, I can disable security on the jmx-invoker, but that's not acceptable for production.