O serviço WCF com WS-Security requer apenas carimbo de data e hora assinado

Preciso fornecer um serviço a terceiros que enviará mensagens de sabão com um carimbo de data / hora assinado.

Como posso configurar meu serviço para suportar isso?

ATUALIZAR Consegui aproximar-me do formato da mensagem Soap que buscamos, mas o WCF insiste em assinar os tokens de nome de usuário e de carimbo de data / hora. Existe uma maneira de modificar a ligação para assinar apenas o carimbo de data e hora?

Atualização adicional Aqui estão os nossos requisitos:

O elemento Timestamp DEVE ser assinado.O nome CN no certificado usado para assinar DEVE corresponder ao nome de usuário fornecido no elemento UsernameToken.O certificado usado para assinar DEVE ser enviado no elemento BinarySecurityToken.O elemento KeyInfo DEVE conter apenas um elemento SecurityTokenReference, que deve ser usado para referenciar o BinarySecurityToken.Um algoritmo de canonização DEVE ser especificado.O SignatureMethod DEVE ser especificado e DEVE ser o algoritmo SHA-1 ou SHA-2.Destacadas assinaturas devem ser usadas.

Alguma sugestão?

CONFIGURAÇÃO ATUAL

Ligação do cliente

<bindings>
  <wsHttpBinding>
    <binding name="WSBC">
      <security mode="TransportWithMessageCredential">
        <transport clientCredentialType="Certificate" proxyCredentialType="None"></transport>
        <message clientCredentialType="UserName" negotiateServiceCredential="false" establishSecurityContext="false" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>

Ponto de extremidade do cliente

<client>
  <endpoint address="https://localhost/WcfTestService/Service2.svc"
  behaviorConfiguration="CCB" binding="wsHttpBinding"
  bindingConfiguration="WSBC"
  contract="ServiceReference2.IService2"
  name="wsHttpBinding_IService2" />
</client>

Comportamento do Cliente

<behaviors>,
  <endpointBehaviors>
    <behavior name="MBB">
      <clientCredentials>
        <clientCertificate  findValue="03 58 d3 bf 4b e7 67 2e 57 05 47 dc e6 3b 52 7f f8 66 d5 2a"
                            storeLocation="LocalMachine"
                            storeName="My"
                            x509FindType="FindByThumbprint" />
        <serviceCertificate>
          <defaultCertificate findValue="03 58 d3 bf 4b e7 67 2e 57 05 47 dc e6 3b 52 7f f8 66 d5 2a"
                              storeLocation="LocalMachine"
                              storeName="My"
                              x509FindType="FindByThumbprint"  />
        </serviceCertificate>
      </clientCredentials>
    </behavior>
  </endpointBehaviors>
</behaviors>

Ligação de serviço

<bindings>
  <wsHttpBinding>
    <binding name="ICB">
      <security mode="TransportWithMessageCredential">
        <transport clientCredentialType="Certificate" proxyCredentialType="None"></transport>
        <message    clientCredentialType="UserName" 
                    negotiateServiceCredential="false"
                    establishSecurityContext="false" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>

Ponto de extremidade de serice

<service name="WcfTestService.Service2" behaviorConfiguration="SCB">
    <endpoint     address="" binding="wsHttpBinding" contract="WcfTestService.IService2"
    bindingConfiguration="ICB" name="MS" />
</service>

Comportamento do Serviço

<behaviors>
  <serviceBehaviors>
    <behavior name="SCB">
      <serviceCredentials>
        <serviceCertificate     findValue="4d a9 d8 f2 fb 4e 74 bd a7 36 d7 20 a8 51 e2 e6 ea 7d 30 08"
                                storeLocation="LocalMachine"
                                storeName="TrustedPeople"   
                                x509FindType="FindByThumbprint" />
        <userNameAuthentication 
            userNamePasswordValidationMode="Custom" 
            customUserNamePasswordValidatorType="WcfTestService.UsernameValidator, WcfTestService" />
        <clientCertificate>
          <authentication certificateValidationMode="None" revocationMode="NoCheck" />
        </clientCertificate>
      </serviceCredentials>
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>

questionAnswers(4)

yourAnswerToTheQuestion