Certificate key access under Network Service in IIS 6




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

.