Scott Forsyth's Blog

Postings on IIS, ASP.NET, SQL Server, Webfarms and general system admin.

.

  • Scott Forsyth

Hosting Needs

Training and Dev Labs

IIS, Windows Authentication and the Double Hop issue

In IIS, you run into an interesting situation when you need to access another resource off of the IIS server and certain fairly common situations occur.  When using Integrated Security, anonymous access is disabled, and impersonation is turned on, a security measure kicks in and doesn't allow your site to access resources on any network servers.  This includes access to a UNC path directly from IIS or SQL Server using Windows authentication.

The reason is because of a 'double hop' that authentication is doing.  When you authenticate to the IIS server using Integrated Authentication, that uses up your first 'hop'.  When IIS tries to access a network device, that would be the double or second hop which is not allowed.  IIS cannot in turn pass on those credentials to the next network device, otherwise the developer or administrator could abuse your credentials and use them in ways that the site visitor didn't anticipate.

This doesn't occur with anonymous access or with impersonation off because in that case IIS takes care of authenticating you and then it uses a different user for local or network access.  This means that the app pool identity or anonymous user can make a network call as the first hop.

Anyway, I didn't mean to even write that much since the following links answer this already.  I wanted to blog this as a reference point for anyone running into this authentication issue, and so that I have a reference to it myself. 

http://blogs.technet.com/b/askds/archive/2008/06/13/understanding-kerberos-double-hop.aspx
http://blogs.technet.com/b/taraj/archive/2009/01/29/checklist-for-double-hop-issues-iis-and-sql-server.aspx

 

Posted: Aug 22 2008, 04:33 PM by OWScott | with 8 comment(s)
Filed under: ,

Comments

Jason Haley said:

# August 23, 2008 11:58 AM

Dave Markle said:

Another great reference (IMO a must-read for anybody concerning Windows Security) is Keith Brown's excellent "The .NET Developer's Guide to Windows Security":

alt.pluralsight.com/.../HomePage.html

# August 24, 2008 3:19 PM

Manchester said:

Hi, i post another question in the  default SMTP virtual server properties.

Under the IP address/advance button.

is there a bearing if i assign an ip address, but with the same port no. will be using.

and additional to that, may i know what does the enable logging uses for? aside from logs?

# August 28, 2008 1:40 AM

OWScott said:

Manchester,

This doesn't pertain to the post but I'll see if I can help.  In  the Advanced Delivery window, you can set the fully-qualified domain name which tells your SMTP server what it will announce itself as.  You should have that match your forward and reverse DNS record.  The Smart host field can be used to allow another server to do the sending of the email rather than sending it directly from this server.  

As for enable logging, it does just as promised.  It enables the logging of the email transaction to disk.  When it's not enabled, nothing is logged to disk.

# August 28, 2008 9:34 AM

SQL Server and Kerberos | ASP Scribe said:

Pingback from  SQL Server and Kerberos | ASP Scribe

# February 6, 2010 6:03 AM

Tune Up Your PC » Post Topic » SQL Server and Kerberos said:

Pingback from  Tune Up Your PC  » Post Topic   » SQL Server and Kerberos

# February 6, 2010 6:51 AM

Akela said:

Sorry, but I can't find any reference to Authentication, credentials or UNC into the post you referenced (blogs.msdn.com/.../88468.aspx)

Is it the right post ?

Thank you

# February 2, 2011 9:35 AM

OWScott said:

Hi Akela,

You're right, that link doesn't seem to have anything to do with it anymore.  I updated the blog post and replaced it with a couple other solid links on the subject.

# February 2, 2011 9:53 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)