Closed Coldplayer1995 closed 2 years ago
A couple of questions first
As an aside .NET Core 2.1 runtime is out of support now. If you're not targeting .NET Framework as your runtime you're not getting security patches anymore and you need to update to a supported runtime and framework.
We are using .NET 5.0
.NET 5 has its own, supported version, questions should be directed there.
For k8s you can probably import the root CA into OpenSSL during setup, but I'm afraid that's a k8s question.
Server certificate in this case is the HTTPS certificate kestrel uses, that doesn't touch on client certificate auth at all (aside from https being required by default, and https requiring a certificate) and what you're seeing are instructions for 2.1 which is all the cert auth supports.
As you're asking about .NET 5 I'm going to close this, as this implementation doesn't support it because it became the starting point for inclusion in 3.1.
Description of the problem you are seeing: I'm doing a request to the controller with the attribute: [Authorize]
What do you think should be happening? I should be entering the event: OnValidateCertificate. I want to validate httpclient Certificate against external CA authority. Why I need to provide any ServerCertificate for the server in the Kestrel is a black box for me. I want to be able to verify it against CA?
What is actually happening? The event OnValidateCertificate is not executed and I immidiatly get 403 Forbidden returned
My ConfigureServices() code