Re: [OAUTH-WG] OAuth Signature

Dirk Balfanz <balfanz@google.com> Tue, 27 July 2010 23:03 UTC

Return-Path: <balfanz@google.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 0B9E23A6405 for <oauth@core3.amsl.com>; Tue, 27 Jul 2010 16:03:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.976
X-Spam-Level:
X-Spam-Status: No, score=-101.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, USER_IN_WHITELIST=-100]
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 8ZhR6l2Wwq07 for <oauth@core3.amsl.com>; Tue, 27 Jul 2010 16:03:31 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id 610303A6781 for <oauth@ietf.org>; Tue, 27 Jul 2010 16:03:31 -0700 (PDT)
Received: from wpaz9.hot.corp.google.com (wpaz9.hot.corp.google.com [172.24.198.73]) by smtp-out.google.com with ESMTP id o6RN3qX1012278 for <oauth@ietf.org>; Tue, 27 Jul 2010 16:03:52 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1280271833; bh=dt6VxbeEMQ8xf5/4/g133DMwfw0=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=ySDhcGneXwB9YZKxSfzhFAuMTiIVxgvRbYmipcxC/S5AB2qWW75RtnoHpTjA6++sL 49jXR0iHpaEBYK0SP00/w==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:x-system-of-record; b=UFlnwIlgj+k2pesfpk579RL5azECRuPBvaJ1gQSTKbdQoEytRA50glefe90FTtpYd yT4FgnLppEvlT9zCdsj9g==
Received: from iwn38 (iwn38.prod.google.com [10.241.68.102]) by wpaz9.hot.corp.google.com with ESMTP id o6RN3p5k014629 for <oauth@ietf.org>; Tue, 27 Jul 2010 16:03:51 -0700
Received: by iwn38 with SMTP id 38so4390725iwn.31 for <oauth@ietf.org>; Tue, 27 Jul 2010 16:03:51 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.231.150.7 with SMTP id w7mr11245041ibv.14.1280271829545; Tue, 27 Jul 2010 16:03:49 -0700 (PDT)
Received: by 10.231.130.9 with HTTP; Tue, 27 Jul 2010 16:03:49 -0700 (PDT)
In-Reply-To: <AANLkTi=uxiXSD5AQc9Ugz2j1GrLtzZB0uK5gey-mdFac@mail.gmail.com>
References: <AANLkTi=XYFSVeNxA43k+zYwt6yoGDtioa3kR47eaNYB+@mail.gmail.com> <AANLkTikStNbY_qQr0vivO80HRNyxMpuBtaA799CwG_n9@mail.gmail.com> <AANLkTi=uxiXSD5AQc9Ugz2j1GrLtzZB0uK5gey-mdFac@mail.gmail.com>
Date: Tue, 27 Jul 2010 16:03:49 -0700
Message-ID: <AANLkTimgySKrj+B5avoFmV=PgF38-wPtyKP=JW7SR_H5@mail.gmail.com>
From: Dirk Balfanz <balfanz@google.com>
To: Nat Sakimura <sakimura@gmail.com>
Content-Type: multipart/alternative; boundary="00504501690a9db44c048c66831b"
X-System-Of-Record: true
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: Tue, 27 Jul 2010 23:03:33 -0000

On Tue, Jul 27, 2010 at 3:35 PM, Nat Sakimura <sakimura@gmail.com> wrote:

> On Wed, Jul 28, 2010 at 1:12 AM, Dirk Balfanz <balfanz@google.com> wrote:
> >
> >
> > On Tue, Jul 27, 2010 at 12:34 AM, Nat Sakimura <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
>