• 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

Restricting Access to Home Page but allowing access to everything else under it

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to create restrictions as follows in Tomcat:

Restrict this page..... http://example.com:7070/abc

But still give access to all to urls such as http://example.com:7070/abc/personId=ioiedqw990,Password=mypasswd

or anything else falling under http://example.com:7070/abc

 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You place user IDs and passwords as plain text right out in the URLS? Wow! I'm going to totally own your application!

I thought 7070 was the port that WebLogic liked. This is the Tomcat forum.

Regardless, a URL in the form "http://example.com:7070/abc" would be routed to the welcome page of the webapp deployed under the context name of "abc". You could just code up a straight HTML page that says "Access forbidden", configure it as the welcome page in the WEB-INF/web.xml file and be done with it.
 
Hamak Waddle
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my login page http://example.com:7070/abc (though it actually uses 8080) but I didn't want people to login except a few admins. And the urls must not be restricted. Problem is I have been having login attempts which the boss doesn't like and so he didnt want anybody else accessing this page but the admins.
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is information missing here. The only way that "/abc" can be a "login page" is if you deployed the webapp at the root context and have mapped a servlet to the URL "/abc".

Of course, it also implies that you are using a user-designed "insecurity" system. I call it that, because I've worked with webapps in many environments for many years and have never yet seen a user-designed system that was actually secure.

The only real way you can block access to a login is to do something like filter out attempts from unauthorized client IP addresses. Until you log in, the app will have no way of knowing who the user is, and therefore no way of knowing whether the user is permitted to log in. The prescience module for Tomcat is currently broken.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic