acme.sh
acme.sh copied to clipboard
Allow/Save --insecure for deploy-hooks and not issue
When needing to use --insecure
on a deploy-hook because your internal API endpoint uses a self-signed certficiate, the --insecure
flag doesn't save to the config so it is reused upon renewal. If --insecure
is enabled on --issue
or --renew
, then it opens the CA communication up to man-in-the-middle attacks.
Steps to reproduce
- Issue a cert.
- Deploy using a deploy-hook that requires
--insecure
to work (I'm using panos). - Force a renewal (without
--insecure
specified here; we don't want to connect insecurely to the CA).
Result: Certificate renewal succeeds, but deployment fails because the API endpoint uses a self-signed certificate.
Reviewing the code, --insecure
is only evaluated for saving in the account config and should be part of the deploy-hook config or certificate config.
This would be nice to have.
However to circumvent this you could export HTTPS_INSECURE=1
.
The ACME script checks for that variable, either set from --insecure
or from your enviroment.
Admittedly, this will cause everything else to be also submitted insecurely.