2013-08-31 45 views
0

我們測試了Windows Server 2012域。有兩臺計算機是這個域的成員。WCF互操作性Kerberos啓用了SPNego的Web服務

一臺計算機正在由Oracle公司開發,並在虛擬機上運行Linux版本。這臺機器正在託管由IBM WebSphere主持的SPNego Kerberos身份驗證Web服務。

另一臺計算機是託管在Microsoft虛擬機上的Windows XP客戶端。

我們在Active Directory中創建了SPN,以使用Kerberos對用戶進行身份驗證。

然後,我們使用瀏覽器測試了Web服務。 WSDL地址完美地帶回了SOAP數據。

Kerberos已關閉,因此客戶端代理代碼可以合併到WCF 4.0客戶端並再次打開以進行測試身份驗證。

但是,試圖通過使用客戶端代理提供的方法連接到Web服務時,有被提出各種與安全相關的錯誤:

 The remote HTTP server did not satisfy the mutual authentication requirement. 
    The remote server returned an error: (405) Method Not Allowed.

下面是客戶端應用程序。使用配置文件連接到Web服務:

<configuration> 
<system.serviceModel> 
    <client> 
     <endpoint address="http://oag:8080/pos/GetStoreConfigurationService" 
        binding="wsFederationHttpBinding" 
        bindingConfiguration="wsFederationHttpBinding_ESLGetStoreConfigurationBinding" 
        behaviorConfiguration="ServiceBehavior" 
        contract="ESLGetStoreConfigurationPortType" 
        name="wsFederationHttpBinding_ESLGetStoreConfigurationPort" > 
      <identity> 
       <servicePrincipalName value="http/oag:8080"/> 
      </identity> 
     </endpoint> 
    </client> 
    <bindings> 
     <customBinding> 
      <binding name="UsernameBinding"> 
       <binaryMessageEncoding /> 
       <security authenticationMode="Kerberos" 
          requireSecurityContextCancellation ="false" 
          requireSignatureConfirmation="false" 
          messageProtectionOrder ="EncryptBeforeSign" 
          requireDerivedKeys="false" 
          enableUnsecuredResponse="true" 
          allowInsecureTransport="true" 
          securityHeaderLayout="Lax" > 
       </security> 
       <httpTransport authenticationScheme="Negotiate" 
           transferMode="Buffered" 
           maxReceivedMessageSize="67819876"/> 
      </binding> 
     </customBinding> 
     <wsFederationHttpBinding> 
      <binding name="wsFederationHttpBinding_ESLGetStoreConfigurationBinding" > 
       <security mode="Message"> 
        <message negotiateServiceCredential="true" 
          establishSecurityContext="false" 
          algorithmSuite="Basic128" > 
         <issuer address="http://192.168.100.25" 
           bindingConfiguration="UsernameBinding" 
           binding="customBinding"> 
          <identity> 
           <dns value="WIN-7TN6ALB4TVK.oag-dev.sei"/> 
          </identity> 
         </issuer> 
        </message> 
       </security> 
      </binding> 
     </wsFederationHttpBinding> 
    </bindings> 
    <behaviors> 
     <endpointBehaviors> 
      <behavior name="ServiceBehavior"> 
       <clientCredentials> 
        <windows allowedImpersonationLevel="Identification"/> 
       </clientCredentials> 
      </behavior> 
     </endpointBehaviors> 
    </behaviors> 
</system.serviceModel> 
<system.web> 
    <identity impersonate="false" userName="oag-server" password="Password!"/> 
</system.web> 

提供網絡憑據也是在代碼中完成;但唉,無濟於事。

謝謝。

回答

1

最好的情況是,如果你能得到一個堆棧生成的樣本工作請求/響應對(或者spnego情況下的多個消息)(例如客戶端和服務器是java)。那麼這將是一個調整WCF到這些消息之一的遊戲。目前有太多未知數。此外,AFAIK SPNEGO是一個僅支持WCF的協議(=在SOAP消息級別的Windows憑證協商),因此服務器可能使用其他方法。

您得到的具體錯誤可能意味着服務器在發送SOAP12時使用SOAP11(例如,您可能需要基本的http綁定)。但是任何配置更改都必須在瞭解服務器允許的更多SOAP的情況下完成。

+0

感謝您的快速和簡潔的迴應。我將與Oracle進行覈對,找出他們正在使用的SOAP版本,並將其指向該文章以供進一步思考。 –