tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: IP based access control
Date Wed, 25 Jun 2003 05:49:49 GMT
Slight oversight on the return value on the good case.

"Bill Barker" <wbarker@wilshire.com> wrote in message
news:bdba72$ctm$1@main.gmane.org...
> Not out of the box.  However it's an easy enough plug-in to write.
> Something like:
>
> import org.apache.tomcat.core.*;
>
> public class MyIPAccessController extends BaseInterceptor {
>
>    MyIPAccessController() {
>        // Possible init stuff
>    }
>
>    public int requestMap(Request request) {
>        if(! validate(request) ) {
>             return 403;
>        }
          return 0;
>    }
>
>    private boolean validate(Request request) {
>       // You're validation code here.
>       // At this point, the request is already mapped, so you have all the
> info you need
>       // from the Request methods (e.g Context, servletPath, PathInfo).
>   }
> }
>
> Other methods you might want to implement include:
>
>    public void engineStart(ContextManager cm) throws TomcatException {
>       // Another possible init point.
>       // Ignore this one if you don't require engine state info.
>    }
>
>    public void engineStop(ContextManager cm) throws TomcatException {
>       // Global cleanups.  Ignore it if you don't need it.
>    }
>
>    public void contextInit(ContextManager cm, Context ctx) throws
> TomcatException{
>      // Place for per-context info.  Ignore if not required.
>    }
>
>
>
> "Elkin Koren" <Koren.Elkin@comverse.com> wrote in message
> news:380E8F36D3E4D5119F9B0002A5CE8F6A041B68B6@il-tlv-mail6.comverse.com...
> > Hi,
> > Is it possible to configure in Tomcat 3.3.1 access control list: white
and
> > black lists?
> > (My purpose is to configure white list - list of ip's Tomcat will
receive
> > HTTP from. Packets which come from any other ip should be rejected.)
> >
> > Thanks in advance,
> > Koren
> >
> >
> >
> >




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message