-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow skip chain validation in ClientCertificate authentication #40423
Comments
I have to add that the inspiration for this design is long term usage of RavenDB. From RavenDB documentationhttps://ravendb.net/docs/article-page/5.0/csharp/server/security/overview RavenDB does not use PKI infrastructure to trust certificates and uses a more strict approach. It will allow access to client certificates which are explicitly registered in the RavenDB server or certificates which have the same issuer and Public Key Pinning Hash as a certificate which is already trusted. |
I am working on a library |
I've got another idea. What about allowing a callback for configuring the var chainPolicy = BuildChainPolicy(clientCertificate);
callback(chainPolicy);
var chain = new X509Chain
{
ChainPolicy = chainPolicy
}; |
Tagging subscribers to this area: @dotnet/ncl |
This seems to be either for SslStream or HttpClient (or both), changing area. |
Triage: We believe this should be part of larger issue around certificate chains and their options -- there is already existing tracking issue - @wfurt will link it and close this one. |
may be in similar to #35839. We may want to expose some better control over validation in general. |
As I have understood it the client certificate goes through validation on SSL handshake as well as in |
Client and server now have option to pass in |
Background and Motivation
We use
Microsoft.AspNetCore.Authentication.Certificate
and for our use case chain validation gets in the way. We have theclient certficate
explicitly registered server side and validate that aspect inCertificateAuthenticationOptions.Events.OnCertificateValidated
. Chain validation is really not needed as the client certificate is validated against a server side copy of the same certificate. If the chain validation fails we never get to doing our validation logic inOnCertificateValidated
as the event is never raised.NOTE: The ideal solution is to use either self signed certificates or certificates with valid chains. That is easier said than done when the same certificates are used across multiple environments.
Proposed API
Usage Examples
Risks
Additive API with opt in use. Should not result in any regression.
The text was updated successfully, but these errors were encountered: