Re: [Acme] Host Selection during Challenge

Patrick Figel <patrick@figel.email> Fri, 23 December 2016 19:11 UTC

Return-Path: <patrick@figel.email>
X-Original-To: acme@ietfa.amsl.com
Delivered-To: acme@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 246D5129671 for <acme@ietfa.amsl.com>; Fri, 23 Dec 2016 11:11:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=figel.email
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k1BaGhxJ6MIE for <acme@ietfa.amsl.com>; Fri, 23 Dec 2016 11:11:17 -0800 (PST)
Received: from mail-wj0-x231.google.com (mail-wj0-x231.google.com [IPv6:2a00:1450:400c:c01::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E505C12007C for <acme@ietf.org>; Fri, 23 Dec 2016 11:11:16 -0800 (PST)
Received: by mail-wj0-x231.google.com with SMTP id tq7so21679332wjb.0 for <acme@ietf.org>; Fri, 23 Dec 2016 11:11:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=figel.email; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=NoIzo3L+jIdoBM1FiVBE3OwGUo0xzBbIjyN0FNXb4n4=; b=caTMvsGCKSPeOY3RCErTPMqJekjAAVQymizbWsd1Q+nyHep82K5FU3E0emEPkzBxzG GjxuZQuJUA30zbzXbqQu6ndmGoSc+s8z9HE+Fzh1Qn21zEyNTdx5Mi8VMqRwp8poufBW w8njTf7XdxmK0UuNHQSeuw4GOjZU5+Ur8Kmvga41klHbOcUiTgGktMrb6icKlQcfY544 IiK/jrlAIp+7CMsiTs+oBvxxCmLYJeEtk0poeJsrGjJq2SCLtZlY4q0HxZ0MEmW6aUrG PJL78VBnDNOpj8mbZ2C/23iKA0AN3ptGOqJaNZfGcnsmbXeK5gLRMG7ECN8ht9EExDQo 2gaA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NoIzo3L+jIdoBM1FiVBE3OwGUo0xzBbIjyN0FNXb4n4=; b=ibL+MKPK/fkQ8gQIvX+eV4MR8VVOi4cAtfd2zsbbw5Db2KOfSohsdLW7E3l2Juk8cN NZ15s4QhBrsX+KlX8YtOP0t8TZx913lFxoDXMub32sHarMG3rGmzM68O3aYAIp/EFkmt +SEc1wukn8iFGlM/QJwQAxjATbPAEcD6X8k0znyeB2+5iLyW6EithEdQLBgAC9TnKbZv yUurFQYU7N6vaSFwFqESCYeQmnOmjx07NxLByWHqzuoBAzIMpWLeZUBVLuUIT360IZs0 GgyIQYKo/wWMc2my2PlS2E4bPmM00m0Czwsvomft/vJxrLWPSJPX0B2BAlWGZywZQBhu ti8g==
X-Gm-Message-State: AIkVDXKgHGfEBc+i9yqEGLznYBIEenSlg87p9Qc8qX1r2WOsQ860BHUxAJMC8IyMNxptNw==
X-Received: by 10.194.69.230 with SMTP id h6mr16521286wju.63.1482520275264; Fri, 23 Dec 2016 11:11:15 -0800 (PST)
Received: from Patricks-MBP.home.pf.vc (213-47-56-124.cable.dynamic.surfer.at. [213.47.56.124]) by smtp.gmail.com with ESMTPSA id jz1sm16401671wjc.38.2016.12.23.11.11.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Dec 2016 11:11:13 -0800 (PST)
To: DaKnOb <daknob.mac@gmail.com>, acme@ietf.org
References: <6A20CF14-E191-45A3-AF51-D28729CBFFAF@gmail.com>
From: Patrick Figel <patrick@figel.email>
Message-ID: <aeaae9d9-3ddb-5854-856d-fcf925e08441@figel.email>
Date: Fri, 23 Dec 2016 20:11:12 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <6A20CF14-E191-45A3-AF51-D28729CBFFAF@gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/acme/q6I5o93ErBIQNRaNVsUMNYnIfLg>
Subject: Re: [Acme] Host Selection during Challenge
X-BeenThere: acme@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Automated Certificate Management Environment <acme.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/acme>, <mailto:acme-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/acme/>
List-Post: <mailto:acme@ietf.org>
List-Help: <mailto:acme-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/acme>, <mailto:acme-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Dec 2016 19:11:19 -0000

On 23/12/2016 19:20, DaKnOb wrote:
> Hello, this is my first e-mail in this list and after spending around
> 30 minutes in the archives I could not find this issue discussed
> previously. Excuse me if this is a double-post, and if it is, can you
> kindly help me find it in the archives?

This was previously discussed here[1], added to the spec here[2], and
later removed[3]. The discussion seems to have stalled, but I don't
think a consensus has been reached yet. It would probably make sense to
continue the discussion in that thread.


> Currently in the ACME protocol (at least as it is used by Let’s
> Encrypt), when requesting a certificate with one or more domain
> names, the verifier (CA) will resolve the hostname and then connect
> to the server to verify the request is authentic (at least in HTTP
> and TLS SNI modes).
> 
> In a multi server set up, where there are two or more servers, the
> verifier will pick one at random and connect to, following the normal
> DNS procedure. The currently recommended way to work around this is
> to configure every server except one, say X, to proxy the request to
> that one server, X, where the ACME client is running from. Then, the
> certificate will have to be distributed to the other servers
> manually, or, in general, by other means.

Some other options would include using http-01 with HTTP redirects to a
centralized validation server and using dns-01.

(dns-01 is often dismissed because most people think giving your web
servers the ability to modify DNS records is not the best idea. I agree,
but this is not strictly necessary since you can use a CNAME record to
point to a separate DNS zone dedicated to solving ACME challenges and
give your web servers access only to that zone. See [4] for a tool built
with this in mind. It's probably fair to say that this still adds
complexity compared to http-01.)

> I think it would help to provide means of supplying an IP Address (v4
> or v6) along with every other detail, and then let the verifier (CA)
> connect to this address only, assuming of course it is present in the
> DNS records.
> 
> This will allow the server operator to issue a different certificate
> per server, removing the overhead of transferring certificates and
> keys (in possibly insecure ways), removing complexity (no need for
> reverse proxying, mechanisms to deploy the certificate), and
> enhancing automation (the ACME client will be able to renew each
> certificate automatically in every server and not require user
> interaction or complicated systems).

Worth pointing out that this is all possible today, some of it is just
rather complex and requires a certain amount of coordination. I guess
the key question here is whether we want complexity on the CA/spec side
(which probably still wouldn't cover each possible scenario) or leave it
up to clients to come up with solutions.

> Now if the DNS response of the verifier is not consistent, and not
> always replies with the same answer, such as in cases of GeoDNS or
> load-balancing DNS, this system will not work, and the server
> operator will have to add a special case for the Autonomous System or
> IP Addresses of the CA, which will include all IPs.

This is something that most CAs (hopefully) will want to avoid. Measures
against domain validation requests being spoofed might include a
geographically diverse set of validation servers, potentially with
unpredictable IPs or A/S'. As an example, Let's Encrypt does not publish
the IP addresses of their validation servers in order to prevent the
client ecosystem from building solutions that rely on them being static.

> Thank you for your time and please let me know what you think. Also,
> sorry if this is a duplicate and this idea has been discussed
> before.

[1]:
https://mailarchive.ietf.org/arch/search/?email_list=acme&gbt=1&index=ZzgtWzZICj_HQ19geObENv12Lv8
[2]: https://github.com/ietf-wg-acme/acme/pull/82
[3]: https://github.com/ietf-wg-acme/acme/pull/138
[4]: https://github.com/joohoi/acme-dns