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

Mike Jones <Michael.Jones@microsoft.com> Wed, 01 March 2017 20:09 UTC

Return-Path: <Michael.Jones@microsoft.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 8B904129688 for <id-event@ietfa.amsl.com>; Wed, 1 Mar 2017 12:09:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 x5swEguhVO71 for <id-event@ietfa.amsl.com>; Wed, 1 Mar 2017 12:09:35 -0800 (PST)
Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0105.outbound.protection.outlook.com [104.47.34.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4E1D3129684 for <id-event@ietf.org>; Wed, 1 Mar 2017 12:09:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0ifSNJzLjfbGFYfaZZu1ZiLnSWywo6yWzsjfR6aTUGc=; b=npjMdUW26A2A/PnqkZiOfTtQ9BBQmKEk8jNwJ73VlaE4nrT3ina3MW5xTAUYKqOFKIsglcR1tsgbwtgk3HtiJpCD5+kGKrCzI9igv8kFnn3JIN5j2ZHpMHxYWQRmNSgfmDBtXfV2LZdc7Meyr0QviDq3LwSVEBj4i0VEXXJ5I4Q=
Received: from CY4PR21MB0504.namprd21.prod.outlook.com (10.172.122.14) by CY4PR21MB0502.namprd21.prod.outlook.com (10.172.122.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.0; Wed, 1 Mar 2017 20:09:34 +0000
Received: from CY4PR21MB0504.namprd21.prod.outlook.com ([10.172.122.14]) by CY4PR21MB0504.namprd21.prod.outlook.com ([10.172.122.14]) with mapi id 15.01.0947.007; Wed, 1 Mar 2017 20:09:33 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: William Denniss <wdenniss@google.com>
Thread-Topic: [Id-event] Thread: Clarifying use of sub and iss in SET tokens
Thread-Index: AQHSkrmW5tqPJIY8NEisvT0PLETCCaGAXGUAgAABMRCAAAuGgIAAAFNA
Date: Wed, 01 Mar 2017 20:09:33 +0000
Message-ID: <CY4PR21MB05047835E14B3D375C0538F6F5290@CY4PR21MB0504.namprd21.prod.outlook.com>
References: <4611E3C8-9772-44EA-940D-077E1EA6247F@oracle.com> <CAAP42hAPZOHn-37wYrOy7OcvNuqWdXtSSMHxb_AoW7kXeAy4wA@mail.gmail.com> <CY4PR21MB050423CEEA9AB0CC64F0973FF5290@CY4PR21MB0504.namprd21.prod.outlook.com> <CAAP42hD8FbZSKWiorKSZHqiidak4Gf071xKTD2d9EvZa13mt5g@mail.gmail.com>
In-Reply-To: <CAAP42hD8FbZSKWiorKSZHqiidak4Gf071xKTD2d9EvZa13mt5g@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=none action=none header.from=microsoft.com;
x-originating-ip: [2001:4898:80e8:e::36]
x-ms-office365-filtering-correlation-id: ff5b400a-3202-4836-76dc-08d460dee0fe
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:CY4PR21MB0502;
x-microsoft-exchange-diagnostics: 1; CY4PR21MB0502; 7:bdTbCpOpuELmenm6O/xuz/rnTd8mPh+8V6+afS9BFLEUD9uS/femEKu9g6tSAeDJ5hcAS9QERS7pcGQJAtzxJMTq6SfgdPuZz7YlzkL1fGjyTJpGr5Ui+M6BO7qNzrvm7zcq2xF70gcXjVROu8yqLo1YuJ+Gb+wBT/oIRqXAdmG5ysE/RXDmc6oMF+SIk8S1PKJl/ejJYABrk/zlpY/yTkHgCEPyfpEkUN/8PimAsaypk+KOf4e9g4GHLUky7JCoSXEQbfUXv0zyac5lcimd/YDwSjT05MslF1/JLTISlFEmNcn00tokzcP1/57zd7Ew4n6Mkeqf2YUrtlywoSqXAhUfBxUGEqE/MEsTTf7uZ+M=
x-microsoft-antispam-prvs: <CY4PR21MB05029BFBC8F4B75F9733643AF5290@CY4PR21MB0502.namprd21.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(192374486261705)(211936372134217)(21748063052155)(21532816269658)(146099531331640)(201166117486090);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123558025)(20161123564025)(6072148)(6042181); SRVR:CY4PR21MB0502; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0502;
x-forefront-prvs: 0233768B38
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(7916002)(76104003)(24454002)(377454003)(575784001)(122556002)(50986999)(76176999)(86612001)(54356999)(5660300001)(6506006)(106116001)(2900100001)(7906003)(7736002)(6916009)(7696004)(92566002)(2950100002)(93886004)(6306002)(236005)(74316002)(99286003)(55016002)(189998001)(54896002)(54906002)(9686003)(4326008)(229853002)(10290500002)(790700001)(8676002)(6116002)(53546006)(102836003)(6436002)(25786008)(38730400002)(2906002)(53386004)(110136004)(3660700001)(966004)(53376002)(53936002)(6246003)(8990500004)(5005710100001)(19609705001)(10090500001)(3280700002)(86362001)(33656002)(77096006)(81166006)(8936002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0502; H:CY4PR21MB0504.namprd21.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_CY4PR21MB05047835E14B3D375C0538F6F5290CY4PR21MB0504namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2017 20:09:33.6859 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0502
Archived-At: <https://mailarchive.ietf.org/arch/msg/id-event/_QhNM14r0QbyXVxpHQJc2I4ewyc>
Cc: ID Events Mailing List <id-event@ietf.org>, Phil Hunt <phil.hunt@oracle.com>
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: Wed, 01 Mar 2017 20:09:38 -0000

I suspect that lots of non-OpenID-Connect OAuth 2.0 use cases also use the Client ID as the Audience value, especially since some OAuth clients don’t even have a URL associated with them.  Trying to prohibit the use of Client IDs as audiences will likely break things that we’re not even aware of.

From: William Denniss [mailto:wdenniss@google.com]
Sent: Wednesday, March 1, 2017 12:06 PM
To: Mike Jones <Michael.Jones@microsoft.com>
Cc: Phil Hunt <phil.hunt@oracle.com>; ID Events Mailing List <id-event@ietf.org>
Subject: Re: [Id-event] Thread: Clarifying use of sub and iss in SET tokens



On Wed, Mar 1, 2017 at 11:33 AM, Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>> wrote:
Hi William,

I appreciate you supporting using the standard definitions for “sub” and “iss”.  That said, I then find it confusing that you are suggesting that people be prohibited from using “aud” (audience) in the standard way.

I’ll also note that if you prohibit using “aud” in the standard way, you’ll both break the usage in the OpenID Connect Logout Token http://openid.net/specs/openid-connect-backchannel-1_0.html#LogoutToken and in SETs https://tools.ietf.org/html/draft-ietf-secevent-token-00#section-2.1.  Please let’s not go there.

I'm not suggesting an outright prohibition on "aud" being the client id, I realise my words were a little inarticulate.

I see "aud as client id" as the domain of OpenID Connect (since that's where that usage of "aud" was defined). I completely understand why Connect Logout uses "aud as client id" and would expect other Connect specs to do so – but these specs understand Connect and can be written to avoid problems (as Logout does).

My guidence would be that a non-Connect specs should use "aud as URI" (basically just !"aud as client id") to avoid accidently causing problems for Connect.

When constrained that way, what do you think of the guidance?

Implementations using both ID Tokens and SETs can already unambiguously distinguish between them by the presence of the “events” claim.  ID Tokens don’t use “events” whereas SETs do.  The fact that “nonce” is present in an ID Token but not SETs provides an extra means of rejecting SETs in ID Token contexts.  I don’t see there as being any actual practical problem to solve that rises to the level of causing us to do unnatural things to claims usage.

+1


                                                                -- Mike

From: William Denniss [mailto:wdenniss@google.com<mailto:wdenniss@google.com>]
Sent: Wednesday, March 1, 2017 11:21 AM
To: Phil Hunt <phil.hunt@oracle.com<mailto:phil.hunt@oracle.com>>; Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>>
Cc: ID Events Mailing List <id-event@ietf.org<mailto:id-event@ietf.org>>
Subject: Re: [Id-event] Thread: Clarifying use of sub and iss in SET tokens

My vote is for #1.  Iss and sub should take the definition from JWT.

I fear that following the "access token confusion mitigation" logic here basically means that "sub" can only be used by authorization & authentication protocols which is wasn't the intent of the spec<https://tools.ietf.org/html/rfc7519#section-4.1>.  What is the point of these standard claims if we can't use them? Will every new spec prohibit/rename a different standard claim? This isn't scalable, and is super confusing.

Back-channel logout "breaks" the id token mix-up by prohibiting<https://openid.net/specs/openid-connect-backchannel-1_0.html#LogoutToken> 'nonce'.  When I spoke to Breno about the overall risk, he suggested not reusing "aud" in other systems (like RISC, SCIM, etc). OpenID Connect defines "aud" to be the client-id. If *every other spec* uses a URI-based approach for aud and recommends not re-using audience URIs between systems, then we can avoid conflicts and usage mix-ups.

If I recall correctly in Buenos Aires, the preference of +Mike was to keep "sub" for compatibility with Backchannel Logout.

I hope we can avoid going around in circles on this security topic, how about I propose some new text for https://tools.ietf.org/html/draft-ietf-secevent-token-00#section-3.5 capturing the "aud" suggestion?  We can confine all such "access token confusion" matters to that section, and just build the best SET spec we can without needing to bake in hacks.

Mandating that different systems use non-overlapping "aud" sets doesn't not sound like a hack to me at all (unlike renaming "sub"), since the audience of a SET stream is surely different to that of an AuthZ/N token.



On Wed, Mar 1, 2017 at 10:27 AM, Phil Hunt <phil.hunt@oracle.com<mailto:phil.hunt@oracle.com>> wrote:
In the comments on idtoken-07, Yaron raised concerns around the confusion of “iss” of the subject of the event vs. issuer of the event.  The current text says that if there is a need to distinguish between “iss” of the “sub” vs. “iss” of the event, then the event should place the “iss” of the subject in the event payload area.

I agree this does seem awkward.

I have been thinking a related concern, that a SET could be confused as an access token if it has a “sub” value.  If we stop using “sub” then we’re potentially causing web access management systems to reject SETs as invalid access tokens — this is theoretically a GOOD THING.

PLEASE INDICATE 1 or 2, or provide additional discussion.

Two options:

1. Leave as is.

2.  Create a new attribute object, “esub” (event subject) which is a JSON object that contains the attributes needed to identify the subject.  For example:

We currently have:

   {

     "jti": "fb4e75b5411e4e19b6c0fe87950f7749",



     "sub": "248289761001",

     "iat": 1458496025,

     "iss": "https://my.examplemed.com<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"

         ]

       }

     }

   }

Could be represented as:

   {

     "jti": "fb4e75b5411e4e19b6c0fe87950f7749",



     “esub": {

       “sub”:"248289761001”,

       "iss":"https://connect.example.com”

     }

     "iat": 1458496025,

     "iss": "https://my.examplemed.com<https://my.examplemed.com/>",

     "aud": [

       "https://rp.example.com"

     ],

     "events": {

       "https://openid.net/heart/specs/consent.html":{

         "consentUri":[

           "https://terms.examplemed.com/labdisclosure.html#Agree"

         ]

       }

     }

   }

Comments:
* “sub” remains untouched in the sense that it retains the meaning used in traditional access tokens.
* “esub” contains the full information to address the subject.  No need to look around for a second “iss” (which may or may not be there)

To do this would require defining “esub” and sub-attributes like, “iss”, “sub” (which follow current defs), and probably “uri” for those entities that are referenceable as a URI.  Examples of URI subjects:
*  in implicit federation (from RISC):   “uri”:”mailto:phil.hunt@yahoo.com”
*  in SCIM where resources have URIs:  “uri”:”https://scim.example.com/Users/44f6142df96bd6ab61e7521d9"

One catch. Profiling specs would not be able to define new ways of addressing subjects with esub.

Phil

Oracle Corporation, Identity Cloud Services & Identity Standards
@independentid
www.independentid.com<http://www.independentid.com>
phil.hunt@oracle.com<mailto:phil.hunt@oracle.com>







_______________________________________________
Id-event mailing list
Id-event@ietf.org<mailto:Id-event@ietf.org>
https://www.ietf.org/mailman/listinfo/id-event