2 Replies Latest reply on Sep 18, 2007 9:03 AM by Tim Fox

    1.4.0.CR2 - Temporary Destinations - Cluster

    Aslak Knutsen Master

      When creating a Temporary destination on a clustered PostOffice,
      the temp destination itself is clustered but..

      Both nodes in the cluster fail adding a MessageSucker to the temp destination due to a SecurityException.

      The node that received the message continues processing it like nothing happened.

      1.
      Shouldn't the MessageSucker inherit the connections credentials,
      or bypass normal security all together being an internal service?

      2.
      Shouldn't this fail back to the client,
      notifying him that we have failed to guaranty his response?

      -aslak-

      09:19:47,094 ERROR [ClusterConnectionManager] Failed to process notification
      javax.jms.JMSSecurityException: User: null is not authorized to read from destination f-3v0q2g6f-1-7izp2g6f-jo1e7e-273333a
       at org.jboss.jms.server.container.SecurityAspect.check(SecurityAspect.java:312)
       at org.jboss.jms.server.container.SecurityAspect.handleCreateConsumerDelegate(SecurityAspect.java:112)
       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:597)
       at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
       at org.jboss.jms.server.endpoint.advised.SessionAdvised$createConsumerDelegate_8721389917985689973.invokeNext(SessionAdvised$createConsumerDelegate_8721389917985689973.java)
       at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
       at org.jboss.jms.server.endpoint.advised.SessionAdvised$createConsumerDelegate_8721389917985689973.invokeNext(SessionAdvised$createConsumerDelegate_8721389917985689973.java)
       at org.jboss.jms.server.endpoint.advised.SessionAdvised.createConsumerDelegate(SessionAdvised.java)
       at org.jboss.jms.wireformat.SessionCreateConsumerDelegateRequest.serverInvoke(SessionCreateConsumerDelegateRequest.java:100)
       at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:144)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
       at org.jboss.remoting.Client.invoke(Client.java:1634)
       at org.jboss.remoting.Client.invoke(Client.java:548)
       at org.jboss.remoting.Client.invoke(Client.java:536)
       at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:186)
       at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:157)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.org$jboss$jms$client$delegate$ClientSessionDelegate$createConsumerDelegate$aop(ClientSessionDelegate.java:231)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$createConsumerDelegate_8721389917985689973.invokeNext(ClientSessionDelegate$createConsumerDelegate_8721389917985689973.java)
       at org.jboss.jms.client.container.StateCreationAspect.handleCreateConsumerDelegate(StateCreationAspect.java:148)
       at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect67.invoke(StateCreationAspect67.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$createConsumerDelegate_8721389917985689973.invokeNext(ClientSessionDelegate$createConsumerDelegate_8721389917985689973.java)
       at org.jboss.jms.client.container.ConsumerAspect.handleCreateConsumerDelegate(ConsumerAspect.java:68)
       at org.jboss.aop.advice.org.jboss.jms.client.container.ConsumerAspect66.invoke(ConsumerAspect66.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$createConsumerDelegate_8721389917985689973.invokeNext(ClientSessionDelegate$createConsumerDelegate_8721389917985689973.java)
       at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:91)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$createConsumerDelegate_8721389917985689973.invokeNext(ClientSessionDelegate$createConsumerDelegate_8721389917985689973.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$createConsumerDelegate_8721389917985689973.invokeNext(ClientSessionDelegate$createConsumerDelegate_8721389917985689973.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.createConsumerDelegate(ClientSessionDelegate.java)
       at org.jboss.messaging.core.impl.clusterconnection.MessageSucker.start(MessageSucker.java:154)
       at org.jboss.messaging.core.impl.clusterconnection.ClusterConnectionManager.createSucker(ClusterConnectionManager.java:471)
       at org.jboss.messaging.core.impl.clusterconnection.ClusterConnectionManager.notify(ClusterConnectionManager.java:329)
       at org.jboss.messaging.core.impl.DefaultClusterNotifier.sendNotification(DefaultClusterNotifier.java:72)
       at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.addBindingInMemory(MessagingPostOffice.java:2366)
       at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.internalAddBinding(MessagingPostOffice.java:1790)
       at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.addBindingFromCluster(MessagingPostOffice.java:995)
       at org.jboss.messaging.core.impl.postoffice.BindRequest.execute(BindRequest.java:55)
       at org.jboss.messaging.core.impl.postoffice.GroupMember$ControlRequestHandler.handle(GroupMember.java:620)
       at org.jgroups.blocks.MessageDispatcher.handle(MessageDispatcher.java:610)
       at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:654)
       at org.jgroups.blocks.RequestCorrelator.access$200(RequestCorrelator.java:40)
       at org.jgroups.blocks.RequestCorrelator$Request.run(RequestCorrelator.java:944)
       at org.jgroups.util.ReusableThread.run(ReusableThread.java:234)
       at java.lang.Thread.run(Thread.java:619)
      



        • 2. Re: 1.4.0.CR2 - Temporary Destinations - Cluster
          Tim Fox Master

           

          "aslak" wrote:
          When creating a Temporary destination on a clustered PostOffice,
          the temp destination itself is clustered but..

          Both nodes in the cluster fail adding a MessageSucker to the temp destination due to a SecurityException.

          The node that received the message continues processing it like nothing happened.

          1.
          Shouldn't the MessageSucker inherit the connections credentials,
          or bypass normal security all together being an internal service?



          Bypassing normal security isn't really an option since this would allow an exploit to be done.

          E.g. if we have a "createConnectionOverridingSecurity" command that's only used by message suckers, then someone could spoof the sucker and send the correct bytes down the wire corresponding to that command and get read access to any queue.

          What I'm thinking of doing is having a built in user called "sucker" (or whatever) which the message sucker uses to make connections.

          The sysadmin can then change the password of sucker in order to secure the system.