Использование сертификата Wcf SSl через Tcp без сертификата клиента (только на стороне сервера)
Есть ли способ использовать WCF SSL с NetTcpBinding, который не требует установки сертификата клиента на клиентском компьютере? (SSL V2, если я не ошибаюсь).
мы хотим, чтобы сертификат сервера находился в доверенном хранилище клиента для аутентификации и шифрование его сообщения с помощью открытого ключа сервера, что означает, что только серверный компьютер будет иметь сертификат закрытого ключа.
мы используем NetTcpBinding, а не customBinding с обеих сторон. Если это может быть сделано, какова его правильная конфигурация? (на клиентских и серверных конфигурациях)
Заранее спасибо.
вот мои конфиги wcf.
SERVER CONFIG:
<configuration>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="TcpSecureBinding">
<security mode="Transport">
<transport clientCredentialType="Certificate"/>
</security>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceCredentialsBehavior">
<serviceDebug includeExceptionDetailInFaults="True" />
<serviceMetadata httpGetEnabled="true" />
<serviceAuthorization
principalPermissionMode="UseWindowsGroups">
</serviceAuthorization>
<serviceCredentials>
<windowsAuthentication includeWindowsGruops="true"
allowAnonymousLogons="false"/>
<clientCertificate>
<authentication certificateValidationMode="none"/>
</clientCertificate>
<serverCertificate
findValue="thumbprint"
storelocation="LocalMachine"
x509FindType="FindMyThumbprint"
storeName="My"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="ServiceCredentialsBehavior"
name="ServiceModel.Calculator">
<endpoint address="net.tcp://localhost:8040/Calculator"
binding="netTcpBinding"
bindingConfiguration="TcpSecureBinding"
contract="ServiceModel.ICalculator" >
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</service>
</services>
</system.serviceModel>
</configuration>
CLIENT CONFIG:
<configuration>
<system.serviceModel>
<client>
<endpoint address="net.tcp://localhost:8040/Calculator"
behaviorConfiguration="endpointCredentialBehavior"
binding="netTcpBinding"
bindingConfiguration="Binding1"
contract="ServiceModel.ICalculator">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</client>
<behaviors>
<endpointBehaviors>
<behavior name="endpointCredentialBehavior">
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="Binding1">
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
</configuration>
я добавляю свой текущий сервер & amp; клиентские конфиги. другие вопросы:
at the authentication level we want the client to authenticate ther server's cert (i think server's public key should be in trustedPeople store) , is this possible?
do you recommend us use Transport Security Or Message?
if we want to authenticate client & server by NTLM (clientCredentialType=Windows) is it can be done in addition to the server's cert authentication or just one of them can be applied? till now, we've used NTLM authentication.
right now im getting exception: "The requested upgrade is not supported by 'net.tcp://servername:8040/**'. This could be due to mismatched bindings (for example security enabled on the client and not on the server)." i understand this error occured because the client is using Windows Security and server in om Certificate, but when im changing client security to Certificate also,im getting an error: "The client certificate is not provided". but i don't want to set client's certificate and thats part of my main problem.
we read that we can use for server's cert authentication this tags:
<identity>
<certificate encodedValue="encoded certificate"/>
</identity>
но я думаю, что эта аутентификация по идентификатору выполняется посредством закодированного сертификата, когда мы предполагаем, что идентификация сертификата будет выполняться путем поиска открытого ключа сервера в хранилище клиента (trustPeople). эта информация действительно правдива? что эти теги идентичности являются альтернативой поиску открытого ключа в надежном хранилище клиента?
надеюсь, что вы сможете помочь в этом, еще раз спасибо.