1 Reply Latest reply on Jul 23, 2005 4:00 PM by Michael Caughey

    Security issue with Topic created at runtime

    Michael Caughey Newbie

      I changed how I am creating my topics at runtime. see listing below. Now when I log in with a user and an incorrect password, I get the error that that user was nt authenticated. If I use the correct password i get the following:

      javax.jms.JMSSecurityException: Connection not authorized to subscribe to destination: topic/table1
       at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:141)
       at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:816)
       at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:297)
       at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:166)
       at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
       at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
       at java.lang.Thread.run(Thread.java:595)

      So obvioulsy it is using my security manager. I've tried giving the user guest, durpublisher and publisher. I really want durpublisher.

      Here's my topic creation code:

       serverName = InetAddress.getLocalHost().getHostName();
       RMIAdaptor server = (RMIAdaptor) ctx
       ObjectName dm = new ObjectName(
       server.invoke(dm, "createTopic", new Object[] { topicJndiName,
       topicJndiName }, new String[] { String.class.getName(),
       String.class.getName() });

      How do i get the security right? I've now trie two different ways to create topics, the other is listed in a previous posting here. I had the same authentication problems. Can someone please help me out. I'm in a real JAM. I need this to work and I suspect it is supposed to work. What have I done wrong?