Re: [kitten] AD review of draft-ietf-kitten-sasl-oauth-21

Benjamin Kaduk <kaduk@MIT.EDU> Mon, 27 April 2015 22:23 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6745F1A9136 for <kitten@ietfa.amsl.com>; Mon, 27 Apr 2015 15:23:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.211
X-Spam-Level:
X-Spam-Status: No, score=-4.211 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 X6iwiPxO6Zh1 for <kitten@ietfa.amsl.com>; Mon, 27 Apr 2015 15:23:12 -0700 (PDT)
Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu [18.7.68.34]) by ietfa.amsl.com (Postfix) with ESMTP id D2A411A8F50 for <kitten@ietf.org>; Mon, 27 Apr 2015 15:23:10 -0700 (PDT)
X-AuditID: 12074422-f79cb6d000000d7b-1f-553eb6ce3e5b
Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP id B5.9C.03451.EC6BE355; Mon, 27 Apr 2015 18:23:10 -0400 (EDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id t3RMN9SW011109; Mon, 27 Apr 2015 18:23:09 -0400
Received: from multics.mit.edu (system-low-sipb.mit.edu [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id t3RMN6U3019566 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 27 Apr 2015 18:23:08 -0400
Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id t3RMN6sL010021; Mon, 27 Apr 2015 18:23:06 -0400 (EDT)
Date: Mon, 27 Apr 2015 18:23:06 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Stephen Farrell <stephen.farrell@cs.tcd.ie>
In-Reply-To: <553BF9A5.7080408@cs.tcd.ie>
Message-ID: <alpine.GSO.1.10.1504271559170.22210@multics.mit.edu>
References: <553BD31B.303@cs.tcd.ie> <575127954.5175870.1429985689398.JavaMail.yahoo@mail.yahoo.com> <553BF9A5.7080408@cs.tcd.ie>
User-Agent: Alpine 1.10 (GSO 962 2008-03-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJIsWRmVeSWpSXmKPExsUixCmqrHtum12oQesTToujm1exWEzfe43d 4lvXdWYHZo+13VfZPJYs+cnkMWvWYaYA5igum5TUnMyy1CJ9uwSujLanDawFG3Urrq1+x9zA eFOli5GTQ0LAROLBpKNMELaYxIV769m6GLk4hAQWM0lsbexghHA2Mkpcu/CVFcI5xCRx7/tZ qEwDo8TqBXMZQfpZBLQl/v88zg5iswmoSMx8s5ENxBYR0JfYu/kcWJxZwEfi2cWXLCC2sICT xPU518B2cwpoSjy/dg7M5hVwlPh27DwzxIJGRomnp56BLRAV0JFYvX8KC0SRoMTJmU9YIIZq SSyfvo1lAqPgLCSpWUhSCxiZVjHKpuRW6eYmZuYUpybrFicn5uWlFuma6uVmluilppRuYgSF MLuL0g7GnweVDjEKcDAq8fAWTLYNFWJNLCuuzD3EKMnBpCTK29ZjFyrEl5SfUpmRWJwRX1Sa k1p8iFGCg1lJhPfUFqAcb0piZVVqUT5MSpqDRUmcd9MPvhAhgfTEktTs1NSC1CKYrAwHh5IE b8RWoEbBotT01Iq0zJwShDQTByfIcB6g4fEgNbzFBYm5xZnpEPlTjIpS4ry8IAkBkERGaR5c LyzFvGIUB3pFmHc7SBUPMD3Bdb8CGswENLhypg3I4JJEhJRUA6PzNZ4HeaVX/0uzu1k/y0z/ MoXheXjVxZCSbpaXL4X4Jff9t2OKv7reclsd7yGrvTcy14okuammq/4/Z9nFpyP7Kctgi9Tm Qh17J7m3U9r0L7/VPjk568v+lQ4fajL/zTywoMra63TL4s0nw348nPqmwN//8Z+Axt+mH1yf zt2d4fUz+KizXaoSS3FGoqEWc1FxIgBsn4GJDAMAAA==
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/x79z5CyKNvH3b93Z2F6TcKzu9Gc>
Cc: "kitten@ietf.org" <kitten@ietf.org>
Subject: Re: [kitten] AD review of draft-ietf-kitten-sasl-oauth-21
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.15
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: Mon, 27 Apr 2015 22:23:14 -0000

On Sat, 25 Apr 2015, Stephen Farrell wrote:

>
> I'm sorry but we seem to be talking past one another for both
> issues. Let me try another tack but it may also help if someone
> else chimes in.

[puts on shepherd hat]
Sorry for the long silence; I was sick last week and didn't get much
of anything done.

Question (1) is about the host and port kvpairs of the initial client
response; Stephen claims that any server software using this SASL
mechanism will know what hostname and port the client is trying to access.
It seems like this is in fact true, but Bill says there is no API for a
SASL mechanism implementation to query this from up the stack (and would
require patching the core SASL implementation, not just a mechanism
implementation).  The natural question to ask, then, is if other SASL
mechanisms are verifying a client-supplied hostname, and if so, how.  In
Kerberos the desired service principal name includes a hostname, and can
be determined by examining the sname field of the presented Ticket.  In
practice, kerberized application servers are generally configured to
either use one specific service principal name, or any for which keys can
be found [optionally, of the given service type].  So, the hostname used
by the client can be determined just from the authentication blob, without
a need to consult the SASL stack.  If other mechanisms are similar to
kerberos, than I guess it makes sense to explicitly include the target
hostname in the initial client response, as is currently done.  This seems
to be the only relevant part of the discussion; I don't think that OAuth
tokens valid for multiple servers are particularly interesting for
answering this question.

Additionally, the SASL application server certainly knows what port it is
receiving traffic on.  But, as Bill notes, if there is a load-balancer or
TLS terminator in between, the port the server is listening on can differ
from the port that the client sent to.  My understanding is that it is not
terribly common for authentication/authorization schemes to be
port-restricted, so it is plausible that the SASL mechanisms currently in
use in such scenarios do not use a port number and thus can succeed
unchanged, whereas OAuth 1.0a does bind to the port number and needs an
explicit hint.

In both cases (hostname and port), my tentative conclusion is that no
change to the draft is needed.


Question (2) relates to the use of TLS.  This document is in a somewhat
awkward position of specifying both a specific (pair of) mechanisms and a
(hopefully) general framework for converting HTTP OAuth mechanisms into
SASL mechanisms.  For all currently specified OAuth (2.0) mechanisms, TLS
is required to protect the bearer token, but we hope that future OAuth
mechanisms can be specified which do not use bearer tokens and thus have a
weaker dependency on TLS.  In particular, we hope that such future OAuth
HTTP mechanisms can be converted to SASL mechanisms using the framework
specified in this document.

So, while TLS MUST be used for the concrete mechanisms this document
specifies [1], there is not a very strong case to say that TLS MUST be
used for all mechanisms compliant to this framework.  This framework for
SASL mechanisms does not provide any security layer for data security, so
if confidentiality of data is required, TLS ought to be used.  But I'm not
sure that's even a SHOULD, let alone a MUST.

I concede Stephen's point that section 3 should say *something* about TLS,
and propose moving (or copying?) text from the security considerations
relating to the two specific mechanisms (MUST for OAUTHBEARER; RECOMMENDED
for OAUTH10A), along with some text giving guidance for future mechanisms
using this framework.  It's not clear to me that sections 4 and 5 are
internally inconsistent, though -- unless the difference between "TLS MUST
be used" and "TLS must be provided" is the concern?

To suggest some concrete text, insert into section 3, after the paragraph
"New extensions may be defined [...] citing this specification for the
further definition.":

%%%%%%%%%%%%%%%%%%%%%%%%

SASL mechanisms using this document as their definition do not provide
a data security layer; that is, they cannot provide integrity or
confidentiality protection for application messages after the initial
authentication.  If such protection is needed, TLS or some similar
solution should be used.  Additionally, for the two mechanisms specified
in this document, TLS MUST be used for OAUTHBEARER to protect the bearer
token; for OAUTH10A the use of TLS is RECOMMENDED.

%%%%%%%%%%%%%%%%%%%%%%%%

The start of the next paragraph could probably also benefit from new
transition text, such as "Mechanisms using this document as a definition
are client initiated [...]".



With respect to the nits:

I only see one valid entry in the idnits output about the references;
draft-ietf-oauth-dyn-reg has had a new version come out in the interim.
It also claims that RFC 5849 (OAuth 1) is obsolete, but we do need to
reference it for the OAUTH10A mechanism.  (I thought I said that in the
shepherd report....)

Alexey looked at an old version of the ABNF and we had to make a couple
tweaks, but I think it's okay, now.

Bill talked about the kvsep of 0x01, so I will say no more.

I think Bill also covered the privacy aspects of (not) including the
authzid as well.

I did some checking of the examples, but they should ideally be checked
again at some point.  (I will probably do it during IETF last call.)
There were several points in time where the examples were internally
inconsistent, so it would be good to make sure that we've stamped those
out.

-Ben

[1] I'm ignoring OAuth 1.0a for this point.