• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using both BASIC and FORM authentication for different sections of same web application

 
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using FORM auth for my web app. However, I need to present a file to Google Earth. GE only accepts BASIC auth. How can I set up my app to do FORM auth for everything and BASIC auth for the GE file? I'm using Tomcat 6.

I tried adding in a second security constraint, but that's not valid. Is there a way to do this?
 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So it's looking like there's not a way to do this other than making another webapp. Is there a good way to share properties, etc between the two?

Or is there a way to keep everything in one app?
 
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bai Shen wrote:So it's looking like there's not a way to do this other than making another webapp. Is there a good way to share properties, etc between the two?


Can you set attributes in the "application" scope (using the setAttribute() method on the Servlet Context object)?
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can you set attributes in the "application" scope (using the setAttribute() method on the Servlet Context object)?

Use this with care; it can interfere with load balancing and clustering mechanisms.
 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ended up just duplicating my database connection code, since that's where I'm storing my properties.

I'm having a problem though, as this setup has increased my number of logons. I'm serving a dynamically generated KML file for use with Google Earth. I currently have my application using FORM auth. This works create for the entire app. However, Google Earth won't recognize it. So I have to use BASIC auth. So I have two web applications.

myApp which servers my application. Then I have kmlApp which serve the two kml files. I use the http request to determine the server port, ip, context, etc and generate a base kml file. That has a refresh link to a kml file which contains my map data.

The problem is that now my user has to log in three times. Once for my web app. Then once for the base kml file as it's hosted on another app. And thirdly from Google Earth as that's a separate request than the one from the browser.

Is there any way to share the session info or anything like that so my users don't have to keep signing in?
reply
    Bookmark Topic Watch Topic
  • New Topic