[http-state] Fwd: Gen-ART LC review of draft-ietf-httpstate-cookie-18

Peter Saint-Andre <stpeter@stpeter.im> Mon, 29 November 2010 19:37 UTC

Return-Path: <stpeter@stpeter.im>
X-Original-To: http-state@core3.amsl.com
Delivered-To: http-state@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id E47CF3A6C35 for <http-state@core3.amsl.com>; Mon, 29 Nov 2010 11:37:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.438
X-Spam-Level:
X-Spam-Status: No, score=-101.438 tagged_above=-999 required=5 tests=[AWL=-1.139, BAYES_00=-2.599, MANGLED_LIPS=2.3, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JN8R4EFJVirs for <http-state@core3.amsl.com>; Mon, 29 Nov 2010 11:37:45 -0800 (PST)
Received: from stpeter.im (stpeter.im [207.210.219.233]) by core3.amsl.com (Postfix) with ESMTP id 323233A6C10 for <http-state@ietf.org>; Mon, 29 Nov 2010 11:37:43 -0800 (PST)
Received: from dhcp-64-101-72-234.cisco.com (dhcp-64-101-72-234.cisco.com [64.101.72.234]) (Authenticated sender: stpeter) by stpeter.im (Postfix) with ESMTPSA id 4D49C4009B; Mon, 29 Nov 2010 12:49:56 -0700 (MST)
Message-ID: <4CF4014B.30204@stpeter.im>
Date: Mon, 29 Nov 2010 12:38:51 -0700
From: Peter Saint-Andre <stpeter@stpeter.im>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6
MIME-Version: 1.0
To: Discuss HTTP State Management Mechanism <http-state@ietf.org>
X-Enigmail-Version: 1.1.1
OpenPGP: url=http://www.saint-andre.com/me/stpeter.asc
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha1"; boundary="------------ms040600030308070507080805"
Cc: Richard Barnes <rbarnes@bbn.com>
Subject: [http-state] Fwd: Gen-ART LC review of draft-ietf-httpstate-cookie-18
X-BeenThere: http-state@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discuss HTTP State Management Mechanism <http-state.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/http-state>
List-Post: <mailto:http-state@ietf.org>
List-Help: <mailto:http-state-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Nov 2010 19:37:47 -0000

Forwarding to http-state@ietf.org to keep the WG in the loop...

/psa

-------- Original Message --------
Subject: Gen-ART LC review of draft-ietf-httpstate-cookie-18
Date: Sun, 28 Nov 2010 15:47:49 -0500
From: Richard L. Barnes <rbarnes@bbn.com>
To: gen-art@ietf.org
CC: draft-ietf-httpstate-cookie@tools.ietf.org, ietf@ietf.org

I am the assigned Gen-ART reviewer for this draft. For background on
Gen-ART, please see the FAQ at
<http://wiki.tools.ietf.org/area/gen/trac/wiki/GenArtfaq>.

Please resolve these comments along with any other Last Call comments
you may receive.

Document: draft-ietf-httpstate-cookie-18
Reviewer: Richard Barnes
Review Date: 28 November 2010
IETF LC End Date: 2 December 2010
IESG Telechat date: (unknown)

Summary: This document is close to being ready for publication, but
could benefit from several clarifications and upgrades to requirements
language.  In particular, user agent security requirements need to be
slightly stronger.


Major issues:

[S8.6] Many of these integrity issues are caused by user agents
accepting cookies from outside the context where they would send them,
in particular with the Secure and Path attributes.  It seems like this
document, in specifying the desired/proper behavior of user agents,
should require behavior that would mitigate these attacks.  In direct
parallel to the handling of the Domain attribute:
1. Set-Cookies with the Secure flag should only be accepted over secure
channels
2. Set-Cookies with the Path attribute set should only be accepted if
the path value matches the request-uri of the request
(That is, update Steps 7 and 8 of S5.3 to match Steps 6 and 9/10) I
realize that as long as there are legacy user agents out there, servers
can't rely on these protections, but if any user agents implement these
requirements, then fewer transactions will be subject to these attacks.


Minor issues:

[General] It would be very helpful if this document had a summary of
changes from RFC 2965, and possibly from RFC 2109 as well.  In
particular, the fate of the Cookie2 and Set-Cookie2 header fields is a
little unclear.  If the intent of obsoleting 2965 is to deprecate the
use of these fields, it would be good to state that explicitly.

[General] It's unclear where this document fits on the scale of
"documenting existing behavior" to "describing proper behavior".  It
seems like the focus should be on documenting a proper behavior that is
maximally compatible with existing behavior.  The document should try to
clearly distinguish when it is talking about the desired behavior vs.
the existing behavior.  The former should be subject to strong
requirements "MUSTs" while the latter will have no requirements at all.

[S2.3 P2] Is the request-host the same as the value of the HTTP/1.1 Host
header field?

[S3 P4] It seems like there should be an all-caps requirement here,
e.g., that "Origin servers MUST NOT fold multiple Set-Cookie header
fields into a single header field".

[S4.1.1 P1] It seems like it should be MUST NOT instead of SHOULD NOT:
"Servers MUST NOT send Set-Cookie headers that fail to conform to the
following grammar:".

[S4.1.1] Is there a reason that path-value is so unconstrained?  Based
on S5.1.4, I would have expected it to be abs_path (from RFC 2396).

[S4.1.1 P5] Seems like the SHOULD NOT should be "MUST NOT produce more
than one attribute with the same name".

[S4.1.1 P6] Either this should be a "MUST NOT" or it should define which
a user agent MUST accept -- or both.  The third paragraph of 4.1.2 seems
to imply that the user agent MUST accept the last one (in order of
appearance in the HTTP header).

[S4.1.1 P8] Again, "SHOULD" -> "MUST"

[S8.1] I find this paragraph vague and confusing.  I would suggest
separating protocol vulnerabilities from implementation vulnerabilities.
 Suggested text:
"
Transport-layer encryption, such as that employed in HTTPS, is
insufficient to prevent a network attacker from obtaining or altering a
victim's cookies.  The cookie protocol itself allows cookies to be
accessed or modified from other contexts (subdomains, subordinate paths,
or other ports) and some user agents do not even provide the separations
required by the protocol.  (See "Weak Confidentiality" and "Weak
Integrity", below).
"


Nits/editorial comments:

[S2.1 P3 "not intended to be performant"] I'm not sure the word
"performant" has the meaning that seems to be intended here.  (The
definitions I'm finding indicate "one who performs".)  Should probably
expand to "not intended to require the performance of specific steps".

[S3 P2 "the default scope"] The notion of the "scope" of a cookie was
only briefly introduced in the Introduction.  Could be good to remind
the reader in the first paragraph.  "... the user agent will return in
future HTTP requests." -> "... the user will return in future HTTP
requests that are within the scope of the cookie".

[S4.1.1 P9] The paragraph as it stands is kind of useless -- what am I
supposed to do with this information?  Suggest changing to:
"
Some user agents represent dates using 32-bit UNIX time_t values.  These
user agents will process dates after January 19, 2038 incorrectly.
Origin servers SHOULD NOT set expiration times later than this time.
"

[S4.1.2] The phrase "Non-Normative" seems inapt here.  Suggest changing
the heading to something like "Summary of Semantics".

[S4.1.2.3 P1 "... only to the origin server"] It would be helpful to
clarify here by adding "... and not any sub-domains".

[S4.1.2.6] It could be helpful here to note that the "HttpOnly"
attribute is not the opposite of the "Secure" attribute (which one might
initially imagine as "HttpsOnly"), and thus that setting them both is
not a contradiction.

[S5.1.1] Just as in Section 5.2, it would help to explain here why
you're not just using the rfc1123 grammar (from above and RFC 2616
S3.1.1).  E.g.:
"
NOTE: This grammar is more general than the sane-cookie-date grammar
used in the definition of the Set-Cookie header. This allows user agents
to interoperate with servers that do not implement this specification.
"

[S5.1.1] It would be helpful to introduce the found-* flags at the
beginning of step 2.

[S5.1.1 Step5] "the cookie-date if" -> "the cookie-date if any of the
following conditions are true:"

[S5.1.1 Step5] I don't understand why the year 1601 is a cutoff here.
Wouldn't any past date be usable to kill a cookie?

[S8.2] It might be helpful to have a reference or two here, e.g.,
explaining XSRF attacks and mitigations.


_______________________________________________
Ietf mailing list
Ietf@ietf.org
https://www.ietf.org/mailman/listinfo/ietf