You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Mehrle <mi...@datasaur.com> on 2004/06/07 22:17:58 UTC

Cross-app security question

I do have a question regarding security across appfuse and other
webapps. Currently, I have two separate web applications running under
Tomcat (5.0.26):

- tdx (which is a version of appfuse)
- jGallery (which dynamically serves images)

The way jGallery works is that it 'crossmaps' image gallery directories
dynamically - it's actually pretty cool. What that means is that if I create
a folder at ../tdx/mygallery and put images in it, then typing in a URL such
as:
http://localhost:8080/jGallery/tdx/mygallery/index.html will autogenerate an
index page and also create the approprate slide pages. So far so good....

The problem is that that all my security settings don't work anymore this
way since the images are being served by jGallery (and I don't want to
manage two different security settings). Also, it's difficult to make the
gallery part of my tiles configuration. I can probably point outside of my
app (haven't tried that) but it gets a bit ugly. The security settings are
the bigger problem however. I'd like to be able to map it somehow that
everything goes through the tdx project security. So, in order to see the
images and the gallery index at the URL above, users would have to log in
(such as in the default appfuse installation).

I was thinking that I could somehow bring jGallery inside tdx, but that
would mean having to merge the two web.xml files as well as tdx.xml and
jGallery.xml inside of ..conf/Catalina/localhost/. I'd rather not do that
and am hoping for some elegant solution that allows me to keep the gallery
generator and my main tdx webapp separate.

Any suggestions?



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


Re: Cross-app security question

Posted by Tim Funk <fu...@joedog.org>.
See the servlet spec. I know for version 2.3 of the spec (which is tomcat4 
stuff) - security is applied only to the incoming URL. (The same went for 
filters too)

For 2.4 - I know that filters can be applied on RequestDispatcher.include and 
  RequestDispatcher.forward. So security constraints might also be applied on 
them too.

In other words (I don't feel like readin it myself right now, so ..)
1) Make sure all the webapps are to the 2.4 servlet spec. (If you see 2.2 or 
2.3 anywhere in web.xml)
2) Read the spec to see if there are additional parameters you can add to 
web.xml


-Tim

Michael Mehrle wrote:

> I do have a question regarding security across appfuse and other
> webapps. Currently, I have two separate web applications running under
> Tomcat (5.0.26):
> 
> - tdx (which is a version of appfuse)
> - jGallery (which dynamically serves images)
> 
> The way jGallery works is that it 'crossmaps' image gallery directories
> dynamically - it's actually pretty cool. What that means is that if I create
> a folder at ../tdx/mygallery and put images in it, then typing in a URL such
> as:
> http://localhost:8080/jGallery/tdx/mygallery/index.html will autogenerate an
> index page and also create the approprate slide pages. So far so good....
> 
> The problem is that that all my security settings don't work anymore this
> way since the images are being served by jGallery (and I don't want to
> manage two different security settings). Also, it's difficult to make the
> gallery part of my tiles configuration. I can probably point outside of my
> app (haven't tried that) but it gets a bit ugly. The security settings are
> the bigger problem however. I'd like to be able to map it somehow that
> everything goes through the tdx project security. So, in order to see the
> images and the gallery index at the URL above, users would have to log in
> (such as in the default appfuse installation).
> 
> I was thinking that I could somehow bring jGallery inside tdx, but that
> would mean having to merge the two web.xml files as well as tdx.xml and
> jGallery.xml inside of ..conf/Catalina/localhost/. I'd rather not do that
> and am hoping for some elegant solution that allows me to keep the gallery
> generator and my main tdx webapp separate.
> 

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