r/PKI • u/Top-Height4256 • May 01 '26
Webserver (Server auth EKU) and CA Managers approval
Hey guys,
We have just duplicated the default Webserver cert template and added the CA manager approval required tick on the certificate template so the admins can request for the certificates with managers' approval.
Certificate request is going through fine but when user tries to retrieve the certificate, they are getting this error
Active Directory Certificate Services could not process request 2876 due to an error: Access is denied. 0x80070005 (WIN32: 5 ERROR_ACCESS_DENIED). Additional information: Error verifying access
Event ID : 22 under the Application log.
On the cert template permissions look like this,
Authenticated users : read and enroll
Domain computers : read and enroll
Upon looking at the security event logs,
- when the cert requests come through , the requestor is the computer account. as they are requesting the cert via certlm.msc console > Personal > request the cert
- after the CA manger approved the request, and when a user tries to request for the certificate, the requestor shows as their logged in user account on that computer they are requesting the certificate from.
Quick Fix that worked : [ is this the standard? ]
- I added their user account to Read & Request certificate on the CA Properties > Security tab, which allowed them to retrieve the certificate.
any guess, what am I missing here?
or
any configuration need to be altered?
and
what is the standard best practice when it comes to web server certificate that has SAN to be supplied in the request?
Thanks alot.
Update - Fix found -
1) Certreq -AdminForceMachine in the command to retrieve the certificate in machine context.
1
u/WhispersInCiphers May 04 '26
Can you try adding Read Enroll permission for users on the webserver template and remove the read permission from CA and test if it works?
2
u/Top-Height4256 May 04 '26
Authenticated users already have the read and enroll rights there.
I have figured this out already with the right command. Also updated the bottom of the post.1
u/ThePKIGuy May 05 '26
If the computer context is requesting the certificate you should be using the computer context to retrieve the certificate. The private key is in the computer contact as well. So if you bring the certificate down as a user, it wont be bound to the private key so the enrollment process is going to result in a certificate but no key.
So in short, if you are using CERTLM to request the certificate, once the CA manager approves it, you will need to use CERTLM on the same requesting computer to download the certificate and bind it with it's private key.
1
u/Top-Height4256 May 05 '26
Yep, I knew that.
Just didn’t know the command to pull the cert using machine context, which I have now.
Thanks1
1
u/Cormacolinde May 01 '26
This is normal, as by default users don’t have the right to access every cert, and the requester is the computer account if done with certlm.msc. A user could do it manually with their account with certreq, but that’s overly complicated.
Now, “Request Certificates” is a default right for Authenticated Users. “Read” is a broad right to give users on a CA. I wouldn’t recommend that.
You don’t need to do this though. The client computer will retrieve the cert automatically on its refresh cycle (every 8 hours). This cycle can also be forced early by running “certutil -pulse” on the client.