2 Replies Latest reply on Apr 24, 2012 1:30 PM by joe_boy12

    InVM transport and Secured service

    joe_boy12

      Hello There

       

      what I am trying to do is invoke a service from ServiceInvoker.deliverAsynch() method - the service is secured and I am passing the valid AuthenticationRequest along with message in its context. The catch is, the service has only Http Gateway listener and the InVM transport attacted to http listener. Now when I try to invoke this service - my message goes in MessateStore with RDLVR as qualification - stays there for 5-6 mins and then error appears on console saying - and then disappears from MessageStore.

       

      org.jboss.soa.esb.services.security.SecurityServiceException: Service 'blah blah' has been configured for security but no AuthenticationRequest could be located in the Message Context. Cannot authenticate without an AuthenticationRequest.

       

      Now when I unsecure the service and invoke the service with above method - it works fine - even with AuthenticationRequest being in context. Is this normal behavior? is InVM transport incapable of looking at AuthenticationRequest in message context?

       

      Thanks

      Joe

        • 1. Re: InVM transport and Secured service
          sracem

          HI,

           

          Can you please let me know how you passed the AuthentificationRequest with message?

           

          Thaks

          • 2. Re: InVM transport and Secured service
            joe_boy12

            sorry for late reply was out of town...

            this is how you set that on an ESB Message

             

              try {
               AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder().username(user).password(decryptedPassword.toCharArray()).build();
               //  set the authentication request on the message
               message.getContext().setContext(SecurityService.AUTH_REQUEST, PublicCryptoUtil.INSTANCE.encrypt((Serializable) authRequest));
              } catch (Exception e) {
              }

            Joe