Re: [http-auth] First review of the Rest-Auth draft

Nico Williams <nico@cryptonector.com> Fri, 08 November 2013 06:23 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: http-auth@ietfa.amsl.com
Delivered-To: http-auth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8DCE811E817F for <http-auth@ietfa.amsl.com>; Thu, 7 Nov 2013 22:23:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.916
X-Spam-Level:
X-Spam-Status: No, score=-1.916 tagged_above=-999 required=5 tests=[AWL=-0.517, BAYES_00=-2.599, J_CHICKENPOX_12=0.6, J_CHICKENPOX_17=0.6]
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 HVxfNLpDlSpI for <http-auth@ietfa.amsl.com>; Thu, 7 Nov 2013 22:23:11 -0800 (PST)
Received: from homiemail-a90.g.dreamhost.com (caiajhbdcbef.dreamhost.com [208.97.132.145]) by ietfa.amsl.com (Postfix) with ESMTP id C981311E817D for <http-auth@ietf.org>; Thu, 7 Nov 2013 22:23:08 -0800 (PST)
Received: from homiemail-a90.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a90.g.dreamhost.com (Postfix) with ESMTP id E947A2AC064; Thu, 7 Nov 2013 22:23:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=3Si6NAQw6mxsx5 Tdz7SbkLdgGmc=; b=MUAB2mzY/wv3+xdZQVD1DPqeRS5REM5/izlH0RRuRzKmKI UjWvfZ7JelPta+clX/Zz7paY1/HV8vBu1GSsy8ZtOQTuKKR/8mnlka4LV+IRhoLA wjXo/C46iq2FFn4uJwN/BNE++fACFEXTbAXQJ8/v6b7u/h3Aj+aUaFyzX6I0s=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a90.g.dreamhost.com (Postfix) with ESMTPA id A4EF82AC023; Thu, 7 Nov 2013 22:23:07 -0800 (PST)
Date: Fri, 08 Nov 2013 00:23:06 -0600
From: Nico Williams <nico@cryptonector.com>
To: Yoav Nir <ynir@checkpoint.com>
Message-ID: <20131108062305.GV18713@localhost>
References: <B5942D74-1A54-4DBD-AC8F-37887226343E@checkpoint.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <B5942D74-1A54-4DBD-AC8F-37887226343E@checkpoint.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: "http-auth@ietf.org" <http-auth@ietf.org>
Subject: Re: [http-auth] First review of the Rest-Auth draft
X-BeenThere: http-auth@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: HTTP authentication methods <http-auth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/http-auth>, <mailto:http-auth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/http-auth>
List-Post: <mailto:http-auth@ietf.org>
List-Help: <mailto:http-auth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/http-auth>, <mailto:http-auth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Nov 2013 06:23:16 -0000

On Tue, Nov 05, 2013 at 08:13:51AM +0000, Yoav Nir wrote:
> I have reviewed draft-ietf-httpauth-rest-auth-01. This is done with no
> hats - it is not a SecDir review, nor a chair or shepherd review. My
> comments have no more or less weight than those of any other
> participant.

Thanks for your review!

> The proposal moves the authentication outside of the HTTP layer, and into the application layer. The benefits of this are:
>  1. Works through unmodified routers and proxies (including TLS proxies)
>  2. Creates a resource that represents the session, and can be deleted for a logout.
>  3. Can re-use many existing mechanisms.
>  4. RESTful, so it supports clustering.
>  5. Easily implemented in application interfaces such as CGI, FastCGI, and others.
>  
> It should be noted that all this information is in the Abstract, and
> most of it should probably be moved to the Introduction (section 1).

Hmm, yeah, the abstract needs to be short.  It's also the place to put
the attention grabbers, if you can make them short enough.

> Section 1.1 has a longish review of the state of authentication on the
> web. We could probably do without it, but as long as it's confined to
> that one section, we can leave it at that, but discussion of
> alternative methods also fills up section 2.

Sure.  I'd love to get rid of that.

> I find section 3 clear, although I would have rather had the examples
> close by rather than all the way down in section 7. [...]

Ah, good point.

> I would have liked to see examples for and within each sub-section of
> section 3, because those help me make sense of things better than
> ABNF.

I agree.  I'll make this change.

> Section 6 describes how the server side of Rest-Auth can be done with
> a single server, multiple server or an HTTP "router". For the
> multi-server case, it is assumed that they will have some shared media
> on which to store the resource representing the session. This is
> indicated by the three words (many servers) "sharing server state". I
> think that this requirement should be stated more explicitly. For a
> static site, a cluster could consist of several replicated servers.
> Not so for a site implementing Rest-Auth.

A static site might not honor session logout, for example, and encode
all session state in an encrypted cookie.  Or it might use expiring,
renewable session state cookes + memcached to record logouts.

Session logout, incidentally, can be implemented with a probabilistic
data structure (false positives -> re-login, but this can be automatic
on the client side).

> Section 7 finally has the example to make this all fall into place.
> However, looking at figure 3, there is one thing that's still missing:
> How does the client get the resource. See the first transaction in
> figure 3 looks like this:
>
>   C->S: GET /some-resources HTTP/1.1
>         Host: A.example
>  
>   S->C: HTTP/1.1 401 Unauthorized
>         WWW-Authenticate: RA-SA-SCRAM-SHA-1 \
>                           http://A.example/rest-sa-scram \ 
>                           s=session-ID,MIC r=no
>         WWW-ChannelBinding-Types: tls-server-end-point
>                 
> And the last one looks like this:
>   S->C: HTTP/1.1 200
>         Content-Type: application/octet-stream
>         Content-Length: nnn
>  
>         v=rmF9pqV8S7suAoZWja4dJRkFsKQ=
>          Content-Type: application/octet-stream
>     
> So the authentication process created some SCRAM-specific parameter
> "v", and a resource called "/restauth-9d0af5f680d4ff46". When the
> client tries again to fetch "/some-resources", what data should be
> passed in the Authorization header?

The session URI / state cookie and binding.

Nico
--