tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Harper" <>
Subject RE: Problem with security?
Date Fri, 10 Jun 2005 14:59:03 GMT
I think you have missed the point that you cannot get user information
unless the user authenticates. You don't want to have a user authenticate
but you want to get user information. These are mutually exclusive tasks.

If the user does not authenticate, you can only get the external IP address
of the requestor. In order to get user information, you must have the user
authenticate. You might have your users sent to a page that gathers the user
ID and then store it in a cookie. You cannot count on the browser sending
user information because the logged in user may and often is not the actual

I don't know how you can call it secure if you don't require a key to open
the door. You may be encrypted in your transfer over SSL but if you don't
have the user log in, you are not secure.

Robert S. Harper
Information Access Technology, Inc.

-----Original Message-----
From: Gagnon, Joseph M (US SSA) [] 
Sent: Friday, June 10, 2005 8:43 AM
To: Tomcat Users List
Subject: RE: Problem with security?

I believe I've covered that all in my original message.  Read further.

-----Original Message-----
From: egan0019 [] 
Sent: Friday, June 10, 2005 10:10 AM
To: Tomcat Users List
Subject: Re: Problem with security?

Look into the ServletRequest interface.  That interface, which is
in HttpServletRequest.  You can call the getRemoteAddr(),
etc. methods.  You receive null in your getRemoteUser because the user
hasn't been 'authenticated' yet.

On 10 Jun 2005, Gagnon, Joseph M  (US SSA) wrote:
> Hello,
> I'm new to JSP development (and to dynamic web development as a whole)
> so please bear with me.  I'm investigating using JSP/Java for a
> at my workplace.  My system (test server, if you will) is a PC running
> Windows XP Pro and I am using Tomcat 5.5.9.
> I have a situation where I want to be able to provide user access to
> application by determining the identity of the requesting user,
> them having to go through a login procedure.  Specifically, what I've
> been trying to do is call the request.getRemoteUser() method to ID the
> requesting user.  When I do so, I keep getting null.  After reading in
> the JSP and Java servlet specifications, I see that this call would
> return null if the user is not authenticated.  Reading further, I get
> the impression that by default, no authentication is needed to access
[Robert Harper] [snip]

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message