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

Paul Kyzivat <pkyzivat@alum.mit.edu> Wed, 10 July 2019 23:04 UTC

Return-Path: <pkyzivat@alum.mit.edu>
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 C259D120222 for <sipcore@ietfa.amsl.com>; Wed, 10 Jul 2019 16:04:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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 IcS_tGt-1xHS for <sipcore@ietfa.amsl.com>; Wed, 10 Jul 2019 16:04:30 -0700 (PDT)
Received: from outgoing-alum.mit.edu (outgoing-alum.mit.edu [18.7.68.33]) (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 4D1251201C9 for <sipcore@ietf.org>; Wed, 10 Jul 2019 16:04:30 -0700 (PDT)
Received: from PaulKyzivatsMBP.localdomain (c-24-62-227-142.hsd1.ma.comcast.net [24.62.227.142]) (authenticated bits=0) (User authenticated as pkyzivat@ALUM.MIT.EDU) by outgoing-alum.mit.edu (8.14.7/8.12.4) with ESMTP id x6AN4RS9001115 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for <sipcore@ietf.org>; Wed, 10 Jul 2019 19:04:28 -0400
To: sipcore@ietf.org
References: <156249821133.14592.1211919336596009446@ietfa.amsl.com> <CAD5OKxs6g+6mLbMRc9C0q5BSSn=+7HHzKf5Ya5uL-+RbhVfEaA@mail.gmail.com> <CAGL6epKfLWA=RW3T84feSud9sZ+TcpB=XRA6fvTzP-jL3h4+4A@mail.gmail.com> <CAD5OKxs3=XdOFYThY1gCu23M4nqJV-bJOSCU7-Ogn0J=xy+E3A@mail.gmail.com> <CAGL6epJWXBTcnNk3nMN3Yfsh5y6+pddQSW_MbkAdNZbmWf6_Gg@mail.gmail.com> <CAD5OKxt=sJhKGRRFPUon=JokbJ2Vb=P7GcfJ8LpXt_Yp-eOg3Q@mail.gmail.com> <393C0E68-5D0F-4AB5-B839-424C239E84A9@edvina.net> <CAGL6ep+Ovj0qQZZUvv1BA8ptNZBpp--GucJg6bbb7mUg3grN6g@mail.gmail.com> <BF387FC7-C951-420B-9C26-CC17C12738F0@edvina.net> <CAGL6epKrG1dBBKhrWKz=1Xa7Pmijscm_dwyBmA4=LdvFScQzmg@mail.gmail.com> <161D4FCD-FA4D-4494-AA72-27DF363BEA3B@edvina.net> <CAGL6epK=ma58LHQHd1=XQxBhr_-9r6xKupY6WFgs6RprFXgeew@mail.gmail.com> <B17C6499-C8BF-4204-B628-619F81A969DD@edvina.net> <5240BC21-613D-4C21-93A9-244C1AA3BAF4@edvina.net> <CAGL6epKPCK65FEYsrfqxPAKvj+_EfaANTaUGjUsts+7mpwgoDw@mail.gmail.com>
From: Paul Kyzivat <pkyzivat@alum.mit.edu>
Message-ID: <b2eac422-4d81-35a1-f5ad-aabe5b65774f@alum.mit.edu>
Date: Wed, 10 Jul 2019 19:04:27 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.7.2
MIME-Version: 1.0
In-Reply-To: <CAGL6epKPCK65FEYsrfqxPAKvj+_EfaANTaUGjUsts+7mpwgoDw@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/sipcore/KnFZiv1_jz0Zgy2q2-0gSdZzUUE>
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: Wed, 10 Jul 2019 23:04:34 -0000

On 7/10/19 6:52 PM, Rifaat Shekh-Yusef wrote:
> Typically, access token is short lived, and in this case it should be 
> used only to allow the UA to register the user.
> When the time comes to refresh the registration, the UA should use the 
> refresh token, which is long lived as it stays with the UA, to obtain a 
> new access token to update the registration.
> If you tie it to the registration expiry, then the access token might be 
> valid for a long time, which degrades the security of the token.

This puts a different spin on how a key ring of credentials is managed. 
Either the key ring always have the refresh token, or else perhaps it 
should contain both, but they should have different expiry times.

This goes well beyond anything described in 3261, so I think an 
explanation is needed.

	Thanks,
	Paul

> There are better mechanisms for a proper indication of account 
> revocation, like the mechanisms defined by the Security Events WG:
> https://datatracker.ietf.org/wg/secevent/documents/
> 
> Regards,
>   Rifaat
> 
> 
> 
> On Wed, Jul 10, 2019 at 9:17 AM Olle E. Johansson <oej@edvina.net 
> <mailto:oej@edvina.net>> wrote:
> 
> 
> 
>>     On 10 Jul 2019, at 15:08, Olle E. Johansson <oej@edvina.net
>>     <mailto:oej@edvina.net>> wrote:
>>
>>
>>
>>>     On 10 Jul 2019, at 14:30, Rifaat Shekh-Yusef
>>>     <rifaat.ietf@gmail.com <mailto:rifaat.ietf@gmail.com>> wrote:
>>>
>>>     This does not explain the reason for such a requirement.
>>>     Why do you think we need to couple these together for SIP?
>>     I don’t want to continue delivering services to clients that are
>>     deleted or blocked in the customer database.
>>     With Oauth, the way to block an account is to remove it or change
>>     authorization in the authentication server (IDP) data base.
>>
>>     The idea with auth tokens and refresh tokens is to be able to
>>     revocate authorization quickly.
>>     Delivering a service beyond revocation is not a good thing in my book.
>>
>>     From the definition of Access Token in section 1.4 in RFC 6749:
>>
>>     "Access tokens are credentials used to access protected resources. An
>>         access token is a string representing an authorization issued to the
>>         client.  The string is usually opaque to the client.  Tokens
>>         represent specific scopes and durations of access, granted by the
>>         resource owner, and enforced by the resource server and authorization
>>         server.
>>     “
>>
>>     "Duration of access" is in my world coupled to SIP
>>     registration/subscription expiry.
>>
> 
>     You have actually implicitly written that expiry time accords to
>     token expiry :
> 
>     "2..3
>     <https://tools.ietf.org/html/draft-ietf-sipcore-sip-token-authnz-02#section-2.3>.
>     Subsequent Registrations
> 
>         All subsequent REGISTER requests from the UA MUST include a valid
>         access token.  The UA MUST obtain a new access token before the
>         access token expiry period to continue to get service from the
>         system.
> 
>     “
> 
>     You just need to add that the server MUST not allow an expiry that
>     is greater than
>     the access token expiry time.
> 
>     /O
> 
> 
>>     Cheers
>>     /O
>>
>>>
>>>     Regards,
>>>      Rifaat
>>>
>>>
>>>
>>>
>>>     On Wed, Jul 10, 2019 at 8:25 AM Olle E. Johansson <oej@edvina.net
>>>     <mailto:oej@edvina.net>> wrote:
>>>
>>>
>>>
>>>>         On 10 Jul 2019, at 14:18, Rifaat Shekh-Yusef
>>>>         <rifaat.ietf@gmail.com <mailto:rifaat.ietf@gmail.com>> wrote:
>>>>
>>>>         The UA is expected to obtain a valid access token to get
>>>>         service, and should be able to use that to refresh its
>>>>         registration when the registration expires.
>>>>         Is this coupling of expiry times needed?
>>>         Absolutely. If we grant a REGISTER expiry time that is much
>>>         longer than the expiry of the token, we’re in deep waters.
>>>
>>>         Example from RFC 7635 Stun/Oauth - which I think we can
>>>         borrow a lot from:
>>>
>>>         “ o The lifetime provided by the TURN server in the Allocate and
>>>
>>>                Refresh responses MUST be less than or equal to the lifetime of
>>>                the token.  It is RECOMMENDED that the TURN server calculate the
>>>                maximum allowed lifetime value using the formula:
>>>
>>>                  lifetime + Delta - abs(RDnew - TS)
>>>
>>>                The RECOMMENDED value for the allowed Delta is 5 seconds.
>>>
>>>         “
>>>
>>>         Note that they have a “MUST” on this. I think we MUST do the
>>>         same :-)
>>>         /O
>>>
>>>>
>>>>         Regards,
>>>>          Rifaat
>>>>
>>>>
>>>>         On Wed, Jul 10, 2019 at 7:56 AM Olle E. Johansson
>>>>         <oej@edvina.net <mailto:oej@edvina.net>> wrote:
>>>>
>>>>
>>>>
>>>>>             On 10 Jul 2019, at 13:50, Rifaat Shekh-Yusef
>>>>>             <rifaat.ietf@gmail.com <mailto:rifaat.ietf@gmail.com>>
>>>>>             wrote:
>>>>>
>>>>>             When the UA authenticates to the AS, it obtains a
>>>>>             number of tokens: access token and refresh token, and
>>>>>             depends on the AS, maybe ID token.
>>>>>             It is the UAs responsibility to use the refresh token
>>>>>             to obtain a new access token before the expiry of the
>>>>>             existing access token.
>>>>             Absolutely - my thought was what the server is supposed
>>>>             to do. Reading the STUN/Oauth docs, I see a requirement
>>>>             for expiry
>>>>             being less than token validity time. In SIP
>>>>             REGISTER/SUBSCRIBE terms, the expiry time in SIP should
>>>>             be less
>>>>             than the time the token is valid.
>>>>
>>>>              If the token expires, the server needs to reauth or
>>>>             deny services. It is important that no services are
>>>>             delivered to an expired authentication.
>>>>
>>>>             /O
>>>>>
>>>>>             Regards,
>>>>>              Rifaat
>>>>>
>>>>>
>>>>>             On Wed, Jul 10, 2019 at 2:44 AM Olle E. Johansson
>>>>>             <oej@edvina.net <mailto:oej@edvina.net>> wrote:
>>>>>
>>>>>
>>>>>
>>>>>>                 On 10 Jul 2019, at 02:53, Roman Shpount
>>>>>>                 <roman@telurix.com <mailto:roman@telurix.com>> wrote:
>>>>>>
>>>>>>                 On Tue, Jul 9, 2019 at 8:30 PM Rifaat Shekh-Yusef
>>>>>>                 <rifaat.ietf@gmail.com
>>>>>>                 <mailto:rifaat.ietf@gmail.com>> wrote:
>>>>>>
>>>>>>                     The document clearly allows the use of access
>>>>>>                     token to authenticate non-REGISTER requests
>>>>>>                     when challenged in the context of the same realm.
>>>>>>
>>>>>>                     Whether that is needed or not is a different
>>>>>>                     discussion.
>>>>>>                     Assuming the UA was able to authenticate the
>>>>>>                     user and obtain an access token, then
>>>>>>                     establish an authenticated TLS channel with
>>>>>>                     the server, and register the user; is there a
>>>>>>                     need for further challenges from server?
>>>>>>
>>>>>                 When the token expires, you certainly need a new
>>>>>                 token from the user. With SIP Outbound, we’re more
>>>>>                 connection oriented than before, so we should
>>>>>                 propably consider what the
>>>>>                 server does with the connection when a token
>>>>>                 expires (if it’s not already in the draft).
>>>>>                 /O
>>>>>>
>>>>>>                 Typically, for SIP, user authentication is not
>>>>>>                 tied to the TLS connection. One of the reasons for
>>>>>>                 this is that multiple users can use the same TLS
>>>>>>                 connection in federated systems. This is
>>>>>>                 especially true for Confidential UA, which have
>>>>>>                 trust relationship with a proxy and can maintain a
>>>>>>                 secure connection to the registrar/proxy on behalf
>>>>>>                 of multiple clients..
>>>>>>
>>>>>>                 Once again, it would be much easier to discuss if
>>>>>>                 you can provide a use specific case for OAuth with
>>>>>>                 confidential UA. I can easily think of a OAuth use
>>>>>>                 case for Public User Agent, but only have a vague
>>>>>>                 idea what OAuth with Confidential UA would be.
>>>>>>
>>>>>>                 The example I can think of, would be some sort of
>>>>>>                 hot desk application, where user allows a Local
>>>>>>                 PBX to register with User Home PBX to accept calls
>>>>>>                 on behalf of user in a remote location. In this
>>>>>>                 case, Local PBX and User Home PBX will be
>>>>>>                 federated systems which will use a single TLS
>>>>>>                 connection for multiple calls or end user devices.
>>>>>>                 Local PBX and User Home PBX will have a trust
>>>>>>                 relationship, possibly with mutual TLS certificate
>>>>>>                 authentications. A company wide directory server
>>>>>>                 will be used to store actual user credentials and
>>>>>>                 will be used to authenticate the user and generate
>>>>>>                 the token.
>>>>>>
>>>>>>                 Best Regards,
>>>>>>                 _____________
>>>>>>                 Roman Shpount
>>>>>>                 _______________________________________________
>>>>>>                 sipcore mailing list
>>>>>>                 sipcore@ietf.org <mailto:sipcore@ietf.org>
>>>>>>                 https://www.ietf.org/mailman/listinfo/sipcore
>>>>>
>>>>>             _______________________________________________
>>>>>             sipcore mailing list
>>>>>             sipcore@ietf.org <mailto:sipcore@ietf.org>
>>>>>             https://www.ietf.org/mailman/listinfo/sipcore
>>>>
>>>
>>>     _______________________________________________
>>>     sipcore mailing list
>>>     sipcore@ietf.org <mailto:sipcore@ietf.org>
>>>     https://www.ietf.org/mailman/listinfo/sipcore
>>
> 
> 
> _______________________________________________
> sipcore mailing list
> sipcore@ietf.org
> https://www.ietf.org/mailman/listinfo/sipcore
>