Bug 44084 - JAASRealm useContextClassLoader has problems
JAASRealm useContextClassLoader has problems
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Catalina
5.5.25
Other other
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
: 43392 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-12-15 14:27 UTC by Noah Levitt
Modified: 2008-01-06 15:19 UTC (History)
2 users (show)



Attachments
patch to fix useContextClassLoader for JAASRealm (4.00 KB, patch)
2007-12-15 14:28 UTC, Noah Levitt
Details | Diff
better patch (3.02 KB, patch)
2007-12-15 14:34 UTC, Noah Levitt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noah Levitt 2007-12-15 14:27:25 UTC
The useContextClassLoader config option doesn't work right. 

- it is ignored when setting userClassNames and roleClassNames 
- it's respected when the LoginContext is created, but that is insufficient,
because all the needed classes are not necessarily loaded until
loginContext.login() is called

Patch to follow. With it I'm able to keep everything related to the JAASRealm in
my webapp.
Comment 1 Noah Levitt 2007-12-15 14:28:19 UTC
Created attachment 21278 [details]
patch to fix useContextClassLoader for JAASRealm
Comment 2 Noah Levitt 2007-12-15 14:34:57 UTC
Created attachment 21279 [details]
better patch

Made a mistake about the second thing. Actually the only problem with the
LoginContext stuff is that the logic was backwards. This patch is better.
Comment 3 Ate Douma 2007-12-18 02:42:51 UTC
AFAIK this issue was caused by the patch applied for bug 40150.
I reopened it because it really is a show stopper for us and blocks deploying
our Jetspeed portal on Tomcat 5.5.25, and also on Tomcat 6 likewise.
I think your patch can and need also be back ported to Tomcat 5.5
Comment 4 David 2007-12-20 19:22:10 UTC
*** Bug 43392 has been marked as a duplicate of this bug. ***
Comment 5 Mark Thomas 2007-12-23 13:58:21 UTC
Fixed in trunk and proposed for the next releases of 5.5.x and 6.0.x
Comment 6 Yoav Shapira 2007-12-27 14:28:19 UTC
(In reply to comment #5)
> Fixed in trunk and proposed for the next releases of 5.5.x and 6.0.x

The proposal now has enough votes, so this issue will be fixed in Tomcat 6.0.15.
Comment 7 Mark Thomas 2007-12-28 13:32:37 UTC
This has been fixed in svn and will be included in 6.0.16 onwards.
Comment 8 Mark Thomas 2008-01-06 15:19:28 UTC
Fixed in 5.5.x and will be included in 5.5.26 onwards.