1 Reply Latest reply on Oct 21, 2002 10:52 AM by Jakob Dalsgaard

    unauthenticated managed connection factory

    Jakob Dalsgaard Newbie

      Hi JBossers

      I'm running Jboss 3.0.3 + JDK 1.4.0_01 on RedHat 7.3 and I've got some troubles using a managed connection factory (maybe it's just me that has misunderstood some really basic stuff).

      I wan't JBoss to manage my connection factory so I don't have to start my connections myself - but I do not wan't to authenticate in my "createTopicSession" call - is that at all possible?

      In my jbossmq-service.xml I've removed the SecurityIntercepter but I still get authentication exceptions on createTopicSession. My ear is being authenticated againg my own security domain (called "SecureAwareUsersRealm") - and when trying to create my TopicSession I get:

      2002-10-21 11:21:57,855 ERROR [STDERR] java.lang.SecurityException: Invalid authentication attempt, principal=su
      2002-10-21 11:21:57,875 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:707)
      2002-10-21 11:21:57,877 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:531)
      2002-10-21 11:21:57,878 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
      2002-10-21 11:21:57,879 ERROR [STDERR] at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createTopicSession(JmsSessionFactoryImpl.java:159)
      2002-10-21 11:21:57,880 ERROR [STDERR] at com.neupart.sa.util.PublishCacheInfo.publishTextMessage(PublishCacheInfo.java:80)

      It seems somehow to authenticate my createTopicSession call against some domain (even though the SecurityInterceptor is not active -- [is the SecurityInterceptor only for the actual sending of messages or does it also apply to this method call?]).

      I've added a SecurityConf element to the specifiation of my Topic where I've added both the guest role, and the role "Administrator" (the single role that my "su" user holds in my own security domain) - without any luck.

      I would appreciate if someone could help me on one or more of the following:

      1) create unauthenticated managed connectionfactories to use from an ear that is running under some security domain.
      2) direct me to some information about what security domains are used for what services (the "jbossmq" security realm seems hardcoded in the source) - and to what the SecurityInterceptor applies.
      3) Tell me that it can't be done and that I have to authenticate at least as "guest/guest" when creating my TopicSession.

      regards Jakob

        • 1. Re: unauthenticated managed connection factory
          Jakob Dalsgaard Newbie

          Hi again

          Found out that in "jms-service.xml" a security domain is specified. I am now using the JmsXARealm as is specified in stock JBoss 3.0.3 - but now my problem is that when I publish information I get the following error:

          16:01:41,487 WARN [LocalTxConnectionManager$LocalConnectionEventListener] prepare called on a local tx. You are not getting the semantics you expect!

          Which I find hard to interpret. My sessions (subscribing and publishing are created using) :

          session = topicconnection.createTopicSession (true, Session.AUTO_ACKNOWLEDGE);

          Isn't that OK?

          regards Jakob