-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
I want to implement a custom client certificate authentication, preferably by using a IAsyncAuthorizationFilter to translate the certificate to an identity.
Asp.Net Core with .NET Framework 4.7.2 is running on Kestrel behind an IIS reverse proxy like it is described here: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/?view=aspnetcore-2.2&tabs=windows#out-of-process-hosting-model
The lead I could find is the ForwardClientCertificate setting described here: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/index?view=aspnetcore-2.2#iis-options
How I understand it is, that one sends an http request with the MS-ASPNETCORE-CLIENTCERT header with the base64 encoded client certificate as value.
The ASP.NET Core Module in IIS (and IIS Express) takes the header, translates it into a certificate and provides (forwards) it to Kestrel as a ClientCertificate.
I'm not really sure if this expects a https connection between IIS and Kestrel to do that, but it also seems to complicate things a lot anyway.
So I couldn't get this to work and think I'm missing something here. If not my feature request would be to just forward the MS-ASPNETCORE-CLIENTCERT header to Kestrel and use ITlsConnectionFeature to resolve the certificate in the AuthorizationFilter.
Thanks in advance,
Davud