[EMAIL PROTECTED] wrote:
> 
> As Tomcat 3.2.2 is current productional release, it would be good to have an updated 
>version of the security description of JOnAS, because the information
> there is for Tomcat 3.1.1 and is not working with 3.2.2.
> 
> If someone made JOnAS 2.3 working with Tomcat 3.2.2, can you give me instructions 
>how to do this, please?
> 
> thank you
> Markus

Hi Markus,
In the current version of JOnAS we have already made the changes.
We provided now the Security interceptor for Tomcat 3.2
(org.objectweb.security.tomcat.interceptor.SecurityCtxInterceptor32)
It is already committed in CVS (no tag), the corresponding class
will be in the jonas.jar in the net binary version.
In the previous JOnAS version(2.3) the webserver.jar of Tomcat 3.1 was
included in the jonas.jar
there will be no Tomcat .jar file anymore in the next jonas.jar file.





the new interceptor  looks like:

package org.objectweb.security.tomcat.interceptor ;

import org.apache.tomcat.request.SimpleRealm;
import org.apache.tomcat.core.Request ;
import org.apache.tomcat.core.Response ;

import org.enhydra.security.avs.api.SecurityCurrent ;
import org.enhydra.security.avs.api.SecurityContext ;

import java.security.Principal ;

public class SecurityCtxInterceptor32 extends  SimpleRealm {

    public SecurityCtxInterceptor32 () {
        super () ;
    }

     public int authorize( Request req, Response response, String
roles[] ) {
        int result = super.authorize (req, response, roles) ;
        if (result == 0) {
            Principal principal = req.getUserPrincipal() ;
            SecurityContext ctx = new SecurityContext (principal.getName()) ;
            SecurityCurrent current = SecurityCurrent.getCurrent () ;
            current.setSecurityContext(ctx) ;
        }
        return result ;
    }
}

In order to use the new interceptor you will have to modify the
$TOMCAT_HOME/conf/server.xml file
Add :   
<RequestInterceptor 

className="org.objectweb.security.tomcat.interceptor.SecurityCtxInterceptor32"
/>
after 
<RequestInterceptor 
            className="org.apache.tomcat.request.SimpleRealm" 
/>


Just a detail we have tested with Tomcat 3.2.1 and not with Tomcat 3.2.2

Best regards

-- 
        Philippe

Philippe Coq  Evidian   Phone: (33) 04 76 29 78 49
Bull S.A  - 1 rue de Provence - 38432 Echirolles Cedex France
Download our EJBServer at http://www.objectweb.org
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to