Re: [OAUTH-WG] OAuth Signature

Eran Hammer-Lahav <eran@hueniverse.com> Wed, 28 July 2010 00:36 UTC

Return-Path: <eran@hueniverse.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 7FAE63A65A6 for <oauth@core3.amsl.com>; Tue, 27 Jul 2010 17:36:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.466
X-Spam-Level:
X-Spam-Status: No, score=-2.466 tagged_above=-999 required=5 tests=[AWL=0.132, BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2WeNivLhg4AU for <oauth@core3.amsl.com>; Tue, 27 Jul 2010 17:36:13 -0700 (PDT)
Received: from p3plex1out01.prod.phx3.secureserver.net (p3plex1out01.prod.phx3.secureserver.net [72.167.180.17]) by core3.amsl.com (Postfix) with SMTP id D14223A6781 for <oauth@ietf.org>; Tue, 27 Jul 2010 17:36:12 -0700 (PDT)
Received: (qmail 14067 invoked from network); 28 Jul 2010 00:36:33 -0000
Received: from unknown (HELO smtp.ex1.secureserver.net) (72.167.180.19) by p3plex1out01.prod.phx3.secureserver.net with SMTP; 28 Jul 2010 00:36:33 -0000
Received: from P3PW5EX1MB01.EX1.SECURESERVER.NET ([10.6.135.20]) by P3PW5EX1HT001.EX1.SECURESERVER.NET ([72.167.180.19]) with mapi; Tue, 27 Jul 2010 17:36:02 -0700
From: Eran Hammer-Lahav <eran@hueniverse.com>
To: Dirk Balfanz <balfanz@google.com>, Nat Sakimura <sakimura@gmail.com>
Date: Tue, 27 Jul 2010 17:36:10 -0700
Thread-Topic: [OAUTH-WG] OAuth Signature
Thread-Index: Acst3/+W6ldu2uXFTny6yUeC+spfugADNgqw
Message-ID: <90C41DD21FB7C64BB94121FBBC2E72343B3EF903F7@P3PW5EX1MB01.EX1.SECURESERVER.NET>
References: <AANLkTi=XYFSVeNxA43k+zYwt6yoGDtioa3kR47eaNYB+@mail.gmail.com> <AANLkTikStNbY_qQr0vivO80HRNyxMpuBtaA799CwG_n9@mail.gmail.com> <AANLkTi=uxiXSD5AQc9Ugz2j1GrLtzZB0uK5gey-mdFac@mail.gmail.com> <AANLkTimgySKrj+B5avoFmV=PgF38-wPtyKP=JW7SR_H5@mail.gmail.com>
In-Reply-To: <AANLkTimgySKrj+B5avoFmV=PgF38-wPtyKP=JW7SR_H5@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: multipart/alternative; boundary="_000_90C41DD21FB7C64BB94121FBBC2E72343B3EF903F7P3PW5EX1MB01E_"
MIME-Version: 1.0
Cc: oauth <oauth@ietf.org>
Subject: Re: [OAUTH-WG] OAuth Signature
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Jul 2010 00:36:14 -0000

Is someone going to turn this into an I-D anytime soon?

EHL

From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf Of Dirk Balfanz
Sent: Tuesday, July 27, 2010 4:04 PM
To: Nat Sakimura
Cc: oauth
Subject: Re: [OAUTH-WG] OAuth Signature


On Tue, Jul 27, 2010 at 3:35 PM, Nat Sakimura <sakimura@gmail.com<mailto:sakimura@gmail.com>> wrote:
On Wed, Jul 28, 2010 at 1:12 AM, Dirk Balfanz <balfanz@google.com<mailto:balfanz@google.com>> wrote:
>
>
> On Tue, Jul 27, 2010 at 12:34 AM, Nat Sakimura <sakimura@gmail.com<mailto:sakimura@gmail.com>> wrote:
>>
>> I have a fundamental question.
>>
>> While separating signature and payload by a dot "." seems ok,
>> I still have not the answer for the question "why not make everything
>> into JSON and base64url it?".
>>
>> i.e., Right now, you are proposing:
>>
>> base64url_encode(JSON(payload,envelope)).base64url_encode(signature)
>>
>> Why not
>>
>> base64url_encode(JSON(payload,envelope,signature)
>
> You need to say what exactly the signature is over. Presumably, it's over
> some representation of the payload and envelope, but you need to specify
> exactly which representation. So in this case you would have to say
> something like "the signature is over the concatenation of the
> base64-encodings of the JSON-encodings of the payload and envelope", or
> something along those lines. If you did exactly this, then you would base-64
> encode twice. Similar issues come up if you change the definition of what
> the signature is over slightly.
I did not spell out my question correctly. The pseudo code was very misleading.
By "JSON()" I was meaning something similar to magic signature json encoding
or something similar because I was mainly comparing JSON Token and
Magic Signature.
Of course, that cannot be read from what I wrote. Sorry for that.

My question is:
"why not just use a profiled/modified version of Magic Signature"

I think that's a fair question - in fact, I was sort of aiming for just that. Once I get a free minute, I'll see whether there is a way to write this as an MS profile...

Dirk.


I do not want to have two signature methods.
If the currently proposed signature method can be unified with magic signature,
it would be great.

>
>>
>> It probably is less hassle in terms of coding. (It is true that some
>> parameters gets base64url encoded twice but
>
> How is encoding things twice "less hassle"?
>
>>
>> BTW, some of the envelope parameters such as alg needs to be signed as
>> well to thwart the algorithm replacing attack.
>
> Yes, of course. Remember that in the current proposal I don't have an
> envelope - everything is in the payload. That's partly because I didn't want
> to decide what gets signed and what doesn't - everything is signed. Which in
> this case is easy (alternatively, I guess, you could just say that both the
> envelope and the payload are signed). But it gets harder when you want to
> encrypt the token. In this case you really need to leave some parts
> unencrypted (so the recipient has _some_ information on how to decrypt the
> thing) - presumably those parts would go into an envelope.
> Dirk.
>
>
>>
>> --
>> Nat Sakimura (=nat)
>> http://www.sakimura.org/en/
>> http://twitter.com/_nat_en
>
>


--
Nat Sakimura (=nat)
http://www.sakimura.org/en/
http://twitter.com/_nat_en