Re: [http-auth] RFC 7804 One Round-Trip Reauthentication
Isen Ng <isen@treeboxsolutions.com> Thu, 01 December 2016 02:22 UTC
Return-Path: <isen@treeboxsolutions.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 82301129693 for <http-auth@ietfa.amsl.com>; Wed, 30 Nov 2016 18:22:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=treeboxsolutions-com.20150623.gappssmtp.com
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 uVKJvwij6SFa for <http-auth@ietfa.amsl.com>; Wed, 30 Nov 2016 18:22:09 -0800 (PST)
Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1749B12956B for <http-auth@ietf.org>; Wed, 30 Nov 2016 18:22:09 -0800 (PST)
Received: by mail-yw0-x22d.google.com with SMTP id i145so174781296ywg.2 for <http-auth@ietf.org>; Wed, 30 Nov 2016 18:22:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=treeboxsolutions-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=h9VvvY4uGlyz0wLmLAtsFN/oW+eq4sHy5gLUp7TIhLw=; b=F2XPVfrRoXn1nRLtjdmX6bxBAWU2qLaRsnVwLO4AQozR9Q+wzQBVkBfxqdat9tJnJW 6IZsUEXNVC7DDwHfxCYHjlgtwoE9W5J6P1VyPG0FkdzgWka5Gho7mDVPln5iWKiAieFb wvXFXKEP7fayms7a6NZbDUE5L5uAsSiVuE1mFUcCSqBlnAkV4yfK5EVDMo/7mnVlovhD M/WZofjKrPnYHaOO3j0J0R4t8Qd3kcqLia4ybpUoj2v61daxXVTRs0Lq+5pz/b2S3Irg OXarxBmENS7H87GzF/x1QiZ04rgyVgUNBSQ/TwN+lSqxs8rDLk1d6dWKPhXs5c/i/3Y0 k81Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=h9VvvY4uGlyz0wLmLAtsFN/oW+eq4sHy5gLUp7TIhLw=; b=cjmAj+KXehA/QWvqukUW8Zq+O5laAgZ2mOth3Rxx9OtvZJ/5Y+TXvUXOJBEZvB1ru5 2IX3cIBU/Y56T/rJW3oKfgjgdCSnneYOiYRyrkDAh8egyZ4NxyJ6aaTPtp/lsT/lrfPc eeRMtQavazfY+6jP0iu5lVJpYUaepkPLqTmuu1kQza574sozpiNcG00N/4FUgYfpf7iU yh6dtUl0Pj/NPcI302RPKIbaWz0ct6tBjyBOH3kT7Z7vQZfFpFMpt/09D2jHsnCuVDci iEFcHK+h91sAqJQ+urG76Zgn1c6N5eEOIgDoqceuPLTirFEqPeI3M1jJ/UJkn4PUqdMr sNZQ==
X-Gm-Message-State: AKaTC026WPJeAtpSw7ZhZLom1iOND55I0rOc2aEoBgTy6O0oGlKqB4ojtQk2Ws9E4FiExaKUI6L3VP40rNoXtfx4
X-Received: by 10.13.219.203 with SMTP id d194mr43115241ywe.305.1480558928243; Wed, 30 Nov 2016 18:22:08 -0800 (PST)
MIME-Version: 1.0
Received: by 10.37.219.70 with HTTP; Wed, 30 Nov 2016 18:22:07 -0800 (PST)
In-Reply-To: <81f2ff57-64a1-47cb-49bd-dfa17aaacdc8@isode.com>
References: <CABR9bnzG9Zv+YYN5psnLZzyHUBzg14WVH8VuJkG_w4YZb4PRhg@mail.gmail.com> <81f2ff57-64a1-47cb-49bd-dfa17aaacdc8@isode.com>
From: Isen Ng <isen@treeboxsolutions.com>
Date: Thu, 01 Dec 2016 10:22:07 +0800
Message-ID: <CABR9bnykwC_jcoHoG1g=3vHHrRx8VDDkV_LgBOHYY74E=EpLVw@mail.gmail.com>
To: Alexey Melnikov <alexey.melnikov@isode.com>
Content-Type: multipart/alternative; boundary="001a114fbfb8fcda8f05428f7cb1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/http-auth/wOic9NWLjDBpcNdUT5B9TXb8FpY>
Cc: http-auth@ietf.org
Subject: Re: [http-auth] RFC 7804 One Round-Trip Reauthentication
X-BeenThere: http-auth@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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: Thu, 01 Dec 2016 02:22:15 -0000
Hi Alexey, Yeah, I have implemented the HTTP SCRAM-SHA256 protocol according to this RFC7804 and is implementing the one round-trip re-authentication at the moment. My colleagues and I have agreed upon a workaround and that is to include the original "sid" in the "client-final-message". The reason we do so is because the server has to keep a cache of the original c-nonce and s-nonce for nonce verification anyway. Instead of trying to maintain a different state for this using a different identifier and then butchering the "client-final-message" with extra variables, we decided to simply reuse the session that is already maintained. This way, the code written to process the "client-final-message" into the "server-final-message" does need to change at all. The same code that was used in an regular 2-round-trip authentication can be used in this 1-trip re-authentication. Regards, Isen *Isen Ng* | Ninja *TreeBox Solutions Pte Ltd* 1 Commonwealth Lane #03-01/02 Singapore 149544 *E:* isen@treeboxsolutions.com website <http://treeboxsolutions.com/> | linkedin <https://www.linkedin.com/company/treebox-solutions-pte-ltd> | twitter <https://twitter.com/TreeBoxNews> | facebook <https://www.facebook.com/treeboxsolutions> On Wed, Nov 30, 2016 at 8:42 PM, Alexey Melnikov <alexey.melnikov@isode.com> wrote: > Hi Isen, > > On 28/11/2016 06:11, Isen Ng wrote: > > Hi, > > I'm looking at RFC 7804, specifically at "One Round-Trip Reauthentication" > (https://tools.ietf.org/html/rfc7804#page-10) > > It is said that > > "If the client has authenticated to the same realm before (i.e., it > remembers "i" and "s" attributes for the user from earlier > authentication exchanges with the server), it can respond to that > with "client-final-message"" > > And the example give: > > C: GET /resource HTTP/1.1 > C: Host: server.example.com > C: Authorization: SCRAM-SHA-256 realm="testrealm@example.com", > data=Yz1iaXdzLHI9ck9wck5HZndFYmVSV2diTkVrcU80MDk2JWh2WURwV1VhM > lJhVENBZnV4RklsailoTmxGLHA9ZEh6YlphcFdJazRqVWhOK1V0ZTl5dGFnOX > pqZk1IZ3NxbW1pejdBbmRWUT0K > > C: [...] > > In this case, there no longer is an attribute named "sid" in this > "client-final-message". > How does the server know which user's secret to use to calculate the proof > for matching? > > You are right, I messed it up! The client should be sending "n=<username>" > somewhere in this response. > > Are you trying to implement this? > > Best Regards, > Alexey > > >