datalust / seq-tickets

Issues, design discussions and feature roadmap for the Seq log server
https://datalust.co/seq
96 stars 5 forks source link

Support wildcard certificates under Kestrel on Windows #2142

Closed nblumhardt closed 5 months ago

nblumhardt commented 5 months ago

Hi - I've just done a fresh install of SEQ on a Windows server, and I've setup the listening URL as https://seq.example.corp. I have a *.example.corp wildcard cert in the local machine / personal store. When I start the SEQ service, it stops straight away, and in the error logs show this:

System.InvalidOperationException: The requested certificate seq.example.corp could not be found in LocalMachine/My with AllowInvalid setting: True.\r\n at Microsoft.AspNetCore.Server.Kestrel.Https.CertificateLoader.LoadFromStoreCert(String subject, String storeName, StoreLocation storeLocation, Boolean allowInvalid)\r\n

Is there a way to tell it to use the wildcard rather than trying to match the certificate name? I would prefer not to have to issue a specific cert just for this. I tried using the seq-bindssl command, but it saying that it's not supported under Kestrel. Do I have to change to http.sys as per https://docs.datalust.co/docs/ssl?

C:\Users\pa009999>seq bind-ssl --thumbprint="<my wildcard cert thumbnail>"

Could not bind the certificate: The current value of the api.webServer setting is Kestrel. Kestrel loads certificates automatically from the Local Computer/Personal certificate store, and cannot be configured using the bind-ssl command.

Originally posted by @tspencer-all in https://github.com/datalust/seq-tickets/discussions/2140