Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert wsHttpBinding to customBinding

How do I convert the following wsHttpBinding to a customBinding? I need to so this so I can increase the clock skew. This is for http.

 <wsHttpBinding>
    <binding name="wsHttpSecurityOptions" maxReceivedMessageSize="10485760" maxBufferPoolSize="524288">
      <security mode="Message">
        <message clientCredentialType="UserName" establishSecurityContext="true" negotiateServiceCredential="true"/>
        <transport clientCredentialType="Certificate" proxyCredentialType="None"/>
      </security>
      <readerQuotas maxStringContentLength="500000"/>
    </binding>
  </wsHttpBinding>

My attempt (as follows) fails with the error message "Could not find a base address that matches scheme https for the endpoint with binding CustomBinding" but I can't see how else to configure UserName Message mode security.

  <customBinding>
    <binding name="wsHttpSecurityOptions">
      <transactionFlow />
      <security authenticationMode="UserNameForSslNegotiated">
        <secureConversationBootstrap authenticationMode="UserNameForSslNegotiated">
          <localServiceSettings maxClockSkew="00:10:00" />
        </secureConversationBootstrap>
        <localServiceSettings maxClockSkew="00:10:00" />
      </security>
      <textMessageEncoding>
        <readerQuotas maxStringContentLength="500000"/>
      </textMessageEncoding>
      <httpsTransport maxReceivedMessageSize="10485760" maxBufferPoolSize="524288" />
    </binding>
  </customBinding>
like image 204
Keith K Avatar asked Nov 18 '10 16:11

Keith K


1 Answers

After some more searching I found a cool tool by Yaron Naveh that does the conversion which produces the following (I've added in the clock skews)

  <customBinding>
    <binding name="wsHttpSecurityOptions">
      <transactionFlow />
      <security authenticationMode="SecureConversation" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
        <secureConversationBootstrap authenticationMode="UserNameForSslNegotiated" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
          <localServiceSettings maxClockSkew="00:10:00" />
        </secureConversationBootstrap>
        <localServiceSettings maxClockSkew="00:10:00" />
      </security>
      <textMessageEncoding />
      <httpTransport maxBufferSize="10485760" maxReceivedMessageSize="10485760" />
    </binding>
  </customBinding>

Thanks again to Yaron and I wish I'd found it before asking another question which I've self answered 50mins after asking it (which is a record for me :))

like image 193
Keith K Avatar answered Oct 21 '22 14:10

Keith K