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

Configure certificate by thumbprint #4385

Closed
natemcmaster opened this issue Feb 9, 2018 · 8 comments
Closed

Configure certificate by thumbprint #4385

natemcmaster opened this issue Feb 9, 2018 · 8 comments
Labels
affected-very-few This issue impacts very few customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions severity-nice-to-have This label is used by an internal tool task
Milestone

Comments

@natemcmaster
Copy link
Contributor

Would be nice if we could configure server certificates via thumbprint + store name.

Example usage in appsettings.json:

{
  "Kestrel": {
    "Endpoints": {
      "Myendpoint2": {
        "Url": "https://+:443",
        "Certificate": {
          "Store": "CurrentUser/My",
          "Thumbprint": "52A477BBEDE8DFDEB699106D5FFB8FE89F9BF790"
        }
      }
    }
  }
}
@Tratcher
Copy link
Member

Tratcher commented Feb 9, 2018

And mirror that in UseHttps. We'll see what the preview1 feedback is.

@kyschouv
Copy link

kyschouv commented Jul 6, 2018

I'd like to request this as well. We had a difficult-to-debug situation recently where Kestrel was loading the wrong certificate because the subject name matched the one we wanted (because Fiddler had generated one with the same subject).

@thomasmktong
Copy link

May I know if there is any update on this issue?

@natemcmaster natemcmaster transferred this issue from aspnet/KestrelHttpServer Dec 4, 2018
@natemcmaster natemcmaster added this to the Backlog milestone Dec 4, 2018
@blowdart
Copy link
Contributor

blowdart commented Dec 4, 2018

The problem with thumbprints is it'll allow you to choose an expired certificate. Using subject names is better because it will pull a valid one (assuming it exists), with the longest validity period. Thumbprint selection should die.

@natemcmaster
Copy link
Contributor Author

So, close as wontfix?

@blowdart
Copy link
Contributor

blowdart commented Dec 5, 2018

I wouldn't go that far, but I wouldn't view this as blocking as you can always resolve the cert yourself before binding kestrel. Maybe address by docs?

@Looooooka
Copy link

ok this really should be added. configuring with subject is a pain especially in azure scenarios where again thumbprint is shown...
in fact add Thumbprint and certificateserialnumber because having these options in code and config files has pretty much been "normal" in all net framework options.

@jkotalik jkotalik added affected-very-few This issue impacts very few customers severity-nice-to-have This label is used by an internal tool task labels Nov 12, 2020 — with ASP.NET Core Issue Ranking
@davidfowl
Copy link
Member

It's @blowdart's call. This is bad practice within Microsoft and you can already do this today with code. The question is should we make it easier via configuration and currently, that answer is no.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 27, 2021
@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
affected-very-few This issue impacts very few customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions severity-nice-to-have This label is used by an internal tool task
Projects
None yet
Development

No branches or pull requests

9 participants