acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

Allow/Save --insecure for deploy-hooks and not issue

Open Hossy opened this issue 2 years ago • 1 comments

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

  1. Issue a cert.
  2. Deploy using a deploy-hook that requires --insecure to work (I'm using panos).
  3. 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.

Hossy avatar Jul 19 '22 23:07 Hossy

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.

Shourai avatar Dec 21 '23 14:12 Shourai