2014-04-28 77 views

回答

1

如果您想在使用SOAP 1.1(同時考慮基於Java的客戶端或Oracle服務的互操作性)時使用基於證書的身份驗證,則最好使用自定義綁定。 AuthenticationMode會根據您的需求進行更改。

例如,下面的綁定顯示服務器和客戶端+傳輸安全性(https)上的相互證書驗證。

<customBinding> 
    <binding name="customSSLMutualCertificate" sendTimeout="00:05:00" receiveTimeout="00:05:00"> 
     <customTextMessageEncoding messageVersion="Soap11"/> 
     <security defaultAlgorithmSuite="Basic256Rsa15" authenticationMode="MutualCertificate" 
      requireDerivedKeys="false" securityHeaderLayout="Lax" includeTimestamp="false" 
      keyEntropyMode="CombinedEntropy" messageProtectionOrder="SignBeforeEncrypt" 
      messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" 
      requireSignatureConfirmation="false" enableUnsecuredResponse="true"> 
     <localClientSettings cacheCookies="true" detectReplays="false" 
      replayCacheSize="900000" maxClockSkew="00:05:00" 
      maxCookieCachingTime="Infinite" 
      replayWindow="00:05:00" sessionKeyRenewalInterval="10:00:00" 
      sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="true" 
      timestampValidityDuration="00:05:00" cookieRenewalThresholdPercentage="60" /> 
     <localServiceSettings detectReplays="true" issuedCookieLifetime="10:00:00" 
      maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="00:05:00" 
      negotiationTimeout="00:01:00" replayWindow="00:05:00" 
      inactivityTimeout="00:02:00" 
      sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="00:05:00" 
      reconnectTransportOnFailure="true" maxPendingSessions="128" 
      maxCachedCookies="1000" timestampValidityDuration="00:05:00" /> 
     <secureConversationBootstrap /> 
     </security> 
     <httpsTransport manualAddressing="false" maxBufferPoolSize="524288" 
        maxReceivedMessageSize="65536" allowCookies="false" 
        authenticationScheme="Anonymous" 
        bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 
        keepAliveEnabled="true" maxBufferSize="65536" 
        proxyAuthenticationScheme="Anonymous" 
        realm="" transferMode="Buffered" 
        unsafeConnectionNtlmAuthentication="false" 
        useDefaultWebProxy="true" requireClientCertificate="false"/> 
    </binding> 
    </customBinding> 

另請參見Does WCF support WS-Security with SOAP 1.1?其他選項

+0

謝謝,我知道的選項是存在的,我測試過,它正在與.NET客戶端,問題是,它爲Java工作,因爲就像普通的basicHttp綁定一樣簡單 –

+0

@TOMMYWANG - 正如我指出的那樣,堅持基於證書的身份驗證的自定義綁定,其中互操作性是一個問題。上述自定義綁定配置可以與基於Java的服務和客戶端配合使用。 – dera

相關問題