本当にこれで私の髪を引き裂きます。SpringWebアプリケーション用にJAAS認証プロバイダーを構成しています。次のようにBean定義を作成しました。
<beans:bean id="jaasAuthenticationProvider"
class="org.springframework.security.providers.jaas.JaasAuthenticationProvider">
<custom-authentication-provider />
<beans:property name="loginConfig" value="file:webapps/mywebapp/WEB-INF/login.conf"/>
<beans:property name="loginContextName" value="myWebapp"/>
<beans:property name="callbackHandlers">
<beans:list>
<beans:bean class="org.springframework.security.providers.jaas.JaasNameCallbackHandler"/>
<beans:bean class="org.springframework.security.providers.jaas.JaasPasswordCallbackHandler"/>
</beans:list>
</beans:property>
</beans:bean>
JAASのlogin.confファイル:
myWebapp {
com.sun.security.auth.module.Krb5LoginModule
required
doNotPrompt=false
useTicketCache=true
debug=true;
};
com.sun.security.jgss.initiate {
com.sun.security.auth.module.Krb5LoginModule
required;
};
Springが初期化されると、Beanが正しく構成されます。ただし、Webアプリケーションにログインしようとすると、次のエラーが発生します。
DEBUG webapp.AuthenticationProcessingFilter - Authentication request failed: org.springframework.security.AuthenticationServiceException: I/O error while reading configuration file.; nested exception is javax.security.auth.login.LoginException: I/O error while reading configuration file.
このエラーメッセージはSpringのソースコードのどこにも見つかりません。エラーメッセージ自体はまったく役に立ちません。これを引き起こしている可能性のあるアイデアはありますか?