-
May 13th, 2009, 02:25 PM
#1
How to configure Spring with JAAS?
I have been following http://static.springframework.org/sp...html/jaas.html with good success until I got to the part I care most about, how to configure Spring Security to use JAAS?
After following the steps in Chapter 15 of this user guide JAAS does not work. I think one of the problems is that the docs do not say how I should modify my authentication-provider settings. In a previous section this document said to enter the following:
<security:authentication-provider>
<security:user-service>
<security:user name="bob" password="bob" authorities="ROLE_USER"/>
</security:user-service>
</security:authentication-provider>
If I leave this in place after adding support for JAAS using the jaasAuthenticationProvider bean, it seems that the user-service is still in-force and jaasAuthenticationProvider is not used. However if I comment out the authentication-provider section then I get a Spring error when my application loads.
Can someone clarify what my authentication-provider entry should be when using jaasAuthenticationProvider bean?
For reference here is my jaasAuthenticationProvider bean config:
<bean id="jaasAuthenticationProvider"
class="org.springframework.security.providers.jaas .JaasAuthenticationProvider">
<property name="loginConfig" value="/WEB-INF/login.conf"/>
<property name="loginContextName" value="WebTAS_JAAS"/>
<property name="callbackHandlers">
<list>
<bean class="org.springframework.security.providers.jaas .JaasNameCallbackHandler"/>
<bean class="org.springframework.security.providers.jaas .JaasPasswordCallbackHandler"/>
</list>
</property>
<property name="authorityGranters">
<list>
<bean class="com.issinc.cdf.servlet.TestAuthorityGranter "/>
</list>
</property>
</bean>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules