小编Cod*_*son的帖子

WebSphere 上的 Spring Security 预身份验证过滤器示例?

有人有适用于 WebSphere 的 Spring Security 示例 PreAuthentication Filter (WebSpherePreAuthenticatedProcessingFilter) 吗?关于它的文档很少,我似乎无法确定它。我正在寻找能够正常工作并且可能愿意提供您的配置示例的人。非常适合 Spring 3.1 和 WAS 7 或 8。

我有一个配置,看起来它“有点”工作。我可以使用 WebSphere 进行身份验证,然后在我的应用程序中点击 URL,但浏览器返回以下消息:

错误 500:java.lang.RuntimeException:查找用户组时发生异常

我得到如下异常堆栈跟踪:

java.lang.RuntimeException: Error while invoking method java.lang.reflect.Method.getGroupsForUser([UNAUTHENTICATED])
    at org.springframework.security.web.authentication.preauth.websphere.DefaultWASUsernameAndGroupsExtractor.invokeMethod(DefaultWASUsernameAndGroupsExtractor.java:147) [spring-security-web-3.1.3.RELEASE.jar:3.1.3.RELEASE]
    at org.springframework.security.web.authentication.preauth.websphere.DefaultWASUsernameAndGroupsExtractor.getWebSphereGroups(DefaultWASUsernameAndGroupsExtractor.java:115) [spring-security-web-3.1.3.RELEASE.jar:3.1.3.RELEASE]
    at org.springframework.security.web.authentication.preauth.websphere.DefaultWASUsernameAndGroupsExtractor.getWebSphereGroups(
...

Caused by: java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) ~[na:1.6.0]
...

Caused by: com.ibm.websphere.security.EntryNotFoundException: null
    at com.ibm.ws.wim.registry.util.MembershipBridge.getGroupsForUser(MembershipBridge.java:293) ~[com.ibm.ws.runtime.wim.core.jar:201207200704]
...

[12/28/12 14:05:15:879 CST] 00000055 LocalTranCoor E   WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[12/28/12 14:05:15:879 CST] 00000055 webapp        E …
Run Code Online (Sandbox Code Playgroud)

websphere spring-security websphere-7 pre-authentication websphere-8

5
推荐指数
1
解决办法
7016
查看次数