c# - Add additional SSL behavior for WCF endpoint within Azure Web Role -
our azure web application uses https port 443 our site certificate, have wcf service within webrole has https endpoint using our cert authenticate (1-way ssl), same service needs additional https endpoint supporting 2-way auth using our cert , third party's cert. have uploaded cert, updated service definition file, , added endpoint hoping work, in testing getting error: ssl settings service 'sslrequirecert' not match of iis 'none'.
so endpoint work is: https://environemnt.application.com/services/service.svc endpoint generates error: https://environment.application.com/services/service.svc/twa
the key requirement is https, port 443, @ above new endpoint, without altering ssl behavior of rest of role, have seen entries change iis configuration or use role editor add https input endpoint, have https input endpoint on port 443 using our site cert don't want alter/affect whole role.
if helpful service wcf service consumes mtom encoded soap 1.2 message
here new values have entered, else need?
<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> thank much
fixed through these steps:
- added servicecredentials.servicecertificate (cert details our cert) service behavior
- eliminated endpoint behavior definitions
- changed httpsmtomtwoway binding securitymode=message
now message handlers handle authentication exchange , external cert validation, pass on transport endpoint, , did not need mess site wide ssl or endpoint settings. tested , verified numerous 3rd parties.
Comments
Post a Comment