내 특정 문제는이 같은 것입니다 : 우리는 현재를 호출 할 때 인증과 같은 사용자 이름과 암호를 제공하기 위해 클라이언트를 필요로 일련의 서비스를 실행하는사용자 정의 클라이언트 인증서와 사용자 이름 검증
서비스.
우리는 이러한 서비스에 PKI 인프라를 구현하고자하지만 파트너 중 일부는 다른 인프라보다이 새로운 인프라를 수용하는 데 더 많은 시간을 사용할 것입니다.
첫 번째 단계로 일부 파트너의 클라이언트 인증서가 필요합니다. 다른 사용자의 경우 사용자 이름과 암호 만 필요하지만 서버의 데이터에 액세스하려면 클라이언트 인증서가 필요합니다 (사용자 이름과 암호 이외에).
:
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpsGetEnabled="true" policyVersion="Policy15" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<clientCertificate>
<authentication customCertificateValidatorType="MyWS.Security.MyServicesCertificateValidator, MyWS"
certificateValidationMode="Custom" revocationMode="NoCheck" />
</clientCertificate>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="MyWS.Security.MyServicesUsernameValidator, MyWS" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
<bindings>
<basicHttpBinding>
<binding name="MySoapBinding">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Certificate" />
<message clientCredentialType="UserName" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="MyServiceBehavior" name="MyWS.Services.TheService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="MySoapBinding" name="TheService" bindingNamespace="https://services.my/TheService" contract="MyWS.Interfaces.Service.ITheService" />
<host>
<baseAddresses>
<add baseAddress="https://localhost:4434/MyWS/TheService"/>
</baseAddresses>
</host>
</service>
</services>
지금까지 내가 IIS가를 검사하기 때문에 내가 (전송 계층에서 customCertificateValidatorType를 사용하지 못할 때문에이 구성이 유효하지 않습니다 이해 인증서를 WCF 전에 여기에 관여)하지만 메시지 레이어에서 customCertificateValidatorType 및 customUserNamePasswordValidatorType을 자격 증명 유형으로 결합 할 수있는 방법을 확인할 수 없습니다.
메시지 관리자를 구현했으며 (아래 링크에서 제안 된 것처럼) 어떤 방식 으로든 OperationContext를 사용하여 문제를 해결할 수는 있지만, 이렇게 할 수있는 방법을 볼 수 없었습니다. 아직 ... 내가 WCF의 작동 방식과 호환되지 않는 무언가를 구현하려고 할 수도 있지만, 누군가가이 해결 될 수있는 방법에 대한 아이디어가 있다면 내가 가진 기뻐할 것입니다 가정
http://social.msdn.microsoft.com/Forums/en/wcf/thread/b6ab8b58-516b-41d4-bb0e-75b4baf92716
당신의 이것에 대한 피드백!
의견을 보내 주셔서 감사합니다. 그것은 올바른 방향으로 나를 인도 해주었습니다. 여러 끝점을 사용하고 사용자 지정 바인딩에서 토큰을 지원했습니다. – Hanskun