views:

525

answers:

1

Morning,

Does anyone know how to configure WCF (any binding type, we are currently using WSHttpBinding but am happy to move to a CustomBinding or alternative if necessary) to use

Web Services Security Kerberos Token Profile 1.1

the details of which can be found here:

http://www.oasis-open.org/committees/download.php/16788/wss-v1.1-spec-os-KerberosTokenProfile.pdf

In particular I would like to know how to include the Security BinarySecurityToken and the SecurityTokenReference sections in the SOAP header. Example (taken from the above document)below:

<S11:Envelope xmlns:S11="..." xmlns:wsse="..." xmlns:wsu="...">
  <S11:Header>
    <wsse:Security>
      <wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/oasis-wss225 kerberos-token-profile-1.1#Kerberosv5_AP_REQ" wsu:Id="MyToken">
        boIBxDCCAcCgAwIBBaEDAgEOogcD...
      </wsse:BinarySecurityToken>
      ...
      <wsse:SecurityTokenReference>
        <wsse:Reference URI="#MyToken" ValueType="http://docs.oasis-open.org/wss/oasis-wss-kerberos-token232 profile-1.1#Kerberosv5_AP_REQ" >
        </wsse:Reference>
      </wsse:SecurityTokenReference>
      ...
    </wsse:Security>
  </S11:Header>
  <S11:Body>
  ...
  </S11:Body>
</S11:Envelope>

Thanks in advance, Paul.

+1  A: 

Straight from the MSDN documentation:

<wsHttpBinding>
    <binding name="MyBinding">
        <security mode="Message>
            <message   
                clientCredentialType="Windows"
                negotiateServiceCredential="false"
                establishSecurityContext="false"/>
        </security>
    </binding>
</wsHttpBinding>
Drew Marsh
That doesnt seem to work. We end up with a RequestSecurityToken in the SOAP body. Its structure doesnt look like the specification.
Paul
And you're using that binding configuration verbatim and nothing else?
Drew Marsh
No. We are using https, so the mode we have set to TransportWithMessageCredential. We have some timeouts set and some readerQuotas but nothing that I would expect would interfere with the inclusion of the Kerberos token.
Paul
In all honesty I've never used kerberos tokens, only SAML tokens. Check out this MSDN documentation on how negotiateServiceCredential impacts the use of the Kerberos token profile: http://msdn.microsoft.com/en-us/library/system.servicemodel.messagesecurityoverhttp.negotiateservicecredential.aspx
Drew Marsh