Got a simple WCF demo application with two console projects - a host and a client. Both run on my machine (win 7). I am using netTcpBinding, which uses windows authentication.
The problem is that authentication is downgraded to NTLM from kerberos, and I cannot understand why.
If i use
<clientCredentials> <windows allowNtlm="true" /> </clientCredentials>
on the client side, everything is cool. But if I change this to false , I get the following exception:
SecurityNegotiationException: The remote server did not satisfy the mutual authentication requirement.
This suggests that kerberos fails, and since the client does not allow NTLM, the call throws an exception.
Is this a problem with the project, or is it an external problem caused by the configuration of my development machine?
Decision:
Apparently, I should indicate the server identifier in the client configuration. In my case, the server runs under my identity, so I change the client this way:
<client> <endpoint address="net.tcp://dev7.HurrDurr.com:12345/MyService" binding="netTcpBinding" bindingConfiguration="MyBindingConfigurationLol" behaviorConfiguration="HurrDurrServiceEndpoint" contract="ShaolinCore.ICommunicationService"> <identity> <userPrincipalName value="myusername@mydomain"/> </identity> </endpoint> </client>
I am not sure why this fixes the problem. OK, now on the client side, I completely trust the server (hey, I know this guy!). But since NTLM is less secure than kerberos, why not? If I do not fully trust the server, I use kerberos, otherwise ntlm is fine.
Or, OTOH, if I do not fully trust the server, why does it work at all? "SecurityException: endpoint identifier not set. WCF cannot trust the server identifier and not pass the client identifier."