配置WCF客户端以使用Web服务安全性Kerberos令牌配置文件1.1

时间:2009-10-27 22:00:38

标签: wcf security client kerberos

上午,

有没有人知道如何配置WCF(任何绑定类型,我们目前正在使用WSHttpBinding,但我很乐意转到CustomBinding或替代方案)以便使用

Web服务安全性Kerberos令牌配置文件1.1

详情可在此处找到:

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

特别是我想知道如何在SOAP标头中包含Security BinarySecurityToken和SecurityTokenReference部分。示例(取自上述文件)如下:

<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>

先谢谢,保罗。

1 个答案:

答案 0 :(得分:1)

直接来自the MSDN documentation

<wsHttpBinding>
    <binding name="MyBinding">
        <security mode="Message>
            <message   
                clientCredentialType="Windows"
                negotiateServiceCredential="false"
                establishSecurityContext="false"/>
        </security>
    </binding>
</wsHttpBinding>