[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Integration of JAAS Login Module for use with Form Based Authentication in Websphere 6.0

Asked by bequeada in IBM Websphere Application Server

Tags: jaas, websphere, login, form

I am trying to figure out how to integrate a custom JAAS Login Module into Websphere for use with Form Based Authentication.  I am new to Websphere but have extensive experience with other Application Servers and the J2EE platform in general.  So this problem has me pretty frustrated.  

Maybe my expectations are off, but I am anticipating that I should be able to register my custom login module in such a way that when a user enters their credentials at the login page the authentication is handled by my login module instead of the default websphere user registry.  Note that in my web.xml file I am using FORM based authentication.

Before I describe my situation in detail I'll ask the questions that I think will get me a working solution.
How do you register a JAAS login module so that it will be called during the processing of the j_security_check servlet?

Background thusfar:
o  Global Security is Enabled
o  A JAAS Application Login Configuration called myrealm has been created and associated with my login module class (called TestJaasModule)
o  In the JAAS System Login Configuration I have inserted TestJaasModule into WEB_INBOUND and RMI_INBOUND in the first ordered spots.
o  I've gotten FORM based authentication to work against the default user registry (unfortunately this is not the security store that the production app will be using).

When I attempt to log into the application using credentials from the default user registry, it works.  However, if I use credentials from the security store serviced by my login module, then NO JOY!

Thanks kindly for your attention.

Here is web.xml

<web-app>
   <display-name>authtest</display-name>


   <session-config>
      <session-timeout>2</session-timeout>
   </session-config>


   <welcome-file-list>
      <welcome-file>/secure/welcome.jsp</welcome-file>
   </welcome-file-list>

   <security-constraint>
      <web-resource-collection>
         <web-resource-name>ReportCentral</web-resource-name>
         <description>
            Coarse access to use the report central application
         </description>
         <url-pattern>/secure/*</url-pattern>
         <http-method>GET</http-method>
         <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
         <role-name>All Authenticated Users</role-name>
      </auth-constraint>
      <user-data-constraint>
         <transport-guarantee>NONE</transport-guarantee>
      </user-data-constraint>
   </security-constraint>


   <login-config>
      <auth-method>FORM</auth-method>
      <realm-name>myrealm</realm-name>
      <form-login-config>
         <form-login-page>/login.jsp</form-login-page>
         <form-error-page>/errorLogin.jsp</form-error-page>
      </form-login-config>
   </login-config>

   <security-role>
      <role-name>All Authenticated Users</role-name>
   </security-role>

</web-app>



[+][-]05/19/06 02:46 PM, ID: 16721938Accepted Solution

Your question has an Asker Certified™ answer! bequeada verified that this solution worked for them--which means it will likely work for you, too. Click to view the solution free for 30-days now.

About this solution

Zone: IBM Websphere Application Server
Tags: jaas, websphere, login, form
Sign Up Now!
Solution Provided By: tonyvess
Participating Experts: 1
Solution Grade: A
 
 
Related Solutions
Keywords: Integration of JAAS Login Module for u…
 
Loading Advertisement...
 
[+][-]06/10/06 05:11 PM, ID: 16879104Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06/15/06 01:01 PM, ID: 16915062Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20100215-EE-VQP-121