我正在寻找一些技术细节,在使用像下面这样的WCF绑定进行消息交换期间,实际用户名和密码(证书)的存储位置。WCF消息证书实现细节
<bindings>
<wsHttpBinding>
<binding name="wsHttp">
<security mode="TransportWithMessageCredential">
<transport/>
<message clientCredentialType="UserName"
negotiateServiceCredential="false"
establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
然后客户端应用程序中我把这种服务通过一组有效的creds像这样
using (SupplierServiceClient client = new SupplierServiceClient()) {
client.ClientCredentials.UserName.UserName = "admin";
client.ClientCredentials.UserName.Password = "password";
SupplierList = client.GetSupplierCollection();
}
起初我认为WCF是采取这一数据,并把它变成了SOAP头,但它从WSDL中不会出现这种方式......任何帮助?
编辑:
下面就是客户端的安全配置看起来像在生产
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" />
<message clientCredentialType="UserName" establishSecurityContext="false" />
</security>
优秀 - 所以在“请求安全令牌”下的身体中,您是否还会看到用户名+密码或? –
我不确定RequestSecurityToken与这个有关UsernameTokens ...的问题有什么关系? –
这只是用于建立安全上下文的WS-Trust握手的第一部分(请求)。你可以在这里阅读更多关于它的细节:http://specs.xmlsoap.org/ws/2005/02/trust/ws-trust.pdf –