Bugs item #1034202, was opened at 2004-09-24 17:10
Message generated for change (Comment added) made by kenyee
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1034202&group_id=22866

Category: JBossSX
Group: v4.0
Status: Closed
Resolution: Works For Me
Priority: 5
Submitted By: Ken Yee (kenyee)
Assigned to: Scott M Stark (starksm)
Summary: getActiveSubject returns null in secure directory

Initial Comment:
This seems to be a new bug in JBoss 4.0.0.  It wasn't
there in 4.0.0RC2 or 4.0.0RC3 :-(

Here's a quick code snippet done inside a servlet filter:
        org.jboss.security.SubjectSecurityManager mgr = null;
        try {
                InitialContext iniCtx = new InitialContext();
                subject = null;
                mgr = (SubjectSecurityManager) iniCtx
                                                
.lookup("java:comp/env/security/securityMgr");
                if (mgr != null) {
                        subject = mgr.getActiveSubject();
                }
                if (subject == null) {
                        System.out.println("JBoss bug: Couldn't get Active
subject from Security Manager!");
                }
        } catch (NamingException e) {
                System.out.println("Could not get security manager!", e);
        }


getRemoteUser is non-null, so there should be a valid
current subject.

 ken


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

>Comment By: Ken Yee (kenyee)
Date: 2004-09-28 15:25

Message:
Logged In: YES 
user_id=189996

Sorry.  I should have broken it down to an example first.  I
now have an example tiny web app that proves it does work
fine unless I use my custom authenticator that subclasses
FormAuthenticator.  I'll try and break it down more and
isolate the problem w/ another example before reopening...


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

Comment By: Scott M Stark (starksm)
Date: 2004-09-26 06:03

Message:
Logged In: YES 
user_id=175228

Reopen with an example as I have added a unit test that
validates that a filter mapped to secured content sees a
non-null subject via both the SubjectSecurityManager and jndi.

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

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


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to