2013-01-03 2 views
1

SOAP 서비스를 호출하는 WCF 클라이언트의 ServiceContractProtectionLevel = ProtectionLevel.None을 배치했지만 WCF는 여전히 헤더에 서명을 추가하고 있습니다.WCF를 SOAP 헤더에 추가하지 않음

[ServiceContract(ConfigurationName = "IMyOutboundService", ProtectionLevel = ProtectionLevel.None)] 

이 클라이언트의 헤더 서명을 어떻게 해제합니까?

저는 customBindingauthenticationMode="MutualCertificate"으로 사용하고 있으며 <textMessageEncoding messageVersion="Soap11WSAddressing10"/>으로 설정했습니다. 나는 이것을 허용하는 한 다른 바인딩을 사용할 수 있습니다.

여기에 전체에 현재의 바인딩입니다 :

<binding name="MyBinding" openTimeout="00:00:10" sendTimeout="00:00:10" > 
     <textMessageEncoding messageVersion="Soap11WSAddressing10" /> 
     <security authenticationMode="MutualCertificate" 
       includeTimestamp="true" 
       enableUnsecuredResponse="true"> 
     <localClientSettings timestampValidityDuration="00:15:00"/> 
     </security> 
     <httpsTransport 
     manualAddressing="false" maxBufferPoolSize="524288" 
     maxReceivedMessageSize="5242880" allowCookies="false" 
     bypassProxyOnLocal="true" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard" 
     keepAliveEnabled="true" maxBufferSize="5242880" 
     realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" 
     useDefaultWebProxy="true" requireClientCertificate="true" /> 
    </binding> 
+0

지금까지 나의 연구는 "MutualCertificate"인증 모드를 사용하는 경우 서명을 끌 수 없다고 제안합니다. 그래서 이것이 사실인지 여부를 아는 사람이라면 확인이나 증거가 유용 할 것입니다! – Fenton

+2

recollection에서 - 반드시 mutualcert를 사용하면 헤더에 반드시 서명해야합니다. 그렇지 않으면 * "내 메시지가 서명/암호화되어 있으므로 검증이 가능하고 내 머리글에 서명하지 않아서 신뢰할 수 없습니다 그것 ... 따라서 메시지를 믿지 않는다 " – BlueChippy

+0

@BlueChippy 클라이언트와 서버가 인증서만을 전송하는 인증 모드가 없다는 것을 알 수있는 한 - 그런 경우인가? – Fenton

답변

1

나는이 하나 명의 작업, 하드 방법을 가지고있다!

<binding name="MyBinding" openTimeout="00:00:10" sendTimeout="00:00:10" > 
     <textMessageEncoding messageVersion="Soap11WSAddressing10" /> 
     <httpsTransport 
     manualAddressing="false" maxBufferPoolSize="524288" 
     maxReceivedMessageSize="5242880" allowCookies="false" 
     bypassProxyOnLocal="true" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard" 
     keepAliveEnabled="true" maxBufferSize="5242880" 
     realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" 
     useDefaultWebProxy="true" requireClientCertificate="true" /> 
    </binding> 

그래서 사용자 지정 바인딩을 유지하기보다는 당신이 Soap11WSAddressing10을 유지할 수 있습니다 (I 시도 않았다) 기본 바인딩로 전환하여 (즉, 귀하의 모든 SOAP 헤더를 얻을).

요소 <security을 제거하면 본질적으로 전송 전용 보안으로 설정됩니다. 전송 전용 모드에서는 서명이 추가되지 않습니다.

슬프게도 한가지 빠져있는 것은 타임 스탬프입니다. 타임 스탬프를 추가하는 구성을 찾을 수 없으므로 수동으로 추가해야합니다. 이것은이 모든 다른 것들을 작동시키는 것에 비해 사소한 일입니다. 솔직히 말해서 나는 그것을 기쁘게 생각합니다.

관련 문제