加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

如何使用WCF签署X509令牌

发布时间:2020-12-14 18:40:33 所属栏目:资源 来源:网络整理
导读:我正在开发一个必须与Oracle WebLogic服务通信的WCF客户端.该服务强制执行相互证书身份验证. 但是,我们无法满足策略,并且服务器会记录错误说明: “WSM-00081: The X.509 certificate is not signed.” 我一直想知道这是什么意思. Oracle文档说明: WSM-0008
我正在开发一个必须与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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读