An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
Hello Sepski, Krzysztof,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you're having issues with Application Gateway OCSP in private network.
This is not caused by the private OCSP responder, VNet routing, DNS, or Kubernetes/OpenShift deployment, because you already confirmed that a self-signed certificate using the same OCSP URL successfully sends OCSP requests to the responder. Therefore, with the EJBCA-issued client certificate, its AIA OCSP extension, EKU/client authentication purpose, issuer chain, or the trusted client CA chain uploaded to Application Gateway.
Application Gateway validates the presented client certificate by using the OCSP responder URL defined in the certificate’s Authority Information Access, AIA, extension. If the OCSP responder cannot be resolved/reached, or if certificate revocation validation cannot be completed, Application Gateway returns HTTP 400. - https://stackoverflow.com/questions/78541006/400-the-ssl-certificate-error-from-azure-application-gateway-with-mtls-setup-by, https://learn.microsoft.com/en-us/troubleshoot/azure/application-gateway/mutual-authentication-troubleshooting
What you need to do to resolve is to:
- Verify that the actual EJBCA client certificate contains a valid OCSP URI in the AIA extension.
- Verify that the EJBCA client certificate has
Extended Key Usage: TLS Web Client Authentication. - Upload the correct EJBCA trusted client CA chain to Application Gateway, including the issuing intermediate CA and root CA, but not the leaf certificate or private key.
- Temporarily disable
VerifyClientCertIssuerDNwhile testing, because issuer DN mismatch can cause Application Gateway to reject the client certificate before successful OCSP validation. - Keep
VerifyClientRevocationset toOCSP. - Confirm the final result using the Application Gateway access log field
sslClientVerify.
After correcting the EJBCA certificate profile and trusted CA chain, Application Gateway should be able to build the client certificate chain, read the OCSP URI from AIA, send the OCSP request to the private responder, and complete the mTLS request successfully. Use the below resources for more reading and implementation steps:
- https://learn.microsoft.com/azure/application-gateway/mutual-authentication-overview
- https://learn.microsoft.com/troubleshoot/azure/application-gateway/mutual-authentication-troubleshooting
- https://learn.microsoft.com/azure/application-gateway/application-gateway-dns-resolution
I hope this is helpful. Please! Do not hesitate to let me know if you have any other questions, steps or clarifications.
Please do not close the thread by upvoting and accepting the answer if any part of it is helpful.