You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peder Larsen <la...@gmail.com> on 2007/04/24 11:12:25 UTC

Restrict access to ip/contextpath (Tomcat 4.x)

Hi,

I've been reading the docs and found some info about the use of Remote
Address Filter.

However, my findings is that it only supports restricting access to a whole
webapp to given IP addresses.

So i wonder if it is possible to restrict access to not only IP addresses,
but also to certain paths within a webapp.

Example,
If i have a webapp, /thewebapp, and i want to restrict the access to
/thewebapp/admins/ area to certain IPs (only allow subnet in my case), is
that possible?

Thanks,
Peder

Re: Restrict access to ip/contextpath (Tomcat 4.x)

Posted by Mark Thomas <ma...@apache.org>.
Peder Larsen wrote:
>> If you can provide the functionality is to separate contexts then you
>> can you the built-in Tomcat features.
> 
> What do you mean? Nesting contexts?
Yes.

> Do you have/know of a simple example for this?
No.

For the nested context, the war needs to be outside your hosts
appBase. See
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html for how to
define nested contexts.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Restrict access to ip/contextpath (Tomcat 4.x)

Posted by Peder Larsen <la...@gmail.com>.
>If you can provide the functionality is to separate contexts then you
>can you the built-in Tomcat features.

What do you mean? Nesting contexts? Do you have/know of a simple example for
this?

Peder


Peder Larsen wrote:
> > So i wonder if it is possible to restrict access to not only IP
> addresses,
> > but also to certain paths within a webapp.
> Tomcat does not provide this functionality. You would have to write
> your own custom code.
>
> > If i have a webapp, /thewebapp, and i want to restrict the access to
> > /thewebapp/admins/ area to certain IPs (only allow subnet in my case),
> is
> > that possible?
> If you can provide the functionality is to separate contexts then you
> can you the built-in Tomcat features.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Restrict access to ip/contextpath (Tomcat 4.x)

Posted by Mark Thomas <ma...@apache.org>.
Peder Larsen wrote:
> So i wonder if it is possible to restrict access to not only IP addresses,
> but also to certain paths within a webapp.
Tomcat does not provide this functionality. You would have to write
your own custom code.

> If i have a webapp, /thewebapp, and i want to restrict the access to
> /thewebapp/admins/ area to certain IPs (only allow subnet in my case), is
> that possible?
If you can provide the functionality is to separate contexts then you
can you the built-in Tomcat features.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org