[英]Add additional SSL behavior for WCF endpoint within Azure Web Role
我們的azure Web應用程序已經使用帶有站點證書的https端口443,在此webrole中有一個WCF服務,該服務具有一個使用我們的證書進行身份驗證的https端點(1-way ssl),該服務需要一個額外的https端點,支持2-使用我們的證書和第三方證書進行方式驗證。 我們已經上傳了證書,更新了服務定義文件,並添加了我們希望能夠工作的端點,但是在測試中我們遇到了錯誤:服務“ SslRequireCert”的SSL設置與IIS“無”的SSL設置不匹配'。
因此有效的端點是: https : //environemnt.application.com/Services/Service.svc生成錯誤的端點: https : //environment.application.com/Services/Service.svc/twa
關鍵要求是在上述新端點上是https端口443,而沒有更改其余角色的SSL行為,我已經看到了一些條目來更改IIS配置或使用角色編輯器添加Https Input端點,但是由於我們已經使用站點證書在端口443上具有Https Input端點,因此我不想更改/影響整個角色。
如果有幫助,則該服務為WCF服務,它消耗Mtom編碼的soap 1.2消息
這是我們輸入的新值,我還需要什么?
<behaviors>
<serviceBehaviors>
<behavior name="SSLServiceBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="OneWayAuthEndpointBehavior">
</behavior>
<behavior name="TwoWayAuthEndpointBehavior">
<endpointDiscovery enabled="true"></endpointDiscovery>
<clientCredentials>
<clientCertificate findValue="thumprint..." storeLocation="LocalMachine" storeName="CertificateAuthority" x509FindType="FindByThumbprint" />
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="SSLServiceBehavior" name="Service">
<endpoint address="" behaviorConfiguration="OneWayAuthEndpointBehavior"binding="wsHttpBinding" bindingConfiguration="HttpsMtomOneWay" contract="ITestService" />
<endpoint address="twa" behaviorConfiguration="TwoWayAuthEndpointBehavior" binding="wsHttpBinding" bindingConfiguration="HttpsMtomTwoWay" contract="ITestService"/>
</services>
<bindings>
<wsHttpBinding>
<binding name="HttpsMtomOneWay" messageEncoding="Mtom">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
<binding name="HttpsMtomTwoWay" messageEncoding="Mtom">
<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>
</binding>
</wsHttpBinding>
</bindings>
非常感謝你
通過以下步驟解決:
現在,消息處理程序處理身份驗證交換和外部證書驗證,然后傳遞到傳輸終結點,並且我們無需弄亂站點范圍的SSL或終結點設置。 經過眾多第三方的測試和驗證。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.