使用传输安全模式的 WCF 服务的证书信息
使用
我的服务器配置如下:
<basicHttpBinding>
<binding name="SecuredBasicBindingCert">
<security mode="Transport">
<message clientCredentialType="Certificate" />
</security>
</binding>
</basicHttpBinding>
正在使用第三方发布/订阅系统,不幸的是,该系统使用 DataPower 进行身份验证 如果我使用 WCF 进行此配置,那么我将无法收集任何信息。关于调用者(因为实际上没有发送凭据),
我需要能够找出谁在调用我的服务,而不更改我的配置或要求他们更改其负载。
Is there any way to pull information about which client certificate was used inside of my web service method when using <security mode="Transport>
? I sifted through OperationContext.Current but couldn't find anything obvious.
My server configuration is as follows:
<basicHttpBinding>
<binding name="SecuredBasicBindingCert">
<security mode="Transport">
<message clientCredentialType="Certificate" />
</security>
</binding>
</basicHttpBinding>
I'm working with a third party pub/sub system who is unfortunately using DataPower for authentication. It seems like if I'm using WCF with this configuration, then I'm unable to glean any information about the caller (since no credentials are actually sent).
I somehow need to be able to figure out whose making calls to my service without changing my configuration or asking them to change their payload.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,但它不直观。
首先,确保并引用服务库中的 System.IdentityModel 程序集。
现在,将类似于以下内容的内容添加到您想了解客户端证书的服务方法中:
希望这会有所帮助!
Yes, but it's unintuitive.
First, be sure and reference the System.IdentityModel assembly from your service library.
Now, add something similar the following to your service method where you would like to know about the client certificate:
Hope this helps!