2012-06-03 2 views
5

클라이언트 컴퓨터에 클라이언트 인증서를 설치하지 않아도되는 NetTcpBinding과 함께 WCF SSL을 사용할 수 있습니까? (내가 잘못하지 않는다면 SSL V2).클라이언트 인증서가없는 Tcp를 통한 Wcf SSl 인증서 사용 (서버 측만 해당)

인증을 위해 서버 인증서가 클라이언트의 신뢰할 수있는 저장소에 있고 서버의 공개 키로 메시지를 암호화하기를 원합니다. 즉, 서버 컴퓨터 만 개인 키 인증서를 보유하게됩니다.

우리는 양쪽에 customBinding이 아닌 NetTcpBinding을 사용하고 있습니다. 해당 작업을 수행 할 수있는 경우 올바른 구성은 무엇입니까? (클라이언트의 경우 & 서버 구성)

미리 감사드립니다.


여기 내 wcf Configs입니다.

서버 설정 :



    <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> 

클라이언트 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> 

메신저 내 현재 서버 & 클라이언트 CONFIGS를 추가. 또 다른 질문 :

  1. 인증 수준에서 우리는 클라이언트가 이 가능하다 (내가 서버의 공개 키가 trustedPeople 저장소에 있어야한다고 생각합니다) THER 서버의 인증서 인증 싶어?

  2. 전송 보안 또는 메시지 사용을 권장합니까? 우리가 NTLM (clientCredentialType = 윈도우)에 의해 클라이언트 & 서버를 인증하려면

  3. 는 은이 서버의 인증서 인증을 추가로 수행 할 수 있습니다하거나 둘 중 하나를 적용 할 수있다? 지금까지 NTLM 인증을 사용했습니다.

  4. 지금 예외 점점 메신저 : "요청한 업그레이드는 지원하지 않습니다 'net.tcp : //이 서버 이름 : 8040/ **'.이 때문에 일치하지 않는 바인딩으로 될 수있다 (예를 들어 보안에 사용 가능 클라이언트가 아니라 서버에). " 클라이언트가 om 인증서, 에 Windows 보안 및 서버를 사용하고 있기 때문에이 오류가 발생했음을 이해합니다. 그러나 클라이언트 보안을 인증서로 변경하는 중에도 다음 메시지가 표시됩니다. "클라이언트 인증서가 제공되지 않았습니다." 하지만 나는 클라이언트의 인증서를 설정하고 싶지 않아 내 주요 문제의 일부.

  5. 우리는 우리가이 태그 서버의 인증서 인증에 사용할 수있는 읽기 :하지만, 난 우리가 역자 주 때 신분으로이 인증은 인코딩 된 인증서로 이루어집니다 생각

    
        <identity> 
         <certificate encodedValue="encoded certificate"/> 
        </identity> 
    

그 인증서의 식별 것 클라이언트 저장소 (trustedPeople)에서 서버의 공개 키를 검색하여 수행 할 수 있습니다. 이 정보는 정말로 사실입니까? 정체성이 태그는 신뢰할 수있는 저장소 "의 클라이언트의 공개 키를 검색하는 다른 것을?

당신이 다시 한번 감사,이 방식으로 지원 할 수 있기를 바랍니다.

+0

것이 가능하다. 지금까지 뭐 해봤 어? – Bernard

+0

특별히 요구하지 않는 한 클라이언트 인증서가 필요하지 않습니다. 바인딩 구성은 어떻게 생겼습니까? –

+0

누군가 문제를 해결해 주시겠습니까 ?? – AmirT

답변

11

당신이 netTcpBiding를 사용하여 사용할 필요가있다 그것은 전송 보안 다음 3 가지 옵션이 있습니다. 첫 번째 옵션에는 서비스 인증서가 필요하고 두 번째 옵션에는 인증서가 필요하지 않으며 세 번째 옵션에는 서비스 인증서와 클라이언트 인증서가 모두 필요합니다 .Case를 통해 서비스를 인증 할 option1을 사용해야하며 메시지에 대해 기밀성 및 무결성을 증명합니다.

C >> 기밀성
I >> 무결성
>> 인증 (인증 과정이이 경우 클라이언트의 TCP의 SSL 일어날 것없는 (즉, 클라이언트 일어날 것)

1 옵션 하나가 (C + I)를 제공 HTPS의 SSL)는 C와 I를 제공하는 데 사용되며 서비스는

<!--//Below are the configuration for both the service and the client--> 
<netTcpBinding> 
    <binding name="TcpSecureBinding"> 
     <security mode="Transport"> 
     <transport clientCredentialType="None"></transport> 
     </security> 
    </binding> 
    </netTcpBinding> 

될 TCP SSL 후 사용됩니다 당신이 필요하므로 서비스가 클라이언트에 대한 인증서를 제공해야하기 때문에 서버에 인증서를 설치하고이 인증서를 사용하여 ID를 증명하도록 서비스를 구성하고 ser에 대한 루트 인증 기관 인증서를 설치해야합니다 그 (일반적으로 LocalMachine/신뢰할 수있는 루트 인증 기관에서) 클라이언트 컴퓨터에 인증서 및 서비스가

<serviceBehaviors> 
    <behavior> 
     <serviceCredentials> 
     <serviceCertificate findValue="localhost" 
          x509FindType="FindByIssuerName" /> 
     </serviceCredentials> 
    </behavior> 
    </serviceBehaviors> 

2 옵션이 제공하는 서비스 (A + [C에 대한 인증서를 지정하려면 아래의 행동이 필요합니다 + I]), C 및 I는 protectionLevel 요소를 통해 구성 할 때 선택 사항입니다. 클라이언트 인증은 윈도우 인증 될 것입니다 (3)가 제공

<!--//Below are the configuration for both the service and the client--> 
<netTcpBinding> 
    <binding name="TcpSecureBinding"> 
     <security mode="Transport"> 
     <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"></transport> 
     </security> 
    </binding> 
    </netTcpBinding> 

3 옵션 (일반적으로 A, C와 I를 달성하기 위해 Windows 스트림 보안을 사용합니다) (A + C + I)의 C와 I는 선택하지 않습니다 클라이언트 인증은 A, C를 제공하는 데 사용됩니다 (각 클라이언트가 자신의 인증서가 있어야합니다),이 경우 는 TCP SSL (안 HTPS의 SSL) 클라이언트 인증서를 통해하고 I.

<!--//Below are the configuration for both the service and the client--> 
<binding name="TcpSecureBinding"> 
     <security mode="Transport"> 
     <transport clientCredentialType="Certificate"></transport> 
     </security> 
    </binding> 
합니다

또한 TCP SSL이 사용될 것이므로 서비스는 클라이언트에 인증서를 제공해야하므로 서버에 인증서를 설치하고 서비스를 사용하도록 구성해야합니다 이 인증서는 신원을 증명하기 위해 사용되며 클라이언트 컴퓨터 (일반적으로 LocalMachine/신뢰할 수있는 루트 인증 기관)에 서비스 인증서에 대한 루트 인증 기관 인증서를 설치해야하며 서비스는 인증서를 지정하기 위해 아래 동작을 수행해야합니다 서비스

<serviceBehaviors> 
    <behavior> 
     <serviceCredentials> 
     <serviceCertificate findValue="localhost" 
          x509FindType="FindByIssuerName" /> 
     </serviceCredentials> 
    </behavior> 
    </serviceBehaviors> 
+0

공용 루트 CA 키만 사용하려면 클라이언트 끝점 구성이 어떻게 나타나야합니까? 루트 CA가 서명 한 컴퓨터 인증서로 서비스를 구성하려고 시도했지만 클라이언트가 루트 CA를 사용하도록 구성하면 클라이언트와 서버는 말할 수 없습니다. 하지만 서비스 기계의 인증서의 공개 키를 클라이언트에 놓으면 (그리고 그 certs 이름으로 "findValue"를 변경하면) 작동합니다. 내가 도대체 ​​뭘 잘못하고있는 겁니까? –

+0

[Ryan Gunn 's Blog]의 답변 (https://talkdotnet.wordpress.com/tag/nettcp/) – noobob

관련 문제