Skip to content
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

Auto-generate self-signed certificates in Kestral #141

Open
hitchhiker opened this issue May 19, 2024 · 4 comments
Open

Auto-generate self-signed certificates in Kestral #141

hitchhiker opened this issue May 19, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@hitchhiker
Copy link

hitchhiker commented May 19, 2024

I have no need for TLS security, but MS is removing HTTP, here's my use case:
https://github.com/NuGet/docs.microsoft.com-nuget/issues/3295

Would it be possible to allow Kestral to generate a self-signed certificate, to eliminate the need for extra configuration / maintenance?

An example of that: https://itniels.com/2020/05/19/aspnet-core-starting-kestrel-with-generated-selfsigned-certificate/

@seriouz
Copy link

seriouz commented May 21, 2024

@hitchhiker So far I haven't thought about what exactly happens if Microsoft disables http access completely. If they still check the validity of certificates, we really have to come up with something clever.

@hitchhiker
Copy link
Author

Hey @seriouz - they have a flag that they've added to 8.0.400 that will allow us to skip validation, I don't know if that includes HTTP (and can't find information on it yet).

disableTLSCertificateValidation=true

While it would be better for folks in our context to just to use HTTP (as self-hosted, in a private network we have no use for TLS), if the flag doesn't allow that it will at least allow us to use a self-signed / temporary / self-generated cert.

NuGet/Home#13478

@seriouz
Copy link

seriouz commented May 22, 2024

Thank you for this information.
I think we'll go for: Allowing to add custom certs. And when none is found, a self signed will be used.
Probably we could add a notice to the ui explaining the disableTLSCertificateValidation=true property.

@hitchhiker
Copy link
Author

https://github.com/NuGet/docs.microsoft.com-nuget/issues/3295#issuecomment-2125360562

They replied, the flag 'allowInsecureConnections' (available already) suppresses the warnings / errors and allow the process to continue with HTTP. I tried it, and it's working as expected. I am publishing with a local HTTP feed without issue.

Thanks for your time, and this refreshed project!

@Regenhardt Regenhardt added the enhancement New feature or request label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants