Re: [sipcore] I-D Action: draft-ietf-sipcore-sip-token-authnz-02.txt

Christer Holmberg <christer.holmberg@ericsson.com> Thu, 11 July 2019 20:08 UTC

Return-Path: <christer.holmberg@ericsson.com>
X-Original-To: sipcore@ietfa.amsl.com
Delivered-To: sipcore@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6BBE4120168 for <sipcore@ietfa.amsl.com>; Thu, 11 Jul 2019 13:08:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 WticcV4fBKrv for <sipcore@ietfa.amsl.com>; Thu, 11 Jul 2019 13:08:01 -0700 (PDT)
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on060d.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe06::60d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1A1A012022E for <sipcore@ietf.org>; Thu, 11 Jul 2019 13:08:00 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VLx3xldNTXAvlH8TYrydDXIU9U83+eqnFx7BIUgyIqbO3/7fIS+pfE74HksdguFZ8gGx9lbhiGue+rRPGaYQ1ZmrQaFOJ6XewmGYtegv1DSxkL+u1iG3w1H8v1hl3FPaOzhpidSMc0nO6Ux6WIop2Y1Fg0iKGrgUwuwZeKqCPBMvGINqUQaljIdsTf5jv8hHpXrx/JYcR2UXiH+zYHjQxz2ChBOjvuO9siwt28FWhu/EFft6MDhTltQCdZTcIc3vFwoSoczEtWrpLWUdBdPoTMRF+CbVv0YO2i87X0SCKY/xIP+OTIN3G1j5/edfuq9D9ht2PSnFnF/zc5whc6kjOA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zu4CyH6CQkfakqtEu1NvUmtZZjBeaS9enM679N1sVdY=; b=kIHEBP8u6aBzDXwXCkzhSUslZbmJklXuaMYPBZhUlfC1UiWAjoTUL0jwnl2/Aw7Qdq/soYkFJ1EoyK3rfFbM5pgArlVIAY4Fp/ZJ/t/+/ciVklct97baGZrqGxUHfdhDsdmfSEFD1IfRp9UxLen77D1oIeY/ev5muKtAPTDJtRhw2CM8ffw30rDAsp/0PVGYrIoCa3koF4sovY7JYKuFiDtdBScNvxgWZq4SG9I6G/bJ0F1WLmTdi+W6qXceKelhdLOAOcB/sHU87deqS48Am/+OOv8TaqBdlpwXUQpjoyeJeDHh13CSljD6pohnUNFxNbx6wHUoqF2O0jlNJAZh3w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=ericsson.com;dmarc=pass action=none header.from=ericsson.com;dkim=pass header.d=ericsson.com;arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zu4CyH6CQkfakqtEu1NvUmtZZjBeaS9enM679N1sVdY=; b=Fs6DE9mz29Q8RNl+VkAvCmij96dQl5hWujYojVXtkZHAFBC1K3wb/m7A/G6V8XZN+UQwuTPa6CXRPaz166fGtlAEbGdptLIy7AExxdMrHKZc90YuuybGDyF9gC18Bd0clKmz1lQ3RC888mzSNIx19OEAXN6KzNuD4u4YLQrB5vM=
Received: from HE1PR07MB3161.eurprd07.prod.outlook.com (10.170.245.23) by HE1PR07MB4188.eurprd07.prod.outlook.com (20.176.166.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.9; Thu, 11 Jul 2019 20:07:58 +0000
Received: from HE1PR07MB3161.eurprd07.prod.outlook.com ([fe80::5050:a3a9:be80:cf43]) by HE1PR07MB3161.eurprd07.prod.outlook.com ([fe80::5050:a3a9:be80:cf43%5]) with mapi id 15.20.2073.008; Thu, 11 Jul 2019 20:07:57 +0000
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: "Olle E. Johansson" <oej@edvina.net>
CC: Paul Kyzivat <pkyzivat@alum.mit.edu>, "sipcore@ietf.org" <sipcore@ietf.org>
Thread-Topic: [sipcore] I-D Action: draft-ietf-sipcore-sip-token-authnz-02.txt
Thread-Index: AQHVNLWxruT/m/C2REGBvr04oIfCDqa/Al8AgAHwRACAACa0QIAAOvWAgACKbgCAAH00gIAARqSA///Z+ACAADMUgP//1TCAgABAXACAATj+gIAAOeSAgABE8QCAALlBgIAAP24AgAA4AgCAADVqAP//0S4AAAcGhID//9/GgP//9LiA
Date: Thu, 11 Jul 2019 20:07:57 +0000
Message-ID: <HE1PR07MB31610DB548275EF0FBED1A8293F30@HE1PR07MB3161.eurprd07.prod.outlook.com>
References: <156249821133.14592.1211919336596009446@ietfa.amsl.com> <CAGL6epLsP_UfZMAcFLsORrR05Enu-vp=jnkgUFuKSttQm8swAw@mail.gmail.com> <c8d5c42e-ab21-80e8-3189-c8592dd02d3a@alum.mit.edu> <HE1PR07MB3161C55955B2FCED2C0F6A9993F60@HE1PR07MB3161.eurprd07.prod.outlook.com> <68ed93ae-57df-6bc7-774b-47959417abda@alum.mit.edu> <HE1PR07MB3161D46B4A44FC7E789ADDB893F10@HE1PR07MB3161.eurprd07.prod.outlook.com> <4a9787e5-b5e2-bc08-0fa0-fae6bd44148d@alum.mit.edu> <527F4C39-F065-4335-A939-6D443F1801E7@ericsson.com> <5bb63c0c-130d-7f69-10b0-1ed1b274cc58@alum.mit.edu> <87AD4BB8-CE77-4FD7-BB72-6643DF513058@ericsson.com> <168b1354-b35b-edee-e5f9-d4ddbecfae40@alum.mit.edu> <607A513F-8616-4777-8B5E-59390E845709@ericsson.com> <b6ca4c79-5a17-10da-3882-20bc8b0e9b98@alum.mit.edu> <89A28FAE-A25A-4AFF-9A94-91E09FDD6C3B@ericsson.com> <2aa8cb91-aac6-b66e-e54a-b9f6c650ce02@alum.mit.edu> <D7218ABE-F204-407B-ADE1-39DAB98C2A98@ericsson.com> <cd23be26-c383-8b72-cdf1-4436a6bc175f@alum.mit.edu> <3B02CDE8-77C3-4DD8-940B-8B41993FFD1D@edvina.net> <C87ED703-09CE-452F-AF03-ECD05BAF6334@ericsson.com> <104E5E9E-8294-4DE0-A2DA-19199C2CD2BE@edvina.net> <88220567-FF78-4680-B724-1FB9D72F2FBD@ericsson.com> <60E252FC-6B02-4B6C-9034-157909BF72E8@edvina.net>
In-Reply-To: <60E252FC-6B02-4B6C-9034-157909BF72E8@edvina.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=christer.holmberg@ericsson.com;
x-originating-ip: [62.113.190.248]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: bed07582-e397-4caa-0563-08d7063b77da
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:HE1PR07MB4188;
x-ms-traffictypediagnostic: HE1PR07MB4188:
x-microsoft-antispam-prvs: <HE1PR07MB4188A8F1466B5E8ADDD46DDE93F30@HE1PR07MB4188.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0095BCF226
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(366004)(376002)(396003)(39860400002)(136003)(199004)(189003)(14444005)(66946007)(256004)(76116006)(186003)(102836004)(66446008)(64756008)(66556008)(66476007)(26005)(14454004)(71190400001)(5660300002)(86362001)(2906002)(74316002)(66066001)(33656002)(6506007)(229853002)(3846002)(6116002)(316002)(81156014)(9686003)(44832011)(476003)(305945005)(8676002)(54906003)(25786009)(66574012)(478600001)(6916009)(4326008)(76176011)(7696005)(55016002)(81166006)(52536014)(71200400001)(446003)(99286004)(53936002)(6246003)(8936002)(68736007)(6436002)(486006)(7736002)(11346002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB4188; H:HE1PR07MB3161.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: R4Oe1yAHyMA+au4C281ob32vyQE7ymZ9nFEafAa76MjBQ9og6x/VbzG0+qtKCJFSU1EutTDdhXEWMUq0VOuFGWRG/YdRfZ8hyu20+GhIVfltNzzrWlRuc2YRNWMErRPiYNi7pnVnBG+0FEcq6t1p0hGIKsBvQHU8S7qz7I8IF5LQ6HqAj9n3OCMv8e8E3Smbs/ftXcl2Ldn9xdwDVk8NeNTIJJsoESYIw8mHddhvq32Q7HVjTdOs7k6wo0zt3bGBiBHdPsJEjENbbduAI8ztGd38DnqzBy9fdNoReNCWl9mJMlPh4hHmJltIy0GCt1jCR4CuHI0zP10eIK+Vk/R2utQPV8wu57DKpamrjxI0cscVd+rYiWz3Emk14N/RxkFZAvRo9SDkRTjC7UfLbLoPTpBGv38EH0WfoiIgYpd8HfE=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: bed07582-e397-4caa-0563-08d7063b77da
X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jul 2019 20:07:57.8419 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: christer.holmberg@ericsson.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB4188
Archived-At: <https://mailarchive.ietf.org/arch/msg/sipcore/GvfbNj_aoXw1LkdeHN-UkCetvRY>
Subject: Re: [sipcore] I-D Action: draft-ietf-sipcore-sip-token-authnz-02.txt
X-BeenThere: sipcore@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SIP Core Working Group <sipcore.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sipcore>, <mailto:sipcore-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sipcore/>
List-Post: <mailto:sipcore@ietf.org>
List-Help: <mailto:sipcore-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sipcore>, <mailto:sipcore-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 11 Jul 2019 20:08:05 -0000

Hi,

>>>>>>>>> All I am saying is that one should not send a token to someone that it has NOT been issued for.
>>>>>>>>      Then you are saying that a token should *never* be included 
>>>>>>>> in a request  to a target for which you have not received a 
>>>>>>>> challenge some time in the  past.
>>>>>>>>      That is a bit extreme, but I guess you can specify that if 
>>>>>>>> you think it  is the right thing to do.
>>>>>>> That is my understanding of the generic OAuth security considerations: you don't give a token to someone it was not intended for.
>>>>>>> Of course, if you know (based on whatever configuration/policy) that it's ok to give the token to the target I guess you could do it.
>>>>>>> 
>>>>>>>>  But note that this logic won't always work for 
>>>>>>>> Proxy-Authenticate. You
>>>>>>>>  *might* know that a particular proxy will be visited (if it is 
>>>>>>>> mentioned  on a Route header), but it is pretty common for the 
>>>>>>>> request to visit  proxies unknown (at least in advance) to the UAC.
>>>>>>> It is important to remember that, since the token needs to be protected, a proxy needs to have the associated protection credentials to be able to access the token.
>>>>>> 
>>>>>> I'm lost here. How is the token protected? Is it because it is passed by reference, and other credentials are needed to dereference it? Or is it passed by value but encrypted?
>>>>>> 
>>>>>> If it is protected, then why is there any concern over who it is given to?
>>>>> 
>>>>> Normally most tokens are just digitially signed, but clear text. It 
>>>>> can be encrypted, but then the auth server need to know which key pair to encrypt it with, which in turn means that the client needs 
>>>>> to tell the auth server that which leads to a requirement to have parseable access tokens.
>>>> 
>>>>   I think the oauth2 token can be delivered non-encrypted to the SIIP UA over HTTPS. The SIP UA can then encrypt the oauth2 token before sending it over SIP.
>>> Now you have to have a shared key pair between every UA and the intended SIP server. That’s far more complex than having it in the authorization server.
>> 
>>    Now we are coming back to where this would actually be used :)
>> 
>>    Again, the only use-case I am aware of is SIP registration, and then the only "intended SIP server" is the registrar.
> And you may pass through a number of SIP proxys on the way.

Yes, but they will not be "intended server" (read: authorized to see the oauth2 token), so no need to store any keys for those proxies. Only the registrar is the "intended server".

> There has been many mails questioning the focus on registration. You keep coming back to that - what is so different with authentication 
> for a REGISTER than other SIP methods in your view? I’m curious.

The number or entities that will authenticate the UA. You were talking about having keys for the UA and every intended server. In case of registration, the only "intended server" is the registrar.

Of course, there may also be other use-cases where there is only one (or a few) intended server, e.g,, a SIP subscription service. I am not saying registration is the only one. 

>> In any case, I think this is a deployment question, so we don't need to mandate one way or another. What matters is that the JWT is protected on the SIP interface.
> I believe others are working on that part - confidentiality between authorization server and resource server.

Yes. 

>>> You put a lot of trust in TLS, which is fine. How do you handle intercepting TLS proxys in the path in this scenario?
>> 
>>    I guess we'd have to ask the OAuth experts about that, but in 
>> general I think we can put as much trust in HTTPS as any else does :)
> Which means almost no trust any more...

Well, if one doesn't trust OAuth then he/she should obviously not use it. But, I don't think this is the place to discuss/improve the generic security of OAuth.

>> At the end of the day, you have to choose a solution that fits your use-case. Maybe this solution isn't feasible for all use-cases, even if it technically 
>> supports them. OAuth may fit certain use-cases better than others, and there is nothing we can do about that.
>
> Depends on the definition of “this solution”.

OAuth in general, and the usage of OAuth for SIP authentication.

> I do agree that Oauth2 may not fit all use cases for SIP, but any step away from the current Digest Auth is a step forward.

Sure, but I personally don’t think OAuth will be feasible for all use-cases where Digest is currently used - especially not for user-to-user authentication. It's not what OAuth was designed for, AFAIK.

> If you read up on the large amount of drafts and RFCs from the Oauth wg and OpenID connect you’ll find that they are targeting many types of situations 
> that would fit not only browser-based SIP ua’s but also SIP desktop phones and maybe ATA-like boxes.

Absolutely.

> Mutual TLS cert auth hasn’t taken off, which is the only alternative we currrently have. I do hope we can sort this out and document a good framework.

Me too :)

Regards,

Christer