I followed the link you provided and I am able to make my remote application successfully invokes my secured EJB using my custom realm. That is a big step forward for me and I am really appreciate all the helps from you and the others on this group. Now I am hitting the next issue on the remote application which is I am unable to create a connection to the ConnectionFactory so I can subscribe to a topic to get data. it fails on factory.createConnection(). Just a note here, InitialContext is fine since my remote application can talk to the secured ejbs as I said above. My active MQ has <security elytron-enable="true" /> . I do lookup the factory with jndi name "ConnectionFactory" ( also tried "java:/ConnectionFactory" ). Not sure why the name is null here since it already login/invokes successfully the secured ejbs.
What do I miss configure here? I am using wildfly 23 final. Open Jdk 13
javax.jms.JMSSecurityException:
AMQ229031: Unable to validate user from /
10.1.71.163:3445.
Username: null; SSL certificate subject DN: unavailable at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:540)
at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:434)
at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:300)
at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:249)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionChannel(ClientSessionFactoryImpl.java:1401)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:705)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:316)
at org.apache.activemq.artemis.jms.client.ActiveMQConnection.authorize(ActiveMQConnection.java:684)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:920)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:299)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:294)