Skip to content

Add ability to disable client cert validation for Kestrel #10351

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

Closed
HaoK opened this issue May 17, 2019 · 8 comments · Fixed by #11423
Closed

Add ability to disable client cert validation for Kestrel #10351

HaoK opened this issue May 17, 2019 · 8 comments · Fixed by #11423
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one

Comments

@HaoK
Copy link
Member

HaoK commented May 17, 2019

As discussed in #9756 would be useful for Cert Auth.

@HaoK HaoK added enhancement This issue represents an ask for new feature or an enhancement to an existing one area-servers labels May 17, 2019
@Tratcher Tratcher changed the title Add ability to disable cert validation for Kestrel Add ability to disable client cert validation for Kestrel May 17, 2019
@analogrelay
Copy link
Contributor

All we need to do here is add a top-level option or extension method to Kestrel options to say AllowAnyClientCert. Some docs may need to be updated.

@analogrelay analogrelay added this to the 3.0.0-preview7 milestone May 21, 2019
@analogrelay analogrelay added good first issue Good for newcomers. help wanted Up for grabs. We would accept a PR to help resolve this issue labels Jun 11, 2019
@analogrelay
Copy link
Contributor

This would be great for a new contributor!

@bcisnero
Copy link

bcisnero commented Jun 17, 2019

So I'm reviewing this and if I understand correctly the change is to give the option to the developer to use or not certificates? Or is it to give the capability to pass an specific certificate for Kestrel to use?

@analogrelay
Copy link
Contributor

This is about client certificates and is just a simplification. We already have HttpsConnectionAdaptorOptions.ClientCertificateValidation which gives you the ability to provide a function to validate the client certificate. All we're looking at here is to add a second bool option (AllowAnyClientCertificate) that, if set, has the same behavior as if you set that function to (_) => true (i.e. always allow any cert through Kestrel).

The idea being that the Client Certificate Auth handler will do the validation.

@bcisnero
Copy link

Ok, I think I understand

@analogrelay
Copy link
Contributor

Are you asking because you're interested in a PR @bcisnero ? We're probably actually going to get this done ourselves now because we want to land this preview 7

@bcisnero
Copy link

Yeah, that was my intention but still having trouble understanding the whole flow of this but I'll be very interested in seeing the solution so I can understand better all this and be able to contribute in the future,

@analogrelay
Copy link
Contributor

Ok, no problem! Just checking before we went ahead and did it :).

@mikaelm12 mikaelm12 added Working and removed good first issue Good for newcomers. help wanted Up for grabs. We would accept a PR to help resolve this issue labels Jun 20, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants