
Originally Posted by
steve_sicherheit
I can authenticate fine via Jaas/Kerberos but when I attempt to search Active Directory to retrieve the user roles, my attempts fail with kerberos credential errors.
Steve, can you paste your applicationContext.xml ? I cannot make spring-security authenticate using kerberos. All the time I'm getting a
Code:
org.springframework.security.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
and my AuthorityGranter never gets called.
Here is mine:
Code:
<security:global-method-security secured-annotations="enabled" />
<security:authentication-manager alias="_authenticationManager"/>
<bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
<property name="providers">
<list>
<ref local="jaasAuthenticationProvider" />
</list>
</property>
</bean>
<security:authentication-provider user-service-ref="userDetailsService" />
<security:user-service id="userDetailsService">
<security:user password="secret" name="fooBar" authorities="ROLE_KRBRS_AUTHENTICATED"/>
</security:user-service>
<bean id="jaasAuthenticationProvider" class="org.springframework.security.providers.jaas.JaasAuthenticationProvider">
<security:custom-authentication-provider />
<property name="loginConfig" value="file:c://jaas.conf" />
<property name="loginContextName" value="JaasSample" />
<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.mypackage.KerberosAuthorityGranter" />
</list>
</property>
</bean>
Any idea?