Bugs item #551128, was opened at 2002-05-01 15:05
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=551128&group_id=22866

Category: CatalinaBundle
Group: None
Status: Closed
Resolution: Wont Fix
Priority: 5
Submitted By: Luke Taylor (luke_t)
Assigned to: Scott M Stark (starksm)
Summary: getUserPrincipal returns null

Initial Comment:
With the 2.4.5RC3 Catalina bundle:

If I login (form-based, j_security_check style) in
order to access a protected resource (/restricted/*),
things go OK and I end up authenticated in the current
session - I can call HttpRequest.getUserPrincipal() OK.

However, if I then submit a request to a non-protected
URL (e.g. a test jsp in the context root),
getUserPrincipal() returns null.

I've noticed this in passing before, but haven't
checked it out previously - I suspect it applies to all
the integrated Catalina versions. It doesn't happen
with standalone Catalina or the JBoss/Tomcat_3.2.3 bundle.

----------------------------------------------------------------------

Comment By: Quande Ren (r_q_d)
Date: 2002-10-24 10:06

Message:
Logged In: YES 
user_id=635232

I hope this bug should be re-opened, see discution from 
following link:

http://www.jboss.org/forums/thread.jsp?
forum=49&thread=10118&message=717701



----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2002-05-01 19:45

Message:
Logged In: YES 
user_id=175228

And it also doesn't say that unprotected content should 
return the session principal, let alone that it must. Stand 
alone tomcat will show this behavior if you disable caching 
in the FormAuthenticator:

 <Valve 
className="org.apache.catalina.authenticator.FormAuthenticat
or" debug="3" cache="false"/>


----------------------------------------------------------------------

Comment By: Luke Taylor (luke_t)
Date: 2002-05-01 19:42

Message:
Logged In: YES 
user_id=369802

OK. I checked the spec as well though. It says that
getUserPrincipal will return null if "no user has been
authenticated". It doesn't explicitly state that it can't
return null if there is an authenticated user in the current
session, but it seems counter intuitive to me that it should
do so.

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2002-05-01 19:09

Message:
Logged In: YES 
user_id=175228

Its not defined by the servlet spec that the principal 
information should propagate across the session 
irrespective of permissions. I asked about this behavior on 
the servlet list and that was their reply. Standalone 
tomcat bahaves differently because it caches principals in 
a way that does not work when integrated with JBoss.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=551128&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to