如何使用WCF签署X509令牌

如何使用WCF签署X509令牌,第1张

概述我正在开发一个必须与Oracle WebLogic服务通信的WCF客户端.该服务强制执行相互证书身份验证. 但是,我们无法满足策略,并且服务器会记录错误说明: “WSM-00081: The X.509 certificate is not signed.” 我一直想知道这是什么意思. Oracle文档说明: WSM-00081: The X.509 certificate is not sign 我正在开发一个必须与Oracle WebLogic服务通信的WCF客户端.该服务强制执行相互证书身份验证.

但是,我们无法满足策略,并且服务器会记录错误说明:

“WSM-00081: The X.509 certificate is not signed.”

我一直想知道这是什么意思. Oracle文档说明:

WSM-00081: The X.509 certificate is not signed.

Cause: The X509 token used was not signed according to requirements of certificate authentication scenario.

Action: Sign the X509 token (depending upon the reference mechanism used) for certificate authentication.

Level: 1

Type: ERROR

Impact: Security

(http://docs.oracle.com/cd/E25054_01/core.1111/e10113/chapter_wsm_messages.htm)

经过一些研究,我们发现我们可以通过设置is-signed =“false来禁用服务策略配置文件中的检查:

<orasp:x509-token orasp:enc-key-ref-mech="direct" orasp:is-encrypted="false"              orasp:is-signed="false"              orasp:rcpt-enc-key-ref-mech="direct"              orasp:rcpt-sign-key-ref-mech="direct"              orasp:sign-key-ref-mech="direct"/>

我的两个理论:

>证书需要由CA签名

>我们使用CA签署的证书进行了检查,但这没有任何区别
>但是,在配置时我们可能会犯下som错误.我们应该尝试一下吗?

>我们需要签署包含在请求中的包含的BinarySecurityToken.

>但是,我不知道我怎么能这样做

我是否完全误解了这个主题,或者你们中的任何人都可以指出问题可能是什么以及如何解决?

解决方法 您需要在安全令牌中签名作为请求的一部分.

在配置的绑定元素中,将安全元素模式设置为SecurityMode.Message,将消息元素clIEntCredentialType设置为MessageCredentialType.Certificate:

<security mode="Message">    <message clIEntCredentialType="Certificate"        algorithmSuite="Default"        establishSecurityContext="true" /></security>

接下来,创建端点行为以解析client certificate的位置:

<behavior name="endpointCredentialBehavior">    <clIEntCredentials>        <clIEntCertificate findValue="Contoso.com"             storeLocation="LocalMachine"            storename="TrustedPeople"            x509FindType="FindBySubjectname" />    </clIEntCredentials></behavior>
总结

以上是内存溢出为你收集整理的如何使用WCF签署X509令牌全部内容,希望文章能够帮你解决如何使用WCF签署X509令牌所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1139641.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-31
下一篇 2022-05-31

发表评论

登录后才能评论

评论列表(0条)

保存