6 Replies Latest reply on Feb 13, 2017 11:53 PM by mrudulav

    EJB Client interceptor not called

    claudio4j

      Hi, I want to propagate security credentials from a web application to a EJB. Both are protected by security domain.

      The project is https://github.com/claudio4j/jboss-as-quickstart/tree/ejb_security_propagation/ejb-security-propagation

       

      The EJB ClientInterceptor is registred by a Servlet Listener

       

       

                          EJBClientContext.getCurrent().registerInterceptor(0, new ClientSecurityInterceptor());

       

      The debugger steps in the constructor, but the ClientSecurityInterceptor is not called before a EJB call.

       

      The ejb call

       

       

      Properties props = new Properties();

      props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

      props.put("org.jboss.ejb.client.scoped.context", "true");

      props.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");

      props.put("remote.connections", "default");

      props.put("remote.connection.default.host", "localhost");

      props.put("remote.connection.default.port", "4597");

      props.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");

      props.put("remote.connection.default.username", "ejbcaller");

      props.put("remote.connection.default.password", "@ejbqs123");

      Context ctx = new InitialContext(props);

      Object o = ctx.lookup("ejb:/jboss-as-propagation-ejb/SecuredEJB!org.jboss.as.quickstarts.ejb_security.Secured");

       

      Do you see any issue related to the ClientSecurityInterceptor not being called prior a EJB call ?

       

      Thanks

       

      Claudio