Re: [secdir] secdir review of draft-ietf-httpauth-basicauth-update-06
Julian Reschke <julian.reschke@gmx.de> Wed, 18 February 2015 22:19 UTC
Return-Path: <julian.reschke@gmx.de>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0E5371A1B5A; Wed, 18 Feb 2015 14:19:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham
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 UKaMTIMBJhJk; Wed, 18 Feb 2015 14:19:01 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 552D91A1B47; Wed, 18 Feb 2015 14:19:01 -0800 (PST)
Received: from [192.168.2.175] ([93.217.116.45]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MTSmp-1Xx51s40Ih-00SS56; Wed, 18 Feb 2015 23:18:48 +0100
Message-ID: <54E50FC3.9080708@gmx.de>
Date: Wed, 18 Feb 2015 23:18:43 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>, draft-ietf-httpauth-basicauth-update.all@tools.ietf.org
References: <874mqjd49v.fsf@alice.fifthhorseman.net>
In-Reply-To: <874mqjd49v.fsf@alice.fifthhorseman.net>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:P4Um3TMahQ08+sqXfbHSGNHKDCJb9mkvR8sfWMjat5uSt8fYj2d I3pQIRzf9knYc2MvCU/hS2PaHADInHKIpgBlpE+k7v9n6A7Ki/K7AyCfjwkPPXwluoDO4VE 9yJIkQQA/c5pKRyugQnxu3e0+CesVzl1cWQ+09IzlzyanpfWuG/2oASGDYr+SkXtUpaT1SF Qfm10b0SIDoVhOKyb5B4A==
X-UI-Out-Filterresults: notjunk:1;
Archived-At: <http://mailarchive.ietf.org/arch/msg/secdir/N5X13_ldFxzSzlXob2f9IqyY9nQ>
Cc: iesg@ietf.org, secdir@ietf.org
Subject: Re: [secdir] secdir review of draft-ietf-httpauth-basicauth-update-06
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/secdir/>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Feb 2015 22:19:06 -0000
Hi Daniel, thanks for the review. Feedback in-line. On 2015-02-18 09:15, Daniel Kahn Gillmor wrote: > ... > Should recommend strong password-hashing on the server side > ----------------------------------------------------------- > > The Security Considerations section acknowledges that passwords can be > stolen from servers, but does not encourage server operators to hash > stored passwords with a reasonable or strong algorithm. This document > may not be the place to provide normative guidance on how to store > passwords to mitigate the exposure of a password table, but perhaps a > brief mention and an informative reference would be useful? Many > systems (e.g. modern nginx and apache) use 1000 iterations of salted > MD5, but still support cleartext passwords, crypt(), and unsalted SHA-1, > which are all terrible. > > https://httpd.apache.org/docs/2.4/misc/password_encryptions.html > http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html#auth_basic_user_file > > an informative reference might point to the Password Hashing > Competition, which documents sensible rationales for why you should use > strong password hashing, and how to know it when you see it: > > https://password-hashing.net > > by comparison the digest draft has a lot more about how passwords should > be stored (even though Digest auth can offer only weaker protections for > the password store compared to Basic auth): > > https://tools.ietf.org/html/draft-ietf-httpauth-digest-13#section-5.2 > ... I would really like to avoid talking about threads that are generic to password-based authentication. Optimally, the security area would have a document that discusses exactly these kind of things so that other specs can reference that. Does something like this exist? Or do you want to propose concrete text? > Should recommend constant-time server-side comparisons > ------------------------------------------------------ > > Servers that implement basic auth should not leak information about > the stored password via timing of rejections. For example, a server > that stored cleartext passwords (which is a bad idea anyway) should > mechanically compare the entire string instead of bytewise comparisons. > The attack here is an attacker who guesses credentials a byte at a time, > by making 256 initial guesses and seeing which of them gets back a > rejection faster than the other (and iterates down the list). > > This might be less of an issue for reasonable (non-cleartext) password > storage, but if we're not requiring strong password hashing, we should > at least require constant time comparisons. Do you seriously believe that the time for a string comparison is relevant compared to the overhead of two network hops plus encapsulation into HTTP messages? > Should recommend padding the Authorization: response > ---------------------------------------------------- > > When used behind HTTPS as recommended, TLS hides the username and > password presented. However, it does not hide the length of the > username and password if the other parameters of the HTTPS request are > known. > > An active attacker who wants to learn the length of the victim's > username and password together for a particular basic auth realm could > force the user's browser to make HTTPS requests to a few different URLs > within the realm and see how large the packets are. > > This could be mitigated by including whitespace padding in the client's > Authorization: header itself up to some multiple of a blocksize (perhaps > 256B) to obscure the length. Actually, padding can happen anywhere in the message; it doesn't need to be in this header field. It's an interesting idea; have you checked whether existing User Agents do this? > UTF-8 security considerations by reference: is this OK? > ------------------------------------------ > > The Security Considerations section includes the UTF-8 security > considerations section by reference, but doesn't call out any specific > issues for implementers to be aware of. the NFC canonicalization draft Intentionally. > also has Security Considersations section, which is not included by > reference: > > https://tools.ietf.org/html/rfc5198#section-6 I'll add that. > Interaction with proxies? > ------------------------- > > There is only a passing mention of Proxy-Authenticate: and > Proxy-Authorization: headers, so one assumes that both mechanisms should > support this new auth-param. It's not clear to me whether there are any > additional security or privacy implications when this is addressed to > proxies compared to origin servers. I'm not aware of any. > Section 2.2 ("reusing credentials") talks about the URI path (presumably > for "WWW-Authenticate", but then mixes "Proxy-Authenticate" into the > middle of that commentary. It looks to me like "Proxy-Authenticate" is > not intended to be scoped by the URI path (there is no mention of "in > that space" in the sentence about Proxy-Authenticate in Section 2.2), > but this is kind of ambiguous. Clarification would be good. To be frank, I don't know. My best guess is that it works exactly the same, so I'll add "in that space" there as well. > Path matching? > -------------- > > Nothing in the security considerations section talks about the threat > that motivates path matching for determination of which realm to use. > It might be useful to spell this out explicitly: > > * A user agent that sends the Authorization: header to URLs outside the > authentication scope as described in Section 2.2 may leak the user's > credentials That applies to all schemes that use protection spaces and is mentioned in <http://greenbytes.de/tech/webdav/rfc7235.html#protection.spaces> already. > User Agent visibility and logout? > --------------------------------- > > Most RFCs don't talk at all about the human interface of the mentioned > tools. > > But this draft refers briefly to interaction between the user and the > User Agent (see step 1 on > https://tools.ietf.org/html/draft-ietf-httpauth-basicauth-update-06#page-6). > However, it provides no other guidance. There are several additional > guidelines that make basic authentication more acceptable from a privacy > and security point of view for a typical web browser User Agent: > > * user agents should indicate to the user when they are re-using the > user's authentication credentials as described in section 2.2 > (indicating the realm, authentication scope, and user-id?) They don't right now. Do you believe that requiring it will have any effect on existing UAs? > * user agents should not display the user's password anywhere by > default That sounds pretty obvious. > * user agents should make it straightforward for users to clear their > credentials for any <realm,authentication scope,user-id>. Define "straightforward". > https://tools.ietf.org/html/rfc7235#section-6.3 includes some of these > guidelines; perhaps this is another include-by-reference? All security considerations of RFC 7235 apply by definition, as this spec is using the framework defined by RFC 7235. I don't believe that we need to state this. > Other Considerations > ==================== > > Deployment chicken-and-egg > -------------------------- > > The server has no way of knowing that the client is trying to obey the > charset header. For the servers mentioned in that do user-agent Actually, it could apply heuristics. I header detection of UTF-8 is quire reliable. > sniffing, it's not clear how those servers could ever know to stop > relying on the user-agent, since the clients have no way of signalling > their intent to use UTF-8 for the Authorization header. If the servers > don't know when to start accepting UTF-8 from these clients, then the > clients also have no way of knowing when they should switch over > themselves. This strikes me as a recipe for stalled adoption, since > "user agents in the latter group" (from section B.3) will never use > UTF-8, even if they know about it. I don't see why the server can't just start accepting UTF-8 right away. > If we want to avoid the adoption stall, we might need more forceful > language to discourage user agents from trying to guess whether they are > in "the latter group" Do you believe that will affect what existing sites do today? > User IDs with Colons > -------------------- > > The draft says "a user-id containing a colon character is invalid" -- > why not say that "the user-id MUST NOT contain a colon character", as it > already does for control characters? I don't think it really matters how we say it (both have exactly the same normative power), but I agree it would be better for consistency. > Nits > ==== > > * in B.3, "Authentication on these sites will stop to work" should be > "Authentication on these sites will stop working" Ok. Best regards, Julian
- [secdir] secdir review of draft-ietf-httpauth-bas… Daniel Kahn Gillmor
- Re: [secdir] secdir review of draft-ietf-httpauth… Julian Reschke
- Re: [secdir] secdir review of draft-ietf-httpauth… Julian Reschke
- Re: [secdir] secdir review of draft-ietf-httpauth… Daniel Kahn Gillmor
- Re: [secdir] secdir review of draft-ietf-httpauth… Julian Reschke
- Re: [secdir] secdir review of draft-ietf-httpauth… Daniel Kahn Gillmor
- Re: [secdir] secdir review of draft-ietf-httpauth… Julian Reschke
- Re: [secdir] [http-auth] secdir review of draft-i… Bjoern Hoehrmann
- Re: [secdir] [http-auth] secdir review of draft-i… Kathleen Moriarty
- Re: [secdir] [http-auth] secdir review of draft-i… Kathleen Moriarty
- Re: [secdir] [http-auth] secdir review of draft-i… Roy T. Fielding
- Re: [secdir] [http-auth] secdir review of draft-i… Daniel Kahn Gillmor
- Re: [secdir] [http-auth] secdir review of draft-i… Roy T. Fielding
- Re: [secdir] secdir review of draft-ietf-httpauth… Julian Reschke
- [secdir] secdir review of draft-ietf-httpauth-bas… Julian Reschke
- [secdir] [http-auth] secdir review of draft-ietf-… Julian Reschke
- Re: [secdir] secdir review of draft-ietf-httpauth… Julian Reschke