On 17 Okt, Scott M Stark wrote:
> ----- Original Message -----
[..]
>> 2. It would be good to be able to get at the autenticated Subject in the
>>    webparts. I have tried request.getAttribute("j_subject") but only get
>>    null back. The only way to retrive it was to go against the security
>>    JNDI directly.
>>
>> (           Context securityCtx=(Context)iniCtx.
>>                 lookup("java:comp/env/security");
>>     EJBSecurityManager securityMgr = (EJBSecurityManager)
> securityCtx.lookup("securityMgr");
>>     SubjectSecurityManager subjectMgr = (SubjectSecurityManager)
> securityMgr;
>>     subject = subjectMgr.getActiveSubject();
>>     )
>>
>>    It would be nice to be able to specify that you want access to the
>>    subject in the session, perhaps as an attribute on
>>    JBossSecurityMgrRealm.
>>
> The actvie subject is available through JNDI:
>            Subject activeSubject = (Subject)
> ctx.lookup("java:comp/env/security/subject");
> 
> for both ejb and web components.

Hi, I can't get that to work. Getting the security manager works fine
but going for the subject throws a NamingException:

[Default] javax.naming.NameNotFoundException: subject not bound
[Default]       at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
[Default] 
[Default]       at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
[Default] 
[Default]       at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
[...]

Im am testing it with the 2.4.3-Tomcat release with your jaas example
stuff as the setup.

//Peter


-- 
Jobba hos oss: http://www.tim.se/weblab
------------------------------------------------------------
Peter Antman             Technology in Media, Box 34105 100 26 Stockholm
Systems Architect        WWW: http://www.tim.se
Email: [EMAIL PROTECTED]        WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 
------------------------------------------------------------


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to