This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Allowing the internal users and authenticating the external users.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a web application running on Tomcat ( version 5 ). My requirement is that I need to allow internal users without any authentication and need to authenticate the external users. We know the IP Address range for internal users ( say something like 152.186.192.* ).

I tried using the Valve -- RemoteAddrValve and Memory Realm together, but then I don't get the intended functionality.

Is there a way in which I can achieve this requirement of allowing internal users and forcing the external users to enter username and password.
 
Ganesh Subrahmanya
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anybody suggest me a solution for this ?

Well!, as I said, I need to allow internal users ( I know the IP address range like 152.168.192.* for internal users ) and force the external users to login.

Does writing a custom Valve help me in this case ?

Can somebody help me with this ???
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure how to use valves to do this, but HttpServletRequest.getRemoteAddr() gives you the IP address, so for outsiders you can do something like:



which will cause the client to be challenged for authentication.
 
reply
    Bookmark Topic Watch Topic
  • New Topic