Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Certbot /.well-known/acme-challenge

Tags:

Should I leave the /.well-known/acme-challenge always exposed on the server? Here is my config for the HTTP:

server {  listen 80;   location '/.well-known/acme-challenge' {     root        /var/www/demo;   }   location / {           if ($scheme = http) {             return 301 https://$server_name$request_uri;           }  } 

Which basically redirects all the requests to https, except for the acme-challenge (for auto renewal). My question: Is it alright to keep location '/.well-known/acme-challenge' always exposed on port 80? Or better to comment/uncomment it manually, when need to reissue the certificate? Are there any security issues with that?

Any advise or links to read for about the this location appreciated. Thanks!

like image 784
Ilya Avatar asked Jan 23 '17 09:01

Ilya


People also ask

What is the well known acme challenge?

The ACME CA challenges the client to host a random number at a random URL under /. well-known/acme-challenge on port 80. The CA verifies client control by issuing an HTTP GET request to that URL.

Where does Certbot store acme challenge?

If you want to use the http-01 challenge validation, make sure that Certbot can write to the challenge folder of the web server, usually located in /var/www/html/. well-known/acme-challenge.

Is Certbot an acme client?

Certbot. certbot is the granddaddy of all ACME clients.

What is letsencrypt challenge?

This challenge asks you to prove that you control the DNS for your domain name by putting a specific value in a TXT record under that domain name. It is harder to configure than HTTP-01, but can work in scenarios that HTTP-01 can't. It also allows you to issue wildcard certificates.


2 Answers

Acme challenge link only needed for verifying domain to this ip address

like image 91
Renjith Thankachan Avatar answered Oct 30 '22 04:10

Renjith Thankachan


You do not need to keep the token available once your certificate has been signed. However, there is not much harm in leaving it available either, as explained by a Certbot engineer:

The token is part of a particular challenge which is no longer active, from the ACME server's point of view, after the server has tried to validate it. It would reveal a little bit of information about how you get certificates, but should not allow someone else to issue certificates for your site or impersonate you.

like image 33
natevw Avatar answered Oct 30 '22 04:10

natevw