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

"Olle E. Johansson" <oej@edvina.net> Thu, 11 July 2019 19:00 UTC

Return-Path: <oej@edvina.net>
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 E1E9F120495 for <sipcore@ietfa.amsl.com>; Thu, 11 Jul 2019 12:00:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 Q2xRhzmGV3Qy for <sipcore@ietfa.amsl.com>; Thu, 11 Jul 2019 12:00:04 -0700 (PDT)
Received: from smtp7.webway.se (smtp7.webway.se [212.3.14.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 61858120331 for <sipcore@ietf.org>; Thu, 11 Jul 2019 12:00:03 -0700 (PDT)
Received: from haworthia-20.webway.org (h-205-16.A165.corp.bahnhof.se [176.10.205.16]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp7.webway.se (Postfix) with ESMTPSA id 21578A40; Thu, 11 Jul 2019 21:00:00 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
From: "Olle E. Johansson" <oej@edvina.net>
In-Reply-To: <88220567-FF78-4680-B724-1FB9D72F2FBD@ericsson.com>
Date: Thu, 11 Jul 2019 20:59:59 +0200
Cc: Olle E Johansson <oej@edvina.net>, Paul Kyzivat <pkyzivat@alum.mit.edu>, "sipcore@ietf.org" <sipcore@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <60E252FC-6B02-4B6C-9034-157909BF72E8@edvina.net>
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>
To: Christer Holmberg <christer.holmberg@ericsson.com>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <https://mailarchive.ietf.org/arch/msg/sipcore/us3zKd0ZrLNv60gNpxoANQqr0Kk>
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 19:00:12 -0000


> On 11 Jul 2019, at 19:55, Christer Holmberg <christer.holmberg@ericsson.com> wrote:
> 
> 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.

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.

> 
>    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.

> 
>> 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...
> 
>    And, for the SIP registration case, I don't think it even would be a problem for the authorization server to maintain the keys of the UA and the registrar.
Agree for many more use cases than just registration :-)
> 
>    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”. 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.
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.

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.

/O
> 
>    Regards,
> 
>    Christer
> 
> 
> 
> 
>