LAN上的WCF服务器证书验证

问题描述 投票:0回答:1

我的服务和客户端驻留在两个不同的LAN网络中。服务拥有自己的签名证书,用于建立TCP TLS连接。客户端不直接信任此证书,而是信任它的根证书。最佳情况下,客户端不必安装任何其他证书。

服务器不关心客户端身份,但是客户端应该。客户端如何验证它正在连接到预期的服务器?

      <endpoint address="net.tcp://10.64.62.1:23269/CalculatorService"
                binding="netTcpBinding"
                bindingConfiguration="NetTcpBinding_ICalculatorService"
                contract="CalculatorService.ICalculatorService"
                name="clientEndpointBehavior"
                behaviorConfiguration="clientEndpointBehavior"
                >        
        <identity>
          <dns value="" />
        </identity>
      </endpoint>

<identity>中唯一不会将身份锁定到单个证书或要求窗口ClientCredentialType的唯一设置是<dns>。但是在这种情况下,我无法弄清楚<dns>的值是什么,如何防止假冒证书也由以受信任的根CA开头的链所签名?

.net wcf service x509certificate tls1.2
1个回答
0
投票

是的,“身份”部分用于在连接特定服务器时标识服务器。它应采用以下形式。

   <endpoint address="net.tcp://10.157.13.69:21011/" binding="netTcpBinding"
        bindingConfiguration="NetTcpBinding_IService" contract="ServiceReference1.IService"
        name="NetTcpBinding_IService">
        <identity>
          <userPrincipalName value="VABQIA969VM\Administrator" />
        </identity>
      </endpoint>

请检查以下官方说明。https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/service-identity-and-authentication有关如何确保证书通信的安全性,请参阅以下文档。https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/working-with-certificates

© www.soinside.com 2019 - 2024. All rights reserved.