Problem with Impersonation / Delegation
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS Server Security > Problem with Impersonation / Delegation




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Problem with Impersonation / Delegation  
Al


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-09-06 06:27 PM

I've tried setting up Impersonation with Delegation and I can't get it to
work. When the IIS application is trying to connect to a remote SQL Server,
I'm getting NTLM authentication instead of Kerberos, so causing my delegatio
n
to fail, and I can't see why.

My test enviroment is a Virtual Server 2005 R2, hosting 3 Win2003 Servers
and the domain is called TEST.LOCAL. The first Win2003 is called OLYMPUS and
hosts the Active Directory. The AD is now in Win2003 only mode.
The 2nd Win2003 is called HADES and is running IIS6.0 and SQL Server. HADES
has been set as "Trusted for Delegation" to any service (Kerberos only).
The 3rd Win2003 is called ZEUS and is running SQL Server.

HADES is hosting an ASP.Net 2.0 web page, which makes a SQL connection to
both HADES and ZEUS. The web page / site is set for Intergrated Security onl
y
and the ASP.Net Impersonate is turned on. The web page is in the default
Application Pool which is running under the local Network Service account.
This account is set locally to be both "Act as OS" and "Trusted for
delegation".

When accessing the web page from HADES as http://localhost/SQLTest, both SQL
Server connections are made. I do realise that this isn't really delegation,
but it shows me that the Impersonation is working and that the user is
allowed to connect to all the services that is requires.

When accessing the web page from any of the machines as
http://Hades/SQLTest, the SQL Server connection to ZEUS fails. I've checked
the Security Event Log on ZEUS and can see that a connection is being made a
s
the Anonymous user and using NTLM.

I have checked the SPN for both ZEUS and HADES. Both as showing the SQL
Server default instances that I'm trying to connect to. Neither SQL Server i
s
using a domain account, so these are the auto-registered SPN.

I can't see a HTTP SPN for ZEUS, but I'm assuming that as I'm using the
NETWORK SERVICE to run the application pool that this is not a problem.

So, does anyone have any ideas as to what I need to do next?

Thanks in advance,

Al






[ Post a follow-up to this message ]



    Re: Problem with Impersonation / Delegation  
Ken Schaefer


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-11-06 06:41 AM

> When accessing the web page from any of the machines as
> http://Hades/SQLTest, the SQL Server connection to ZEUS fails. I've
> checked
> the Security Event Log on ZEUS and can see that a connection is being made
> as
> the Anonymous user and using NTLM.

What authentication mechanism is being used to authenticate to Hades?
http://www.adopenstatic.com/cs/blog.../08/02/194.aspx are
some ways you can check.

If Kerberos is being used, we need to figure out why delegation is failing.
If NTLM is being used, we need to figure out why Kerberos is not being used.

Cheers
Ken


"Al" <Al@discussions.microsoft.com> wrote in message
news:A3ED3BD4-AA36-4893-9D06-D3C2BF89FA6D@microsoft.com...
> I've tried setting up Impersonation with Delegation and I can't get it to
> work. When the IIS application is trying to connect to a remote SQL
> Server,
> I'm getting NTLM authentication instead of Kerberos, so causing my
> delegation
> to fail, and I can't see why.
>
> My test enviroment is a Virtual Server 2005 R2, hosting 3 Win2003 Servers
> and the domain is called TEST.LOCAL. The first Win2003 is called OLYMPUS
> and
> hosts the Active Directory. The AD is now in Win2003 only mode.
> The 2nd Win2003 is called HADES and is running IIS6.0 and SQL Server.
> HADES
> has been set as "Trusted for Delegation" to any service (Kerberos only).
> The 3rd Win2003 is called ZEUS and is running SQL Server.
>
> HADES is hosting an ASP.Net 2.0 web page, which makes a SQL connection to
> both HADES and ZEUS. The web page / site is set for Intergrated Security
> only
> and the ASP.Net Impersonate is turned on. The web page is in the default
> Application Pool which is running under the local Network Service account.
> This account is set locally to be both "Act as OS" and "Trusted for
> delegation".
>
> When accessing the web page from HADES as http://localhost/SQLTest, both
> SQL
> Server connections are made. I do realise that this isn't really
> delegation,
> but it shows me that the Impersonation is working and that the user is
> allowed to connect to all the services that is requires.
>
> When accessing the web page from any of the machines as
> http://Hades/SQLTest, the SQL Server connection to ZEUS fails. I've
> checked
> the Security Event Log on ZEUS and can see that a connection is being made
> as
> the Anonymous user and using NTLM.
>
> I have checked the SPN for both ZEUS and HADES. Both as showing the SQL
> Server default instances that I'm trying to connect to. Neither SQL Server
> is
> using a domain account, so these are the auto-registered SPN.
>
> I can't see a HTTP SPN for ZEUS, but I'm assuming that as I'm using the
> NETWORK SERVICE to run the application pool that this is not a problem.
>
> So, does anyone have any ideas as to what I need to do next?
>
> Thanks in advance,
>
> Al
>







[ Post a follow-up to this message ]



    Re: Problem with Impersonation / Delegation  
Al


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-12-06 12:20 AM

Hi Ken,

Thanks for your post. It's working now, and I'm only willing to put a £1 be
t
onto what the cure was.

But to answer your question, the initial connection, from IE to IIS was made
using Kerberos authentication.

What I think fixed it was running "aspnet_iisreg -r" on Hades. But also
tonight I switched the SQLServer on Zeus from a Local System to a domain
account, deleted the old SPN and added new SPN for the Zeus SQL Server, and
then switched back to Local System again, which might also have had an effec
t.

Thanks again,

Al
"Ken Schaefer" wrote:
 
>
> What authentication mechanism is being used to authenticate to Hades?
> http://www.adopenstatic.com/cs/blog.../08/02/194.aspx are
> some ways you can check.
>
> If Kerberos is being used, we need to figure out why delegation is failing
.
> If NTLM is being used, we need to figure out why Kerberos is not being use
d.
>
> Cheers
> Ken
>
>
> "Al" <Al@discussions.microsoft.com> wrote in message
> news:A3ED3BD4-AA36-4893-9D06-D3C2BF89FA6D@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:29 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register