如何使用具有 AES256 标准的硬编码对称密钥将 WCF 中的通道安全性定义为加密消息?我不想使用证书,而且我知道这是一种“弱”的安全做法。
问问题
954 次
2 回答
2
没有配置选项可以实现这一点...
您将需要使用 MessageInspectors、MessageFormatters 和类似工具 - 有关一些好的起点,请参阅:
- http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.idispatchmessageformatter.aspx
- http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.iclientmessageformatter.aspx
- https://stackoverflow.com/a/3257760/847363
- http://benpowell.org/supporting-the-ws-i-basic-profile-password-digest-in-a-wcf-client-proxy/
- http://social.msdn.microsoft.com/Forums/en/wcf/thread/0f09954e-3cef-45b3-a00d-f0f579a06bf7
- http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.idispatchmessageinspector.aspx
- http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.iclientmessageinspector.aspx
- http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.iclientmessageinspector.beforesendrequest.aspx
- http://yuzhangqi.itpub.net/post/37475/500654
- http://wcfpro.wordpress.com/category/wcf-extensions/
- http://social.technet.microsoft.com/wiki/contents/articles/1322.how-to-inspect-wcf-message-headers-using-iclientmessageinspector-en-us.aspx
- http://weblogs.asp.net/paolopia/archive/2007/08/23/writing-a-wcf-message-inspector.aspx
- http://wcfpro.wordpress.com/2011/03/29/iclientmessageinspector/
- https://stackoverflow.com/a/8022912/847363
甚至可能需要使用 OperationSelectors...
于 2012-03-14T09:30:54.190 回答
2
WCF 似乎不支持预共享密钥(PSK),更多信息在这里:
于 2012-03-09T23:09:40.177 回答