Re: [Acme] http-01 and jws thumbnail

Jacob Hoffman-Andrews <jsha@eff.org> Tue, 16 July 2019 18:39 UTC

Return-Path: <jsha@eff.org>
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 A6A67120D3B for <acme@ietfa.amsl.com>; Tue, 16 Jul 2019 11:39:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.002
X-Spam-Level:
X-Spam-Status: No, score=-7.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=eff.org
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 c5jlnc5tbokh for <acme@ietfa.amsl.com>; Tue, 16 Jul 2019 11:39:55 -0700 (PDT)
Received: from mail2.eff.org (mail2.eff.org [173.239.79.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 85CE9120D37 for <acme@ietf.org>; Tue, 16 Jul 2019 11:39:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=eff.org; s=mail2; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version: Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=18JjLo2F0beCgwm3WYql8O71/D24CYDl+bjTHcCFT00=; b=MDGve0eIMqrAVlOArYY9bWo4a7 C+SIB/szrEO366/JRoinOA6tzcFyZuxaScbuLDtAzEAt4gqqAmzdhvGjoaWjM6F9ASrRI+Q4l6VBv O9/vTvoJQCnnsDUrjMvDCjSduPkyPwZvQ9XV6YROB6gi6x/vctGloG/+xN5TWn16EQow=;
Received: ; Tue, 16 Jul 2019 11:39:48 -0700
To: Alan Doherty <ietf@alandoherty.net>, Stefan Eissing <stefan.eissing@greenbytes.de>, acme@ietf.org
References: <41AA2F57-A9B7-4A12-9D74-432528BFEBF6@greenbytes.de> <E1hnSI4-0000hg-8u@bigsvr.orionnetworks.ie>
From: Jacob Hoffman-Andrews <jsha@eff.org>
Message-ID: <d4fa1127-82a2-aefd-3467-ff2f54c67e45@eff.org>
Date: Tue, 16 Jul 2019 11:39:47 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2
MIME-Version: 1.0
In-Reply-To: <E1hnSI4-0000hg-8u@bigsvr.orionnetworks.ie>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/acme/w-U7xsssKsFR5-Q5WZKcwNAg7IY>
Subject: Re: [Acme] http-01 and jws thumbnail
X-BeenThere: acme@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 16 Jul 2019 18:39:57 -0000

> At 11:55 16/07/2019  Tuesday, Stefan Eissing wrote:
>> A user of my Apache ACME client asked about a feature where the security implications are not clear to me:
>>
>> - he has several server instances that may receive the CA's http-01 challenge request. He therefore would like all servers to answer to all challenges like the solution proposed by acme.sh: <https://github.com/Neilpang/acme.sh/wiki/Stateless-Mode>
>>
>> server {
>> ....
>>   location ~ ^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$ {
>>     default_type text/plain;
>>     return 200 "$1.6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd";
>>   }
>>
>> which sends the thumbnail back to anyone asking. Is this an example to follow? It feels very open...
I can't find anything terribly wrong with it. The two most important 
things are (a) it binds to the account key fingerprint, so it doesn't 
let some other person get a certificate for you, and (b) it filters by a 
narrow set of valid characters, which prevents this from being an XSS 
vector 
(https://labs.detectify.com/2018/09/04/xss-using-quirky-implementations-of-acme-http-01/).

Still, it seems like other clients get along fine with a stateful mode, 
which narrows the realm of possible unforeseen problems with this approach.