Subject: Re: [websec] Strict-Transport-Security syntax redux

From: =JeffH <[email-masked]>
Date: Thu, 29 Dec 2011 17:01:49 -0800

Adam Barth noted:
 >
 > I would also define the precise requirements for parsing all possible
 > input sequences, but I understand that's not fashionable.

By that, you are suggesting specification of parsing algorithms as done in 
RFC6265 "HTTP State Management Mechanism", yes?

=JeffH

---

From: Adam Barth <[email-masked]>
Date: Thu, 29 Dec 2011 17:22:13 -0800

> RFC6265 "HTTP State Management Mechanism", yes?

I actually think what we're doing for CSP is slightly better:

http://www.w3.org/TR/CSP/#policies

Adam

---

From: "Roy T. Fielding" <[email-masked]>
Date: Thu, 29 Dec 2011 20:11:27 -0800

> http://www.w3.org/TR/CSP/#policies

Hmm, that algorithm breaks on 

   foo;;bob

which is allowed by the associated ABNF.  *shrug*

I don't think I'll ever understand why you keep promoting Ian's
mantra on specs being written as algorithms.  The algorithms that
you end up placing in the specs have more bugs than the code
found in the actual implementations, and they aren't any more
formal than the ABNF.

....Roy

---

From: Adam Barth <[email-masked]>
Date: Thu, 29 Dec 2011 22:09:23 -0800

> which is allowed by the associated ABNF.  *shrug*

I'm not sure I understand what you think breaks about the algorithm.
I've restricted the loop to non-empty tokens, which hopefully
addresses your concern.

> found in the actual implementations, and they aren't any more

The problem is that the ABNF simply doesn't define how to handle error
conditions.  At least with algorithms they define the behavior.  If
the definition is wrong or has bugs, we can fix those bugs.
Eventually the process converges to a correct definition of the
behavior.

Adam