Re: [kitten] SASL OAuth: Next Steps
Chris Newman <chris.newman@oracle.com> Thu, 05 January 2012 01:55 UTC
Return-Path: <chris.newman@oracle.com>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 31DB01F0C49 for <kitten@ietfa.amsl.com>; Wed, 4 Jan 2012 17:55:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.046
X-Spam-Level:
X-Spam-Status: No, score=-106.046 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_MISMATCH_COM=0.553, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6qTEE2mjKm2V for <kitten@ietfa.amsl.com>; Wed, 4 Jan 2012 17:55:31 -0800 (PST)
Received: from brmea-mail-1.sun.com (brmea-mail-1.Sun.COM [192.18.98.31]) by ietfa.amsl.com (Postfix) with ESMTP id 7848E1F0C41 for <kitten@ietf.org>; Wed, 4 Jan 2012 17:55:31 -0800 (PST)
Received: from brmsunmail1-sfbay.uk.sun.com ([10.79.11.100]) by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id q051tSed023945; Thu, 5 Jan 2012 01:55:28 GMT
Received: from gotmail.us.oracle.com (gotmail.us.oracle.com [10.133.152.174]) by brmsunmail1-sfbay.uk.sun.com (8.14.4+Sun/8.14.4/ENSMAIL,v2.4) with ESMTP id q051tRZr065179; Thu, 5 Jan 2012 01:55:28 GMT
MIME-version: 1.0
Content-transfer-encoding: 7bit
Content-disposition: inline
Content-type: text/plain; CHARSET="US-ASCII"; format="flowed"
Received: from [10.145.239.205] (nifty-silver.us.oracle.com [10.145.239.205]) by gotmail.us.oracle.com (Oracle Communications Messaging Exchange Server 7u5-4.03 64bit (built Oct 25 2011)) with ESMTPA id <0LXA0016VYOAX000@gotmail.us.oracle.com>; Wed, 04 Jan 2012 17:55:27 -0800 (PST)
Date: Wed, 04 Jan 2012 17:55:22 -0800
From: Chris Newman <chris.newman@oracle.com>
To: Tim Showalter <timshow@yahoo-inc.com>, kitten@ietf.org
Message-id: <C0B5568F50F6582F8EE6E4BA@96B2F16665FF96BAE59E9B90>
In-reply-to: <4F04E442.4000702@yahoo-inc.com>
References: <999913AB42CC9341B05A99BBF358718DE38797@FIESEXC035.nsn-intra.net> <4F04E442.4000702@yahoo-inc.com>
X-Mailer: Mulberry/4.0.8 (Mac OS X)
Subject: Re: [kitten] SASL OAuth: Next Steps
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/kitten>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Jan 2012 01:55:32 -0000
We attempted to use HTTP syntax for the DIGEST-MD5 SASL mechanism. I believe it was one of the reasons that mechanism was a failure. While there's nothing apparently wrong with HTTP headers as normally used, the legal syntactic variations for semantically identical headers are unbounded. Not only is white-space variable, but line folding can get complex, especially when combined with 2047 encoding. Also, charsets are a mess (iso8859-1 or UTF-8 or RFC 2047?). And then there's the hidden side-effects of the legacy ABNF "#" operator used by HTTP syntax. Having a SASL parser call out to a header parser would be poor security design, because every line of code is an additional potential security vulnerability (especially prior to authentication) and a lot of code is needed for a 100% correct header parser. So I think it's actually important for a SASL mechanism to not accept arbitrary header syntax. It's probably easier to specify a constrained JSON syntax than a constrained subset of header syntax (disallowing all the unnecessary syntax variations so a strict parser is very simple), but either of those options would address the syntax problems encountered by the DIGEST-MD5 SASL mechanism. I concur with Tim's point that if we do a JSON syntax it ought to be algorithmically mapped from HTTP header fields. - Chris --On January 4, 2012 15:44:02 -0800 Tim Showalter <timshow@yahoo-inc.com> wrote: > On 12/20/11 1:36 AM, Tschofenig, Hannes (NSN - FI/Espoo) wrote: >> I would need your feedback on the following important design decision. >> Currently, the OAuth messages are encoded as HTTP headers and Leif had >> suggested to instead use a JSON encoding. > >> --------------- >> GET / HTTP/1.1 >> Host: imap.example.com >> Authorization: BEARER "vF9dft4qmTc2Nvb3RlckBhbHRhdmlzdGEuY29tCg==" >> --------------- >> >> A possible JSON based representation would be: >> --------------- >> {"token-type":" BEARER", >> "token":" vF9dft4qmTc2Nvb3RlckBhbHRhdmlzdGEuY29tCg=="} >> --------------- >> In my made-up example I define two attributes: a token container and a >> token type attribute. The accessed resource is most likely in the >> protected token itself and is additionally carried in the underlying >> transport mechanism and therefore not needed again. > > I much prefer to leverage the HTTP headers as the format is already > defined and additional fields map naturally into the SASL profile. But > if we're going down that route, I would suggest that the JSON fields be > mapped identically to the header fields, like this: > > {"authorization":["BEARER" "vF9dft4qmTc2Nvb3RlckBhbHRhdmlzdGEuY29tCg=="]} > > The "user" and "host" arguments are omitted from your JSON examples, but > are helpful for discovery cases, like the IMAP server that is speaking to > unconfigured clients, where the authentication credentials can come from > multiple "realms" depending on the user involved. In your JSON notation, > the equivalent thing might be > > {"user":"user@example.com", > "host":"imap.example.com", > "authorization":{"token-type":"BEARER" > "token":"........."}} > > Anyway, I still like just putting an HTTP thing in there. The parser > isn't that hard to write, and it means one fewer mapping in the world. > It's not as pretty, but I think it's much less work to specify it, and to > maintain the links between the specs. > > I'm afraid that I have not followed discussions on discovery. I would > prefer to not make SASL any more different from HTTP OAuth 2 than is > required to get the job done. If we can steal others' discovery work, > great! > > Tim > _______________________________________________ > Kitten mailing list > Kitten@ietf.org > https://www.ietf.org/mailman/listinfo/kitten >
- [kitten] SASL OAuth: Next Steps Tschofenig, Hannes (NSN - FI/Espoo)
- Re: [kitten] SASL OAuth: Next Steps Peter Saint-Andre
- Re: [kitten] SASL OAuth: Next Steps William Mills
- Re: [kitten] SASL OAuth: Next Steps Simon Josefsson
- Re: [kitten] SASL OAuth: Next Steps Hannes Tschofenig
- Re: [kitten] SASL OAuth: Next Steps William Mills
- Re: [kitten] SASL OAuth: Next Steps Hannes Tschofenig
- Re: [kitten] SASL OAuth: Next Steps Tim Showalter
- Re: [kitten] SASL OAuth: Next Steps Chris Newman
- Re: [kitten] SASL OAuth: Next Steps Russ Allbery
- Re: [kitten] SASL OAuth: Next Steps Tim Showalter
- Re: [kitten] SASL OAuth: Next Steps William Mills
- Re: [kitten] SASL OAuth: Next Steps William Mills
- [kitten] newbie question... William Mills
- Re: [kitten] newbie question... Nico Williams
- Re: [kitten] newbie question... Luca Frosini
- Re: [kitten] SASL OAuth: Next Steps Hannes Tschofenig
- Re: [kitten] SASL OAuth: Next Steps Florian Zeitz
- Re: [kitten] SASL OAuth: Next Steps William Mills
- Re: [kitten] SASL OAuth: Next Steps William Mills
- Re: [kitten] SASL OAuth: Next Steps Hannes Tschofenig
- Re: [kitten] SASL OAuth: Next Steps William Mills
- Re: [kitten] SASL OAuth: Next Steps Florian Zeitz
- Re: [kitten] SASL OAuth: Next Steps William Mills
- Re: [kitten] SASL OAuth: Next Steps Jeffrey Altman