Auto-Enrollment Errors
Most auto-enrollment problems come from one of four areas: Kerberos (SPNs, delegation and time), network reachability of CEP and the gateway, the gateway configuration, and Group Policy. Each issue below describes the symptom, why it happens and how to resolve it.
Access denied: 0x803d0005 (WS_E_ENDPOINT_ACCESS_DENIED)
The client reaches CEP or the gateway but is refused. This almost always means that Kerberos cannot complete the request on behalf of the client: the HTTP SPN for the CEP web address is missing or registered on the wrong account, or constrained delegation from the CEP service account to the gateway is not configured.
- On a Domain Controller, run
setspn -L <service account>and confirm that bothHTTP/<cep-fqdn>andHTTP/<cep-short-name>are listed. - If an SPN is missing, register it with
setspn -S HTTP/<cep-fqdn> <DOMAIN>\<account>. Ifsetspnreports a duplicate, remove the SPN from the other account first, because a duplicate SPN breaks Kerberos for both. - Open the service account's Delegation tab and confirm Trust this user for delegation to specified services only, Use Kerberos only, and the HOST and rpcss services of the gateway computer.
- Run
klist purgeon the test client, thencertutil -pulseagain so a fresh ticket is requested.
The client cannot reach the gateway on port 8443
Enrollment requests time out, and Test-NetConnection gateway.example.com -Port 8443 fails. Port 8443 is blocked between the client and the gateway, or the local Windows Firewall rule on the gateway is missing.
- Check the network firewalls between the client subnets and the gateway, and allow TCP 8443.
- On the gateway, confirm that the Windows Firewall rule EC PKIaaS Gateway 8443 exists and is enabled.
- Confirm that
gateway.example.comresolves to the gateway's IP address from the client. - Test again with
Test-NetConnection gateway.example.com -Port 8443; TcpTestSucceeded must be True.
ECGatewayService is running but not listening on 8443
The service shows as running, but nothing answers on port 8443. The gateway private key is protected by a passphrase and the passphrase was not entered during installation. A Windows service cannot ask for a passphrase at startup, so the TLS listener never starts.
- Open
enrollment_gateway.loginC:\Program Files\Encryption Consulting\EC PKIaaS Gateway\logsand check the startup line forTLS=onandkey-passphrase=set. - Re-run the installer's Gateway Configuration page, enter the passphrase, and restart ECGatewayService.
- Run
netstat -ano | findstr 8443on the gateway to confirm that the port is listening.
The GPO is not applied
gpresult /r does not list the PKI-as-a-Service GPO, so the client never learns the CEP URL. The GPO is linked to the wrong OU, is blocked by security filtering or WMI filtering, or the client has not refreshed its policy yet.
- In Group Policy Management, confirm that the GPO is linked to the OU that contains the test computer and that the link is enabled.
- Check Security Filtering: the computer (or Authenticated Users / Domain Computers) must have Read and Apply group policy.
- Run
gpupdate /forceon the client and thengpresult /ragain.
The CEP URL fails validation in Group Policy
When the CEP URI is added in the enrollment policy and Validate is selected, validation fails. CEP is not running, its SSL certificate is invalid or does not match the host name, or the URL was copied incorrectly.
- Browse to the CEP URL from the Domain Controller; a certificate warning or an error page shows where the problem is.
- In IIS Manager, confirm the HTTPS binding on port 443 uses the CEP certificate, and that the certificate subject or SAN matches the CEP host name.
- Confirm that the certificate chain (Root CA > Issuing CA > CEP certificate) is trusted on the Domain Controller.
- Copy the URI again from ADPolicyProvider_CEP_Kerberos > Application Settings.
Kerberos errors in the event log
The System or Security log shows Kerberos errors such as clock skew or ticket failures. Kerberos rejects tickets when the clocks of the client, server and Domain Controller differ by more than five minutes.
- Run
w32tm /query /statuson the client, CEP server and gateway and compare the time source and offset. - Resynchronise with
w32tm /resync, and make sure every machine follows the domain time hierarchy.
The certificate is issued but not trusted
The certificate appears in the store but shows a chain error, or authentication still fails. The EC CA certificates are missing from NTAuth or from the trust stores on the client.
- Run
certutil -viewstore "ldap:///CN=NTAuthCertificates,CN=Public Key Services,CN=Services,CN=Configuration,DC=example,DC=com"and confirm that both EC CA certificates are listed. - Re-run the NTAuth publication from Activity 2: Publish EC CA Certificates to NTAuth if they are missing.
- Run
gpupdate /forceon the client and check the Trusted Root and Intermediate stores. See Add CA Certificates to the Client Trust Store.