End-to-end kerberos delegated authentication in ASP.NET
Posted
by Erlend
on Stack Overflow
See other posts from Stack Overflow
or by Erlend
Published on 2010-06-03T06:47:17Z
Indexed on
2010/06/03
6:54 UTC
Read the original article
Hit count: 489
I'm trying to setup an internal website that will contact another backend service within the network on behalf of the user using a HttpWebRequest. I have to use Integrated Windows Authentication on the ASP.NET application as the backend system only supports this type of authentication.
I'm able to setup IWA on the ASP.NET application, and it's using kerberos as I expect it to. However when the authentication is delegated to the backend system it doesn't work anymore. This is because the backend system only supports kerberos IWA, but the delegation for some reason - even though the incoming request is kerberos authenticated - converts the authentication to NTLM before forwaring to the backend system.
Does anybody know what I need to do on the ASP.NET application in order to allow it to forward the identity using kerberos?
I've currently tried the followin but it doesn't seem to work
CredentialCache credentialCache = new CredentialCache();
credentialCache.Add(request.RequestUri, "Negotiate", CredentialCache.DefaultCredentials.GetCredential(request.RequestUri, "Kerberos"));
request.Credentials = credentialCache;
I've also tried to set "Kerberos" where it now says "Negotiate", but it doesn't seem to do much.
© Stack Overflow or respective owner