Re: [sipcore] Benjamin Kaduk's Discuss on draft-ietf-sipcore-sip-token-authnz-13: (with DISCUSS and COMMENT)

"Olle E. Johansson" <oej@edvina.net> Sat, 25 April 2020 06:42 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 BDB1A3A0B3C; Fri, 24 Apr 2020 23:42:35 -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, 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 ONxfAidSiiYT; Fri, 24 Apr 2020 23:42:33 -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 31E333A0B3A; Fri, 24 Apr 2020 23:42:32 -0700 (PDT)
Received: from pinguicula.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 35EAB2182; Sat, 25 Apr 2020 08:42:28 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: "Olle E. Johansson" <oej@edvina.net>
In-Reply-To: <34A7E724-6E92-4C66-95B5-22F3A22F8CE3@ericsson.com>
Date: Sat, 25 Apr 2020 08:42:27 +0200
Cc: Olle E Johansson <oej@edvina.net>, Benjamin Kaduk <kaduk@mit.edu>, Paul Kyzivat <pkyzivat@alum.mit.edu>, The IESG <iesg@ietf.org>, "draft-ietf-sipcore-sip-token-authnz@ietf.org" <draft-ietf-sipcore-sip-token-authnz@ietf.org>, "sipcore@ietf.org" <sipcore@ietf.org>, "sipcore-chairs@ietf.org" <sipcore-chairs@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <F656768B-546F-4FA9-861C-671A2C8286EA@edvina.net>
References: <158766991009.32224.6031347936963900326@ietfa.amsl.com> <60a98de4-a8cd-5910-17f9-6849d71f4d8e@alum.mit.edu> <B61DF7BD-C304-47AA-AB10-2095CC621E5A@edvina.net> <79245079-4BE2-4CA1-9B8F-E7E71AD38458@ericsson.com> <20200424201316.GX27494@kduck.mit.edu> <34A7E724-6E92-4C66-95B5-22F3A22F8CE3@ericsson.com>
To: Christer Holmberg <christer.holmberg@ericsson.com>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/sipcore/liX6jQZimWB-27BLjjI8_Bw4DNM>
Subject: Re: [sipcore] Benjamin Kaduk's Discuss on draft-ietf-sipcore-sip-token-authnz-13: (with DISCUSS and COMMENT)
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: Sat, 25 Apr 2020 06:42:36 -0000


> On 24 Apr 2020, at 23:51, Christer Holmberg <christer.holmberg@ericsson.com> wrote:
> 
> Hi,
> 
>>>>>> RFC 3261 seems to be written in a world that assumed that Basic and Digest
>>>>>> are the only defined HTTP authentication schemes, and since it prohibits
>>>>>> Basic, that there would only be one authentication challenge (type)
>>>>>> possible.  This text righly acknowledges that we are opening the field up
>>>>>> and could have cases where multiple authentication schemes are possible;
>>>>>> however, it goes even further and admits the possibility of using them
>>>>>> simultaneously.  It seems like this places an onus on us to give some
>>>>>> indication of the semantics when multiple schemes are used at the same time.
>>>>>> Do the authenticated identities need to match?  Or are we asserting that
>>>>>> both/all identities are consenting to the request in question?  (If we don't
>>>>>> have a concrete use case in mind, perhaps the "or more" is just opening a
>>>>>> box that we don't need to open right now.)
>>>>> 
>>>>> I pushed quite a bit on this area during the development of this draft. As you note we are definitely expanding into an area that wasn't anticipated in RFC3261.
>>>>> The whole topic of how authentication works in the presence of multiple schemes and realms could use some elaboration. The authors of this draft were
>>>>> reluctant to get into those weeds. It isn't clear what the right mechanism is to do that.
>>>>> 
>>>>> I had a (non-sip) use case in mind: a site I visit allows you register directly with the site, resulting in an ability to use Digest credentials. The login page on the
>>>>> site offers that as an option, along with the alternatives of Facebook, Google, and maybe some others. I can see something just like that for SIP. Presumably it
>>>>> would be achieved by challenging with Digest and also with Bearer for Facebook, Google, etc. The UAC then "chooses" by delegating the choice to the user through the UI.
>>>>> 
>>>>> This is also the case where the "whitelist" really resides within the end user's head rather than in the UAC.
>>>>> 
>>>>> It gets harder for devices that might be connecting when there is no end user present. This can happen with a "phone" that attempts to be permanently registered
>>>>> to its sip server so that in can receive incoming calls. If it reboots in the middle of the night there is no user handy to interact in the authentication process. It all
>>>>> has to take place using credentials preconfigured (or cached) in the UAC.
>>>> 
>>>> I think it’s critical - and I’ve also raised the issue before like Paul - that we develop a BCP for the various combinations we have - both two types of digest algorithms and now the OAuth2/OpenID Connect.
>>>> There are huge risks of mis-configured platforms allowing for downgrade attacks, so even if you’ve added stronger authentication, someone will misuse your system because MD5 was still open with simple passwords for some very old SIP phones.
>>> 
>>> I agree that such BCP (or whatever form it would take) would be useful. As I said before, I think it should be done as a separate task.
>> 
>> How much do you think would be SIP-specific in such a document, vs. being
>> applicable to both SIP and HTTP?
> 
>    I don't know - perhaps there would be nothing SIP-specific. 
Food for thought. As mentioned earlier SIP has more proxys, ingress proxys between the authenticating part
and the client. Let’s start and see where it goes.
> 
>>>    Therefore, in the authnz draft the suggestion is to say that the processing is based on "local policy".
>> 
>> I'm happy to leave the choice of which one to use as up to local policy,
>> but would object to giving local policy the ability to use multiple
>> mechanisms in combination without defining the semantics of such
>> combinations.

Based on personal experience, referring to local policy results in “do whatever you want” which in
all likelyhood means opening for problems. We need guidelines here.

>> 
>>> If people want, we can add a note saying that a future specification may provide more detailed procedures and guidance regarding processing multiple schemes.
>> 
>> That seems reasonable, if consistent with the above.
> 
>    I suggest the following:
> 
> OLD:
> 
>   If the UAC receives a 401/407 response with multiple WWW-
>   Authenticate/Proxy-Authenticate header fields, providing challenges
>   using different authentication schemes for the same realm, the UAC
>   provides credentials for one or more of the schemes that it supports,
>   based on local polic
> NEW:
> 
>   If the UAC receives a 401/407 response with multiple WWW-
>   Authenticate/Proxy-Authenticate header fields, providing challenges
>   using different authentication schemes for the same realm, the UAC
>   provides credentials for one of the schemes that it supports,
>   based on local policy.
> 
>   NOTE: At the time of writing this specification, detailed procedures for the cases where a UAC receives multiple 
>   different authentication schemes had not been defined. A future specification might define such procedures.
> 
Until we have a point where we know we can securely handle multiple authentication schemes from the same UAS,
I think we should recommend one policy per realm and/or domain.

That will mean that until we have the BCP we determine method per device - new devices gets the challenge
that they support and we limit the possibilities of downgrade attacks.

/O