Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 41794 invoked from network); 25 Jun 2003 05:43:07 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 25 Jun 2003 05:43:07 -0000 Received: (qmail 1971 invoked by uid 97); 25 Jun 2003 05:45:39 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 1963 invoked from network); 25 Jun 2003 05:45:38 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 25 Jun 2003 05:45:38 -0000 Received: (qmail 40270 invoked by uid 500); 25 Jun 2003 05:42:52 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 40245 invoked from network); 25 Jun 2003 05:42:52 -0000 Received: from main.gmane.org (80.91.224.249) by daedalus.apache.org with SMTP; 25 Jun 2003 05:42:52 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19V30c-0004wF-00 for ; Wed, 25 Jun 2003 07:39:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: tomcat-user@jakarta.apache.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19V30V-0004vt-00 for ; Wed, 25 Jun 2003 07:39:47 +0200 From: "Bill Barker" Subject: Re: IP based access control Date: Tue, 24 Jun 2003 22:49:49 -0700 Lines: 66 Message-ID: References: <380E8F36D3E4D5119F9B0002A5CE8F6A041B68B6@il-tlv-mail6.comverse.com> X-Complaints-To: usenet@main.gmane.org X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Slight oversight on the return value on the good case. "Bill Barker" 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" 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