我們測試了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>
提供網絡憑據也是在代碼中完成;但唉,無濟於事。
謝謝。
感謝您的快速和簡潔的迴應。我將與Oracle進行覈對,找出他們正在使用的SOAP版本,並將其指向該文章以供進一步思考。 –