5 Replies Latest reply on Dec 6, 2004 2:13 AM by Alexander

    Client side security interceptor

    Alexander Newbie


      I know that it is possible to configure the client side application interceptors in the jboss.xml (for example) file of the server side component. This configuration is based on the invoker type. But it means, that every client application is to use the same interceptor.

      Is there any way to configure a stack of client side interceptors (I need to substitute the client side security interceptors for swing based applications) in a different way for the same server side application/invoker.

      For example, I have two swing applications, which should use different client security interceptors, but connect to the same server side application. How can I configure client interceptors for these different client applications?

      In other words (in general) I need something like client side container, which I can configure for the particular host/application in a different way.

      How can I achieve it?


        • 1. Re: Client side security interceptor
          Scott Stark Master

          Write a client interceptor that when deserialized on the client it introduces additional application specific interceptors based on some local configuration file.

          • 2. Re: Client side security interceptor
            Alexander Newbie

            Thank you. This workaround looks interesting. And acceptable for swing client application. But, I think, the extensibility of this solution looks poor.

            Does JBoss have any plans/ideas to develop client container?


            • 3. Re: Client side security interceptor
              Scott Stark Master

              There already is a client container in every proxy so all that is needed is an extension to the proxy factory to expose this via an additional interface on the proxy. More generally, JBossAOP already supports this and much more.

              • 4. Re: Client side security interceptor
                Scott Stark Master

                The 4.0.1 and 3.2.7 releases will include an extension to expose the existing client container via the following IClientContainer interface:

                package org.jboss.proxy;
                import java.util.ArrayList;
                import org.jboss.invocation.InvocationContext;
                /** An interface implemented by the ClientContainer to provide access to
                 * the client proxy interceptors and InvocationContext.
                 * @author Scott.Stark@jboss.org
                 * @version $Revision: 1.2 $
                public interface IClientContainer
                 * Access a copy of the proxy container interceptor stack.
                 * @return ArrayList<org.jboss.proxy.Interceptor>
                 public ArrayList getInterceptors();
                 * Set the proxy container interceptor stack.
                 * @param interceptors - ArrayList<org.jboss.proxy.Interceptor> to
                 * install as the new interceptor stack
                 public void setInterceptors(ArrayList interceptors);
                 * Access the InvocationContext associated with the proxy by the
                 * server side proxy factory. The contents of this will depend on
                 * the proxy factory.
                 * @return The proxy creation time InvocationContext
                 public InvocationContext getInvocationContext();

                Any proxy created by the detached invoker framework will be an instance of IClientContainer so that the proxy can be manipulated in the client. See the testsuite org.jboss.test.invokers.test.MultiInvokersUnitTestCase for an example. The testsuite is part of the source download.

                • 5. 3837679
                  Alexander Newbie

                  Thank you. I'll try to use it.