Re: Why must credentials be explictly given when user is already l
- From: "Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 11 May 2008 11:30:46 -0500
NETWORK SERVICE is a built-in account introduced as of WinXP that it used to
run services. It has a counterpart called LOCAL SERVICE. They are both
intended to be used instead of the SYSTEM account for services that do not
need full system privileges as this reduces the attack surface of the
machine.
The key difference between network service and local service is that network
service has network credentials (like the system account) and local service
does not. Thus when network service (or system) access the network, they
use the credentials of the machine account. For a domain joined machine,
this the domain computer account for the machine.
So, when you are not impersonating (basically just using the IIS process/app
pool identity) to access the directory, the net result is that your query to
AD executes with the privileges of the computer account which generally has
the same read privileges of a normal user.
HTH,
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"K Kong" <KKong@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EF1885B6-7447-4B1D-A4D9-34B11A7441E0@xxxxxxxxxxxxxxxx
Thank you. I understand now. The browser is having the credentials of
userA. The web server authenticates against some domain controller that
the
browser is indeed userA. But the web server is still running as NT
AUTHORITY\NETWORK SERVICE. The mobile number request is retrieved by
NETWORK
SERVICE, which is permitted. Earlier I was mistaken that the credentials
of
userA are passed through to the domain controller. That requires Kerberos
delegation as you have pointed out. And from what I read, Kerberos
delegation
requires the domain administrators to come in and permit trust. So it's
not
something I could spring a surprise to everyone in the company. :(
While we are on this, what is NT AUTHORITY\NETWORK SERVICE? I can't find
the NT AUTHORITY folder nor the user NETWORK SERVICE in ADUC although it
is
available when I am assigning access rights to a file.
THanks.
"Joe Kaplan" wrote:
It is most likely that authentication was successful as something,
although
that is not necessarily true. However, if impersonation was not enabled
in
web.config, that would mean that you are authenticating as the process
account instead of the account of the authenticated browser user. You
can
find out the account you are attempting to use by examining the value
returned by System.Security.Principal.WindowsIdentity.GetCurrent().Name.
I say "not necessarily" here because it depends on a bunch of factors.
With
Win2K3+ AD, authentication is required by default to perform any
operations.
You get an "operations error" is you attempt an operation such as a
search
and are not authenticated. However, that can be disabled. If using
Win2K
AD, authentication is not required by default, so if you accidentally
authenticate as anonymous you can still perform some operations.
However,
you usually can't see much in the directory because anonymous users don't
have much read access. Once again though, those permissions can all be
changed as well.
So, the bottom line is that without knowing all the details of both your
app
and your AD infrastructure, I can't tell you for sure what is happening.
I
can say for sure that Kerberos delegation IS required for the web app to
forward the credentials of the user authenticated via IWA to a remote
resource.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services
Programming"
http://www.directoryprogramming.net
--
.
- References:
- Why must credentials be explictly given when user is already logge
- From: K Kong
- Re: Why must credentials be explictly given when user is already logge
- From: Joe Kaplan
- Re: Why must credentials be explictly given when user is already l
- From: K Kong
- Re: Why must credentials be explictly given when user is already l
- From: Joe Kaplan
- Re: Why must credentials be explictly given when user is already l
- From: K Kong
- Why must credentials be explictly given when user is already logge
- Prev by Date: how to implement a Role-Based winapp
- Next by Date: RE: Trouble running .Net Service as LocalSystem
- Previous by thread: Re: Why must credentials be explictly given when user is already l
- Next by thread: IE7 / Vista - hosted UserControl fails to load (must run as admin)
- Index(es):
Relevant Pages
|