Re: Windows authentication and UNC shares
From: Willy Denoyette [MVP] (willy.denoyette@pandora.be)
Date: 08/28/02
- Next message: Paul: "NT user id"
- Previous message: Marina: "Re: Getting Appropriate Context????????????????"
- In reply to: Andrew Kemp: "Re: Windows authentication and UNC shares"
- Next in thread: Andrew Kemp: "Re: Windows authentication and UNC shares"
- Reply: Andrew Kemp: "Re: Windows authentication and UNC shares"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Willy Denoyette [MVP]" <willy.denoyette@pandora.be> Date: Wed, 28 Aug 2002 22:11:26 +0200
What you have in your web.config is:
- identity impersonate="true", userName="xxxx", password="yyyyy"
- Your machine.config file specifies an account "zzzz" which is part of the TCB (Trusted Computing Base)
That means that your asp.net application (subject to this web.config) threads always use "xxxx" as principal identity.
To access the UNC share, aspnet_wp.exe (the worker process for asp.net) uses the process id (well, his token), or when
impersonating, the impersonation token, so, in your case always the token obtained for "xxxx".
Both, running asp.net with the identity of an account having TCB privileges or as SYSTEM, are dangerous options, as both have
equally very high privileges to the system.
Unfortunately, when running on NT4 or W2K, you need the TCB privilege (SYSTEM runs in the TCB by default) in order to impersonate an
alternate principal (like you did), this requirement has been lifted as from XP on.
Willy.
"Andrew Kemp" <ajwk@pell.uklinux.net> wrote in message news:slrnamq9ig.1bv.drew@onyx.pell.uklinux.net...
> Andrew Kemp wrote:
>
> > I am trying to achieve the following in an ASP.NET web application:
>
> [...]
>
> > 3. The application connects to a SQL Server database on a
> > different computer using integrated security and the same
> > database server account for all users
>
> [...]
>
> > In order to achieve (3) I have the userName in Machine.config's
> ><processModel> element set to an account with the "log on locally"
> > privilege, and impersonation with a specific username and password
> > enabled in Web.config.
>
> Oops -- I meant the "act as part of the operating system"
> privilege. Speaking of which...
>
> Somewhere in the ASP.NET documentation it gives this as one of two ways
> to enable impersonation of a specific account. It then goes on to say
> that Microsoft do not recommend it, but doesn't explain why not. Why is
> this a bad idea, and how is it different from the (presumably
> recommended?) second way of doing it which was to use "SYSTEM" as the
> userName in the <processModel> element?
>
> Thanks,
>
> --
> drew
- Next message: Paul: "NT user id"
- Previous message: Marina: "Re: Getting Appropriate Context????????????????"
- In reply to: Andrew Kemp: "Re: Windows authentication and UNC shares"
- Next in thread: Andrew Kemp: "Re: Windows authentication and UNC shares"
- Reply: Andrew Kemp: "Re: Windows authentication and UNC shares"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|