Re: [Id-event] Thread: Clarifying use of sub and iss in SET tokens

Marius Scurtescu <mscurtescu@google.com> Tue, 07 March 2017 21:42 UTC

Return-Path: <mscurtescu@google.com>
X-Original-To: id-event@ietfa.amsl.com
Delivered-To: id-event@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B46771294E1 for <id-event@ietfa.amsl.com>; Tue, 7 Mar 2017 13:42:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[AC_DIV_BONANZA=0.001, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 Wgn_mwOrjRBL for <id-event@ietfa.amsl.com>; Tue, 7 Mar 2017 13:42:46 -0800 (PST)
Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (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 612B91204D9 for <id-event@ietf.org>; Tue, 7 Mar 2017 13:42:46 -0800 (PST)
Received: by mail-it0-x229.google.com with SMTP id h10so79822961ith.1 for <id-event@ietf.org>; Tue, 07 Mar 2017 13:42:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PVIypbUaZi84YkXGj8yD1CE/Xk5jOjJnoZvlYe8QzXc=; b=qLFedlffARgxdIEpg0rj8qCM3xMfUjGXOoO238MbSwsVON9eTxwitM1gWpLyxoILTt dWL2YaSfUvkz6iZP7K/otyNAgXYDunqjdVTzQtMYxRaZ2ixvz7hFHrlpe+vPNhuVCrfh fyu/yqNFO0nb7i/q/4VJ/JFixA9dYFo7QgcxtXtabl+sYhsGEFSOBmWYkPTZykVBZGtD cVmPGEuDZIytZT3SKJ6OKXDNQa5nRGv+DuZkWj+VEvv6tDRMu2SMZF7TM1yedVl/DLjd euyBJAJ4WXktLDFFc+jrCgPSrB0T6x7bYHCUunU2cp+J4OiD9agNHVIm68WHUA1gsjy+ 4zZw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PVIypbUaZi84YkXGj8yD1CE/Xk5jOjJnoZvlYe8QzXc=; b=OSa4Hgso4psffywf/1TCeFcZMWLKsBPn5VWUlz/fFgamhdT+ge+/SsLUr12N/AD9YU d7H64ChCTyYSbNc01p+Vyb+hntAlBi6Up/8p1lNgprQTZneb+lx5IuDW66it8nY2WRKT /ATDccLPfaZ+3f+0h9e12713fIzupQVNuqBvm9E19ZIiMjTd3XY/Rwwqrcd239gV/anm oJZSS+J0jzzmNmEzFPHBuoWKz9IO+RCUOQgavx9w2v6IM+6tQKCPuQYv8zaI5OuobW9x TkqJ+hNjCq4gMoiIA1ZTzqk7u5YObJXjJmyDS6BCxpiG12RP8x/rbiK+k4Bgu/ipBebc ayzg==
X-Gm-Message-State: AMke39mwIveG72JVhZx+TtH+4TEjU9t3sWboupdFdr3QuC6RlVmMtfvIzJn8qNwGr8pViuiY5A99ylIgUkV5/RBm
X-Received: by 10.36.86.83 with SMTP id o80mr11669856itb.65.1488922965412; Tue, 07 Mar 2017 13:42:45 -0800 (PST)
MIME-Version: 1.0
Received: by 10.107.7.207 with HTTP; Tue, 7 Mar 2017 13:42:24 -0800 (PST)
In-Reply-To: <DAFC1F24-EFAF-46CC-90BC-5692A5ABED9A@oracle.com>
References: <4611E3C8-9772-44EA-940D-077E1EA6247F@oracle.com> <7f44a710-0545-157c-b75e-d46853cf2e06@mit.edu> <4B014CCA-BCBE-4894-9F2F-17DA2541509A@oracle.com> <1bbfcb1f-c554-3baf-e260-fbd475c803bb@mit.edu> <CY4PR21MB0504F24541054228A72FC93FF52F0@CY4PR21MB0504.namprd21.prod.outlook.com> <6e1e3988-43c7-5ac1-529d-4160ced6cc90@akamai.com> <2cd1b77c-ca3c-a773-4068-21da43509e8b@mit.edu> <C2BE4FD7-6090-49C7-88FD-CCBBBC40538C@oracle.com> <CY4PR21MB05041BD15DFB7F4E8097B02BF52F0@CY4PR21MB0504.namprd21.prod.outlook.com> <8BF1F254-AB43-492C-9A3A-D6DC76D23B7A@oracle.com> <CY4PR21MB0504E6735E471E14F575A92AF52F0@CY4PR21MB0504.namprd21.prod.outlook.com> <DAFC1F24-EFAF-46CC-90BC-5692A5ABED9A@oracle.com>
From: Marius Scurtescu <mscurtescu@google.com>
Date: Tue, 07 Mar 2017 13:42:24 -0800
Message-ID: <CAGdjJp+eRXPRVtzcN7=itkWuEgqSC2DByYGyFdhoUtQeHF=dWg@mail.gmail.com>
To: Phil Hunt <phil.hunt@oracle.com>
Content-Type: multipart/alternative; boundary="001a11404644740207054a2ae4d5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/id-event/JXJqLKI5S6abMH1hUHXKdX6uvIE>
Cc: Mike Jones <Michael.Jones@microsoft.com>, ID Events Mailing List <id-event@ietf.org>
Subject: Re: [Id-event] Thread: Clarifying use of sub and iss in SET tokens
X-BeenThere: id-event@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "A mailing list to discuss the potential solution for a common identity event messaging format and distribution system." <id-event.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/id-event>, <mailto:id-event-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/id-event/>
List-Post: <mailto:id-event@ietf.org>
List-Help: <mailto:id-event-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/id-event>, <mailto:id-event-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Mar 2017 21:42:50 -0000

On Tue, Mar 7, 2017 at 10:48 AM, Phil Hunt <phil.hunt@oracle.com> wrote:

> Should SET Token have text forbidding use of nonce?  I can’t see why nonce
> would ever be needed and we can call that out as the method of
> differentiation in the security considerations.
>

Another method of differentiation suggested by William was the value of the
aud claim.

For Id Tokens it is the client id, for SET we could specify that the value
has a specific URN prefix followed by the client id of the receiving party.



>
> Phil
>
> Oracle Corporation, Identity Cloud Services & Identity Standards
> @independentid
> www.independentid.com
> phil.hunt@oracle.com
>
>
>
>
>
>
>
> On Mar 7, 2017, at 10:35 AM, Mike Jones <Michael.Jones@microsoft.com>
> wrote:
>
> Per my earlier reply to Marius, a SET cannot be confused with an ID Token,
> even if the “events” claim is ignored.  The reply explained:
> “For all response_types except for “code”, the ID Token must have a
> “nonce” claim matching the request in order to be validated.  SETs won’t
> have this claim.  For response_type=code, the ID Token must be retrieved
> from the Token Endpoint to be valid.  But SETs aren’t returned as the
> id_token value from the Token Endpoint.  There isn’t a channel in which an
> attacker can successfully substitute a SET for an ID Token and have it
> validate as an ID Token.”
> I hope people will stop crying wolf, saying that SETs will be confused
> with ID Tokens, because starting with a false premise isn’t a good way to
> further meaningful discussion.
>
> **IF** used in a context in which there might be confusion, which could
> be true for some private access token formats, the SET can always include
> “crit”: [“events”].  I’m fine with the security considerations section
> saying that, provided that doing so is optional in the SET spec.  It’s fine
> for particular SETs to require it, when it’s actually needed.  That’s why
> “crit” is there.
>
> The fact that there are three valid examples of differing levels of
> complexity in the spec is a sign of the strength of the current approach –
> not a sign of a flaw.  Each example includes the information that it needs
> and is simple as possible, given the constraints of use case.  That’s as it
> should be.
>
>                                                        -- Mike
>
> *From:* Phil Hunt [mailto:phil.hunt@oracle.com <phil.hunt@oracle.com>]
> *Sent:* Tuesday, March 7, 2017 10:21 AM
> *To:* Mike Jones <Michael.Jones@microsoft.com>
> *Cc:* ID Events Mailing List <id-event@ietf.org>
>
> *Subject:* Re: [Id-event] Thread: Clarifying use of sub and iss in SET
> tokens
>
> Thanks Mike,
>
> Just to be clear. You are expressing a perspective of maintaining the
> exact format as defined by the ID Token and imposing the limit on all other
> Events.
>
> If I understand correctly, JWT (RFC7519) has no such limitation on sub and
> the group *could* choose to profile “sub” to be globally unique for all SET
> Events. Correct?
>
> What I was trying to do was point out the 3 separate subject
> identification formats already in the spec and to ask, is this really
> acceptable (per Yaron’s request)?
>
> You and William have indicated a preference to leave it.
>
> Justin and Benjamin did apparently express some concerns. Can they clarify?
>
> My concern is that we are too compatible with existing code. SETs can
> easily be confused as ID Tokens as existing ID Token parsers will ignore
> the events attribute and will see all the normal claims for an ID Token as
> being present.  If you can address this, then I can live with the status
> quo.
>
> Are they any that have issues with the current draft (in order to get back
> to Yaron’s question)? The current draft allows multiple iss values to
> appear in different places in the JSON structure based on profiling
> specification definition.
>
> Phil
>
> Oracle Corporation, Identity Cloud Services & Identity Standards
> @independentid
> www.independentid.com
> phil.hunt@oracle.com
>
>
>
>
>
>
>
>
> On Mar 7, 2017, at 9:29 AM, Mike Jones <Michael.Jones@microsoft.com>
> wrote:
>
> No, it’s not possible to require that “sub” be globally unique because for
> important use cases, it’s relative to the issuer.  Trying to force it to be
> a URI would unnecessarily limit the applicability of the SET spec, causing
> some applications to simply decide to not use it as a result.
>
> If some use cases want a kind of logout event that’s issued by a different
> party than the IdP, then the current spec lets that new event be defined.
> It will require more parameters than the current logout event, but that’s
> OK, since it’s used in different contexts.
>
> In my view, it’s not editorially lazy to allow events to define what
> claims they need.  It’s an intentional choice, which enables the simple
> cases to be simply expressed, while also enabling more complicated cases
> carrying more information to be expressed.
>
> Trying to force the simple events use extra syntax only actually needed
> for complicated events would be a severe architectural mistake on our part.
>
>                                                        -- Mike
>
> *From:* Id-event [mailto:id-event-bounces@ietf.org
> <id-event-bounces@ietf.org>] *On Behalf Of *Phil Hunt
> *Sent:* Tuesday, March 7, 2017 8:13 AM
> *To:* ID Events Mailing List <id-event@ietf.org>
> *Subject:* Re: [Id-event] Thread: Clarifying use of sub and iss in SET
> tokens
>
>
> Just to refresh everyone...
>
> As editor, my feeling is we have no *clean* or *simple* solution because
> we have to use “iss” to mean the issuer of the SET in order to comply with
> JWT and because OIDC conflates assertion issuer with subject issuer, it
> makes it difficult to uniquely identify a “sub” value because some events
> want to use “iss” for 2 purposes (to identify the event issuer vs. the
> subject issuer).
>
> None of the solutions presented are actually easy to explain. So far, I’ve
> sided with Mike and William because they feel it is close enough and it was
> editorially lazy (say nothing). I am worried that this is actually complex
> for developers who do not know the history of how JWTs emerged.
>
> Let’s look at the examples we already have. Notice that in the current
> draft, there are 3 separate ways of expressing the subject of an event….
>
> Scenario 1, the event issuer and subject issuer are the same:
>
>    {
>       "iss": "https://server.example.com",
>       "sub": "248289761001",
>       "aud": "s6BhdRkqt3",
>       "iat": 1471566154,
>       "jti": "bWJq",
>       "sid": "08a5019c-17e1-4977-8f42-65a12843ea02",
>       "events": {
>         "http://schemas.openid.net/event/backchannel-logout": {}
>       }
>    }
>
> Scenario 2, a relying party is issuing an event, event iss and sub iss are
> different and thus there are repeat iss values:
>
>    {
>      "jti": "fb4e75b5411e4e19b6c0fe87950f7749",
>
>      "sub": "248289761001",
>      "iat": 1458496025,
>      "iss": "https://my.examplemed.com",
>      "aud": [
>        "https://rp.example.com"
>      ],
>      "events": {
>        "https://openid.net/heart/specs/consent.html":{
>          "iss":"https://connect.example.com",
>          "consentUri":[
>            "https://terms.examplemed.com/labdisclosure.html#Agree"
>          ]
>        }
>      }
>    }
>
> Scenario  3:  sub is universally unique:
>
>    {
>      "jti": "3d0c3cf797584bd193bd0fb1bd4e7d30",
>      "iat": 1458496025,
>      "iss": "https://scim.example.com",
>      "aud": [
>        "https://jhub.example.com/Feeds/98d52461fa5bbc879593b7754",
>        "https://jhub.example.com/Feeds/5d7604516b1d08641d7676ee7"
>      ],
>      "sub": "https://scim.example.com/Users/44f6142df96bd6ab61e7521d9",
>      "events": {
>        "urn:ietf:params:scim:event:passwordReset":
>          { "id":"44f6142df96bd6ab61e7521d9"},
>        "https://example.com/scim/event/passwordResetExt":
>          { "resetAttempts":5}
>      }
>    }
>
> I believe the current argument is that profiling specs explains how their
> events are to be parsed. This means for multi-event parsers, subject is
> inconsistent and potentially not mappable.  The BackChannel Logout event is
> currently structured for only the OP to issue. However Oracle wants that to
> be bi-directional so that web sites can notify the IDP/OP that the user has
> logged out of a specific web site.  If that happens, BackChannel logout
> will have methods 1 and 2 required.
>
> Would it be possible for events to require that “sub” be globally unique —
> e.g. expressed as a url.  For example, in order for backchannel to be
> issued by an OP or an RP, it would be expressed with sub as a URL ("sub": “
> https://server.example.com/248289761001”,):
>    {
>       "iss": "https://www.exampleapp.com",
>       "sub": “https://server.example.com/248289761001",
>       "aud": "s6BhdRkqt3",
>       "iat": 1471566154,
>       "jti": "bWJq",
>       "sid": "08a5019c-17e1-4977-8f42-65a12843ea02",
>       "events": {
>         "http://schemas.openid.net/event/backchannel-logout": {}
>       }
>
> At least this way iss is never duplicated and sub is always the
> addressable subject of the event regardless of the type of event.  That
> would enable all 3 cases to be expressed one way for all specs.  That seems
> simple to me (at least from how I would define this in the spec).
>
> I had thought Justin was advocating a 4th option which is to always embed
> “sub” and “iss” in the event payload.  So you would end up with something
> like:
>    {
>      "jti": "fb4e75b5411e4e19b6c0fe87950f7749",
>      "iat": 1458496025,
>     * "iss": "https://my.examplemed.com <https://my.examplemed.com/>",*
>      "aud": [
>        "https://rp.example.com"
>      ],
>      "events": {
>        "https://openid.net/heart/specs/consent.html":{
>         * "sub": "248289761001",*
> *         "iss":"https://my.examplemed.com <https://my.examplemed.com/>",*
>          "consentUri":[
>            "https://terms.examplemed.com/labdisclosure.html#Agree"
>          ]
>        }
>      }
>    }
>
> Note that in the above example, “iss” would always be present even if
> “iss” is the *same*.  The rule would be that the iss and sub are in the
> payload and that addresses the subject of the event. The envelope level is
> always reserved for event validation and addressing only.  While some would
> argue this is ugly, I can see some merits as it is at least consistent.
>
>
> Phil
>
> Oracle Corporation, Identity Cloud Services & Identity Standards
> @independentid
> www.independentid.com
> phil.hunt@oracle.com
>
>
>
>
>
>
>
>
> On Mar 7, 2017, at 7:26 AM, Justin Richer <jricher@mit.edu> wrote:
>
> +1
>
> On 3/6/2017 7:55 PM, Benjamin Kaduk wrote:
>
> On 03/06/2017 06:39 PM, Mike Jones wrote:
>
>
> Justin, I suspect you didn’t see my earlier reply to Phil’s note that you
> also replied to, so I’m repeating it here and sending it to you directly.
> (It wouldn’t be the first time that DMARC policies caused some of my
> contributions to be not received by some participants. :-( )
>
> Agreed that this is unclear.  Duplicating information in a protocol *
> *always** introduces an unnecessary error case – the need to define how
> to handle the situation in which two pieces of information that are
> required to be identical are different.  Information in a SET should occur
> at most once.
>
>
>
> That seems a dangerous road to tread, as it requires care in defining
> "information" -- duplicating the same data strings at different levels of
> the hierarchy of a JSON object may very well not be duplicating
> information, due to the extra context provided by the hierarchy.  In my
> mind, it's not a clear case that you should never send the same name/value
> multiple times in different parts of an object, as sometimes it is good to
> keep the semantic separation clear.
>
> -Ben
>
>
>
>
> _______________________________________________
> Id-event mailing list
> Id-event@ietf.org
> https://www.ietf.org/mailman/listinfo/id-event
>
>
> _______________________________________________
> Id-event mailing list
> Id-event@ietf.org
> https://www.ietf.org/mailman/listinfo/id-event
>
>
>
> _______________________________________________
> Id-event mailing list
> Id-event@ietf.org
> https://www.ietf.org/mailman/listinfo/id-event
>
>