How to Access Subject after JAAS LoginModule?

O

ohaya

Hi,

I am implementing a JAAS LoginModule in a Tomcat environment, and have
almost everything working. The problem that I am having is that I
cannot access the Subject from within servlets and JSPs. I have tried
the following:

<% Subject subject = Subject.getSubject(AccessController.getContext());
%>
<b>Subject</b> = <%= subject %>

and am getting "null" for the Subject. Another fellow on the Tomcat
mailing list is having the same problem, and he has tried:

AccessControlContext context = AccessController.getContext();
Subject subject = Subject.getSubject(context);

but is also getting null for the Subject.

Does anyone know how I can get access to the Subject from within either
a servlet or JSP in this case?

Thanks,
Jim
 
O

ohaya

Hi,

I just realized that there's a comp.lang.java.security NG, that's
probably more appropriate for this post. I'll be posting an inquiry
there. Sorry.

Jim
 
Joined
Sep 2, 2010
Messages
1
Reaction score
0
JAAS configure with tomcat

HI JIM,

I am new for jaas implementation. I want to implement jass login module for my webapplication with tomcat, but i dont know how to do? can you provide me some jaas login example for tomcat or process to configure, so that i can work according to that example.

Thanks,
Arun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top