Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 10th, 2003, 12:25 PM
mmorasch mmorasch is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 6 mmorasch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
JSP/Servlet Authorization

Here is my situation...

I have developed working authentication process for my webapp. The user must enter their database username and password the first time they log onto the system. This information is then stored in a cookie so they should never have to enter it again.

My boss now says that he never wants to make the user 'log in' to the webapp. I was wondering if there was a way I could get the username that the client uses for their NT computer (that is the same as their database username on our system)?

I know how to do all of this using a regular java application but not using a Webapp. The only thing that I can think of is having a small java app run at startup and modify/create the cookie on the clients machine w/ the necessary information. Is there a better way?

Reply With Quote
  #2  
Old April 10th, 2003, 01:13 PM
Nemi Nemi is offline
Clueless llama
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2001
Location: Lincoln, NE. USA
Posts: 2,353 Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Days 12 h 35 m 19 sec
Reputation Power: 111
He wants a browser based app that is available on the internet but does not want to bother with logging in? Typical. If the web server is accessible from the internet, you obviously need to have some sort of protection. If the web app is only available on an intranet, then you might be able to forgo any protection.

Your idea of modifying the cookie on startup is doable. You will still have protection and the availability of users "on the road" to be able to use the app, but they will be prompted (which is not much of a hardship) when accessing from an 'open' computer.

Incidentally, persistent cookies are generally not considered a 'safe' way of protecting a web site. All any user has to do to gain access unlawfully is to copy the cookie and place it on another computer somewhere.

A web app by it's very definition is accessible to the world. If you want global access, but don't want the whole world to be in your stuff, the accepted practice is to have the user log in when they initally enter. It is a necessary evil. However, it is not uncommon for non-technical people to not understand this and want it to work like their 'old' system.

As far as I know you can't have it both ways. If you want global accessibility, you must log in. If you want to restrict access to only at work, then you can forgo logging in (in some cases).


EDIT: I reread your post. If all you want is the users name and don't need their password, you can get this from the system using System.getProperty("user.name"). However, you must make the applet a signed applet or you will get a security exception.

Last edited by Nemi : April 10th, 2003 at 01:19 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > JSP/Servlet Authorization


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT