Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / March 2008

Tip: Looking for answers? Try searching our database.

Certificate key access under Network Service in IIS 6

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick Strahl - 16 Mar 2008 03:21 GMT
I've run into an issue where I've been unable to get a certificate to load
its private key for signing an XML document when running on an IIS 6 server.
I can get the signing process to work if I have the IIS Application Pool
configured to run under SYSTEM but running under the preferred NETWORK
SERVICE account the private key access of the certificate fails.

I've registered the certificate in the Local Machine / Personal store and
I've set ACLs for the cert by running:

winhttpcertcfg -c LOCAL_MACHINE\My -s "Tidewater Finance Company" -g -a
"NETWORKSERVICE"
winhttpcertcfg -c LOCAL_MACHINE\My -s "Tidewater Finance Company" -l

to presumably set permissions on the certificate. The listing (second
command) does in fact show that Network Service is allowed access to the
certificate, but it still doesn't work.Only under SYSTEM can I access the
cert's private key  for signing.

Now on my local test environment running Vista and IIS 7, running NETWORK
SERVICE works just fine after running WinHttpCert.Apparently there's some
environment difference between Win2003 and Vista and the above ACL
assignment works here but not on the live server.

If you're interested I've documented my long process to get cert signatures
to work here:
http://www.west-wind.com/weblog/posts/257599.aspx

But I'm at a loss as to how to get NETWORK SERVICE to access the private key
for the signing process. Right now we're running in SYSTEM context which is
a security issue for my customerl.

Can anybody suggest any other things I can look at?

Any help much appreciated,

Aloha,

+++ Rick ---

---

Rick Strahl
West Wind Technologies
www.west-wind.com/weblog
Joe Kaplan - 16 Mar 2008 19:50 GMT
If it is a permissions problem (sounds like it still is), the tool I like to
use to figure these things out is Process Monitor from MS Sysinternals.
Essentially, you just need to filter on the w3wp.exe process and look for
access denied errors.  That will tell you exactly what resource request is
causing the problem.  It is likely the private key file but might be a
registry key as well.  Once you know the resource, you can just change the
ACL accordingly.

This stuff can be frustrating, but don't give up.  Procmon is also a great
tool to have around.  You'll use it frequently.

Signature

Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--

>
> I've run into an issue where I've been unable to get a certificate to load
[quoted text clipped - 42 lines]
> West Wind Technologies
> www.west-wind.com/weblog
Rick Strahl - 17 Mar 2008 09:14 GMT
Hey Joe,

Thanks. Good idea. Haven't done that because I've been remoted in to the
customer's server. Not sure if I'll end up having the rights I need in the
TS session to run ProcMon. Will give a shot though.

+++ Rick ---

---
Rick Strahl
West Wind Technologies
www.west-wind.com/weblog

> If it is a permissions problem (sounds like it still is), the tool I like
> to use to figure these things out is Process Monitor from MS Sysinternals.
[quoted text clipped - 52 lines]
>> West Wind Technologies
>> www.west-wind.com/weblog

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.