com.ibm.websphere.security.WSSecurityException:领域不匹配
当我尝试访问与客户端在同一 WAS 7.0 服务器上运行的 JAX-WS Web 服务时,出现此异常。
由以下原因引起:javax.xml.ws.WebServiceException:java.io.IOException:无法反序列化此上下文中的主题,原因:领域不匹配
我为用户身份验证设置了一个领域,并且在禁用该领域的情况下,此调用可以正常工作。服务器和客户端都在同一个单元中运行。
我目前的想法是我的 Web 服务根本不提供任何领域信息,导致了这个问题,所以我需要在我的 Web 服务中做一些事情来提供领域 - 但是什么呢?就连 google-fu 在这方面也让我失望了!
I'm getting this exception when trying to access a JAX-WS webservice running on the same WAS 7.0 server as the client.
Caused by: javax.xml.ws.WebServiceException: java.io.IOException: Unable to deserialize the Subjects in this Context, cause: the realms do not match
I have a realm set up for user authentication and this call works fine with that realm disabled. Both server and client are running in the same cell.
My current thinking is that my web service is not providing any realm information at all, causing this problem, so I need to do something in my web service to provide a realm - but what? Even google-fu is failing me on this one!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
领域在分配给调用的 LTPA 令牌中设置,并且客户端和服务器的领域需要匹配。
即,如果客户端对用户进行身份验证并使用领域=“Ldap1:389”设置LTPA令牌,则服务器需要具有相同的领域集。或者它需要明确信任给定的领域。这可以在 WAS 管理控制台中进行设置,有关 LTPA 的说明请参见此处:
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/csec_ltpa。 html
The Realm is set in the LTPA token assigned to the call, and the realms of the client and server needs to match.
I.e. if client authenticates the user and sets and LTPA token with realm="Ldap1:389" then the server needs to have the same realm set. Or it needs to explicitly trust the given realm. This can be set up in WAS admin console, for an explanation of LTPA have a look here:
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/csec_ltpa.html
事实证明,我的本地基于文件的管理领域和我为用户登录设置的领域之间需要存在信任关系。
WAS 似乎在幕后做了很多安全性工作,但打开 WSSecurity 内容的跟踪输出有助于揭示问题。
It turned out to be that there needed to be a trust relationship between my local file-based admin realm and the realm I set up for my users to log on with.
WAS seems to do a lot of security gubbins under the covers, but turning on trace output for WSSecurity stuff helps shed light on problems.