Hello,
I've been trying to deploy an API using mTLS authentication on a Windows Server 2022 VM with an IIS 10.0 installed with no success.
The Web API is developped using .NET Core 8.0 and works properly when launched through Visual Studio. It's goal is quite simple: allowing users to register with a username, password and their Belgian eID Card's authentication certificate, allowing the manager to validate the registration, and then providing a HTTP Only authentication token that grants readonly access to a selection of our internal apps from outside.
I've been following mainly this guide to configure things correctly.
As far as local development goes, the API works fine while launched through Visual Studio 2022.
Where things go wrong is when I try to deploy it on the test server that was provided to me by the company's System Engineers. As said before, it's a Windows Server 2022 VM with a valid SSL certificate (provided by Sectigo).
When deployed, the IIS always return the following error:
HTTP Error 403.13 - Forbidden
Your client certificate was revoked, or the revocation status could not be determined.
When enabling Failed Request Logging, the XML file contains the following:
IIS Web Core |
|
ModuleName |
IIS Web Core |
Notification |
BEGIN_REQUEST |
HttpStatus |
403 |
HttpReason |
Forbidden |
HttpSubStatus |
13 |
ErrorCode |
The revocation function was unable to check revocation because the revocation server was offline. (0x80092013) |
ConfigExceptionInfo |
|
What I've tried:
- Re-installing all Belgian Root CA's (and Intermediate Citizen CAs) on the server
- Checking that the OCSP and CRL are accessible (I can download them from Edge on the server so I assumed they are)
- Using
certutil -urlfetch -verify MyeIDAuthCert.DER
to check if everything goes well (and it seems like it does). The end of the output is Leaf certificate revocation check passed
.
- Checking the Event Viewer to verify that the SSL handshake succeeds. I can clearly see in those logs that it does indeed succeed. The log even contains both the server certificate and my eID certificate.
- Asking the System Engineers if any request is blocked by the company's firewall but they say that nothing was.
The weird thing is that if I use the company's Active Directory provided certificate that is installed on my laptop... it works.
So I was wondering if it was possible at all to configure IIS to use Mutual TLS Authentication with other (non AD linked) certificates and if it is, what did I do wrong ?
Any help would be appreciated.
Thanks in advance.