Sea*_*man 5 c# security wcf certificate nettcpbinding
我已阅读MSDN上提供的文档以及本网站上的其他一些帖子.但是,当使用带有证书的消息安全性时,WCF(特别是NetTcpBinding)是否会实际加密消息内容仍然有点不清楚.有人有确切消息么?
例如,您可以在配置中指定传输和消息凭据:
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Certificate"/>
<message clientCredentialType="Certificate"
negotiateServiceCredential="true" />
</security>
Run Code Online (Sandbox Code Playgroud)
据我所知,MSDN文档暗示消息安全性仅依赖于用户名/密码或基于证书的身份验证(协商),但没有具体说明消息本身实际上是在消息级别加密的.
例如,如果我只使用消息安全性,基于证书的协商,我不认为消息内容实际上是加密的(即,数据包嗅探器可以拦截原始消息内容 - 即使服务强制执行身份验证)?
如果可以进行真正的消息级加密(使用NetTcpBinding),如何在代码中完成?我相信这与AlgorithmSuite有关,虽然我不确定,
binding.Security.Mode = SecurityMode.Message;
binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows;
binding.Security.Message.AlgorithmSuite = new System.ServiceModel.Security.TripleDesSecurityAlgorithmSuite();
Run Code Online (Sandbox Code Playgroud)
WCF可以使用netTcpBinding加密消息内容.最简单的方法是在.config文件中添加诊断程序并输出svclog文件.您实际上可以使用svctraceviewer.exe工具查看加密的消息
这里有一些更多信息(您可能已经阅读过)WCF NetTcpBinding安全性 - 它是如何工作的?
| 归档时间: |
|
| 查看次数: |
6181 次 |
| 最近记录: |