Open Stan-Tastic opened 3 years ago
IIS bindings update should be completely independant from the validation mode (HTTP-01 webroot, HTTP-01 standalone, or DNS-01).
Could you please provide the error logs ?
BTW, verbose mode is performed by using the -Debug version of the MSI, and logs are in %programdata%/wincertes
There was not much regarding debug, but I think I know what's wrong. Few issues, actually (let me know if you want me to create separate tickets for each:
If I first obtain the certificate without -b option specified, and then re-run wincertes with -b option, the binding will not get updated (the certificate is already issued, and it seems that wincertes just quits without checking if the binding is active.
If there is more than 1 SSL binding for a website (e.g. different ports), only the first one is updated with new certificate.
I haven't tested this: I noticed that the Task Scheduler item is created with just -d option. I assume this means the rest of settings are taken from saved state (as can be seen with wincertes --show). However, binding is a saved option, while the domain is not - so what will happen if my webserver have "n" different sites (n>1), with a separate certificate for each of them? How will wincertes "know" which binding to update? Is it even possible to get different certs for different sites on the same IIS installation?
Ad.1. Fair enough, although I think this would improve usability. Ad.2. Can you please elaborate on logic used by the software to update bindings? Ad.3. Thanks, I'll try that.
The logic for the IIS bindings is the following, executed after the certificate has been issued from the ACME server:
So if you want to listen on non-standard port, execute first WinCertes and let it do the bindings by default, and then change the configuration to the desired ports, and/or add bindings for desired SANs/ports. Upon renewal the bindings will be updated automatically using the new settings.
As far as I understand, WinCertes is able to update IIS bindings provided that it uses IIS HTTP-01 validation mode. However, I have an IIS server that does a bunch of shenanigans (like ADFS redirects), and Wincertes fails validation:
Failed to register and validate order with CA: Could not validate HTTP challenge: Multiple errors occured. See sub problems
(by the way, is it possible to enable some verbose mode? I could not find how)
With --standalone, tested on port 55555 (setup on Keyon ACME server) all goes fine: Generated orders and validated challenges for domains:
However, I have to manually update bindings in IIS (and I guess this will be necessary on every renewal). Would it be possible to streamline that?