I have deployed a test environment to integrate PrivacyIDEA, Microsoft Active Directory Certificate Services (CA), and Active Directory, with the goal of enabling centralized certificate issuance and secure TLS-based authentication between systems.
The environment is based on Windows Server 2022 with Active Directory Domain Services and Enterprise Certification Authority roles installed. PrivacyIDEA is running in a Docker-based environment under WSL2 (Ubuntu 22.04). The container stack includes PrivacyIDEA (gpappsoft/privacyidea-docker:3.12), MariaDB, Nginx as a reverse proxy, FreeRADIUS for authentication tests, and OpenLDAP for isolated directory testing. PrivacyIDEA configuration and certificates are stored in persistent volumes and bind-mounted directories.
The PrivacyIDEA web interface is available via HTTPS on port 8443, and the system successfully issues TOTP tokens for Active Directory users. To enable certificate-based authentication, a dedicated certificate template named “PI-TLS-Client” was introduced on the Microsoft CA server. The CA successfully issues certificates based on this template. However, TLS communication between PrivacyIDEA and the CA (through the gRPC connector layer) fails during the handshake phase, and corresponding Schannel errors are recorded in the Windows event log.
Windows Schannel logs report REASON_OCSP_RESPONSE_RETRIEVAL_ERROR, with an empty OCSP URL and timestamp values set to 1601-01-01T00:00:00Z. Additionally, Active Directory Certificate Services logs show that DNS information could not be added to the Subject Alternative Name field (CERTSRV_E_SUBJECT_DNS_REQUIRED), referencing CN=lc.office.utel as the subject.
The certificate request was made using an INF configuration file (attached to this message). The certificate is generated correctly and includes both DNS and IP entries in the SAN field. The “PI-TLS-Client” template is based on the standard Web Server template and contains EKUs for TLS Server and TLS Client Authentication. Permissions for the template are granted to Domain Computers, Authenticated Users, and svc_ndes. The CA publishes CRLs and AIA only via LDAP; no HTTP publication is available.
The issue seems to arise because PrivacyIDEA or its gRPC integration component expects HTTP or OCSP endpoints for certificate validation. Since only LDAP-based AIA/CDP entries are available and Docker isolates the environment from Active Directory’s internal LDAP path, certificate chain validation fails, resulting in Schannel TLS handshake errors.
Update: After additional investigation, I found that PrivacyIDEA inside the container is actually trying to connect to localhost during the TLS handshake instead of the real CA host. This suggests the connector inside the container resolves the CA endpoint locally, meaning it never reaches the actual Windows Server instance.
At this point, I assume the handshake fails because the certificate presented by the CA doesn’t match localhost, and the TLS layer rejects it due to a hostname mismatch or failed chain validation.
I’d like to ask for clarification on where exactly I should focus next — whether the problem lies in PrivacyIDEA’s gRPC connector configuration, Docker name resolution, or the CA-side certificate publishing (AIA/CDP) method.
Also, what else should I know or test about how TLS operates when a containerized application like PrivacyIDEA initiates a connection to localhost? Specifically, are there any implications related to hostname resolution, certificate CN/SAN validation, or network namespace isolation in such cases?
I’ll keep posting updates in this thread as I test further, and once the integration works properly, I’ll definitely leave the full summary and closing notes.