Identity check failure when using kerberos message security

Hello.
I’m getting

an identity check failure exception when using kerberos message security to

communicate with a self-hosted service.
I’m using

the WSHttpBinding binding with the following parameters:

  • client credentials set to Windows
  • negotiate service credential set to false
  • establish security context set to false
The client

credentials have the "AllowNtlm" property set

to false.
The channel

to the service is created with a EndpointAddress containing a

UpnEndpointIdentity

constructed with “<user>@<domain>”
Apparently

the security token (a kerberos service ticket in this case) is created, however

its claims are not compatible with the identity of the service EndpointAddres

and I cannot figure out why!

Any help is

appreciated.

Thanks.

Pedro Felix

PS. I’m

using the July CTP.

[1324 byte] By [PedroFelix] at [2007-12-23]
# 1

What is the exact error msg that you're seeing?

Are you seeing the error when the client and server are on the same machine?

Thanks!

Scott

ScottMason-MSFT at 2007-8-31 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 2
Thanks for your quick reply.

1) Both the client and the service are on the same machine.
2) The exception message is:
Unhandled Exception: System.ServiceModel.Security.MessageSecurityException: The identity check failed for the outgoing message. The expected identity is 'identity(http://schemas.microsoft.com/ws/2005/05/identity/right/possessproperty: http:
//schemas.microsoft.com/ws/2005/05/identity/claims/upn)' for the 'http://...:8080/si/service/ep' tar
get endpoint.

Thanks!
Pedro Felix

PedroFelix at 2007-8-31 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 3

It may be that the upn is not formatted correcly. If you run svcutil on your service and check out what the config looks like, it should give you the correctly formatted upn in the identity element of the enpoint.

Also, it looks like you're trying to do a one-shot kerberos call (ie. one message including all necessary data sent in a single msg) by setting negotiateServiceCredential = false. This is not doable when using a UPN. You must have a registered SPN to do the one-shot. You can test this by running your service as the System account. You can run AT <time> /interactive cmd.exe to open up a command prompt running as System. From there you can run your service. Then change your upn to <servicePrincipalName value= "HOST/<machinename>.

Let me know if that works out for you.

Thanks!

Scott

ScottMason-MSFT at 2007-8-31 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 4
Hello
Running the host in the System account and using a SPN instead of a UPN works correctly.
However, I don't understand why "one-shot" kerberos is not possible using UPN. Could you tell me why or point me to some resources explaining this. I'm rather familiar with the Kerberos protocol.
Thanks for your help!
Pedro Felix
PedroFelix at 2007-8-31 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...

Visual Studio Orcas

Site Classified