dlapiduz / certbot-s3front

Certbot CLI plugin for S3/CloudFront validation and installation
MIT License
584 stars 70 forks source link

"required or optional" prompt when trying to auto renew #21

Closed bradt closed 8 years ago

bradt commented 8 years ago

I'm trying to automate the cert renewal and installation with the following command:

AWS_ACCESS_KEY_ID="XXXXXXXXXXXXXXXXX" \
AWS_SECRET_ACCESS_KEY="XXXXXXXXXXXXXXXXXXXXXX" \
letsencrypt --agree-tos -a letsencrypt-s3front:auth \
--letsencrypt-s3front:auth-s3-bucket assets.bradt.ca \
-i letsencrypt-s3front:installer \
--letsencrypt-s3front:installer-cf-distribution-id XXXXXXXXXX \
-d assets.bradt.ca --renew-by-default --text

Unfortunately I'm still getting the following prompt:

Please choose whether HTTPS access is required or optional.
-------------------------------------------------------------------------------
1: Easy - Allow both HTTP and HTTPS access to these sites
2: Secure - Make all requests redirect to secure HTTPS access
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1

Any ideas how to get rid of it? Is there a CLI switch that I could set?

ChrisRut commented 8 years ago

Yes, try: --no-redirect

Rjs37 commented 8 years ago

or --redirect if you want the alternative

ChrisRut commented 8 years ago

@Rjs37 , Actually, I don't think it matters within the context of this module, because AFAICT this module does not affect the redirect settings of CloudFront, ViewerProtocolPolicy is not being updated on the update_distribution() call: https://github.com/dlapiduz/letsencrypt-s3front/blob/master/letsencrypt_s3front/installer.py#L70-L87

Rjs37 commented 8 years ago

Fair enough @ChrisRut, in that case pick whichever :D. Though it could be good practice to use your preferred option anyway, in-case the flag is taken into account at a later date.

bradt commented 8 years ago

Awesome, --no-redirect worked, thanks!