Re: [sipcore] Thoughts about draft-ietf-sipcore-sip-token-authnz-02.txt - Dale's comments

Christer Holmberg <christer.holmberg@ericsson.com> Sat, 13 July 2019 07:25 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 5B531120112 for <sipcore@ietfa.amsl.com>; Sat, 13 Jul 2019 00:25:41 -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 DPoj2Lff0jlF for <sipcore@ietfa.amsl.com>; Sat, 13 Jul 2019 00:25:37 -0700 (PDT)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60066.outbound.protection.outlook.com [40.107.6.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 46C2A1200BA for <sipcore@ietf.org>; Sat, 13 Jul 2019 00:25:36 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GDUYJUaiVmvBxZ8aTdDVZaq6o77mJNkv0S7kgtoa9rcByHeOroneV5SRXYJ6fd1GhLkpqH1+DlYBWa2ZNBx+q6UJCbbcicxtY0dG+laF+0ArRsufyTgSAXr9uWuhi538BoBzyX9QNPMJtHGLx81oqwgTmPC0EN/v3cj2hqNbTDuiEkmIMTokk5CqlNxNlcqEmS+zMpJylGvRPb+fd9L17yey9rDRmccR+4FVF61ijLar/u9k/j3yPcbZ5gSyvBQYZT4Xk6cmkzjcmPdaRban7MzIEFJJWv0ywsSJpJCebjU1v49zlHAZsq5infFW6QN+c7vW5S6N/RxqfX8outf0TQ==
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=U/30NjLfIVHuWor7/VsGDJjfg8JmMevfT2oKDOARBd8=; b=BJ3Gb0a1i6OCkEtEIP2mxvCM2MN49cuZIu+MHjiigUtWmHQVoZpS7L5noMNniYe+2oUJG8DX+vM4QWBqhxgdXJ/qrgTTZLc9H8TTbpK5bOHiSMBzIOdrIO79AxdHPmcGxt/prvChgAzY8SsnTHdZTEDhWP+dx0Ak/9xzBzCV732/8BMdWTmXpyO+rUGpPFX/q6jpz3S8APhkmSC4P0FXcRTNlKQKr/6cwZdp2Gijh4QKn/+83ujjJ48ivMiM0cLTxYj8LyHxg1O/SE+hCh5OphbzIeuJ6OX+Aezg2WeZuRCsm+49rK5O7TndYhShU1Qm/GqSX8JeDUhSXRzEkQubYw==
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=U/30NjLfIVHuWor7/VsGDJjfg8JmMevfT2oKDOARBd8=; b=GdXqQiu6Xt4doFLqPjwvY0LVB+/BqCpJQgt42yUpPkoog9PoZQazwyAX4T/yVWQT08Dr0zjtJ9h/hmNI69VordCZaBCBxYHV15pqmJUW2cMHccL4/7RISiK281LhoE5Ug3IZPK/zEogHTWekJDGyxgl9a+ApMVjLPCXBXCWzHbc=
Received: from HE1PR07MB3161.eurprd07.prod.outlook.com (10.170.245.23) by HE1PR07MB3291.eurprd07.prod.outlook.com (10.170.246.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.10; Sat, 13 Jul 2019 07:25:32 +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; Sat, 13 Jul 2019 07:25:32 +0000
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: "Dale R. Worley" <worley@ariadne.com>, "sipcore@ietf.org" <sipcore@ietf.org>
Thread-Topic: [sipcore] Thoughts about draft-ietf-sipcore-sip-token-authnz-02.txt - Dale's comments
Thread-Index: AdU5STutUuxJM/tFSNeInGKMSi7MIA==
Date: Sat, 13 Jul 2019 07:25:31 +0000
Message-ID: <HE1PR07MB316161BA8A7FC9516BB0665493CD0@HE1PR07MB3161.eurprd07.prod.outlook.com>
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: [178.55.156.56]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: c19b0ff8-34db-4c33-32d4-08d707634a1e
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:HE1PR07MB3291;
x-ms-traffictypediagnostic: HE1PR07MB3291:
x-microsoft-antispam-prvs: <HE1PR07MB3291F1A3E9E66B6D42F3A26093CD0@HE1PR07MB3291.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 00979FCB3A
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(4636009)(376002)(136003)(396003)(366004)(346002)(39860400002)(189003)(199004)(66066001)(25786009)(53936002)(5660300002)(9686003)(55016002)(71190400001)(7736002)(305945005)(71200400001)(229853002)(66446008)(66476007)(64756008)(66556008)(74316002)(76116006)(66946007)(6116002)(3846002)(81166006)(81156014)(8676002)(7696005)(52536014)(99286004)(86362001)(186003)(26005)(6436002)(6506007)(102836004)(2906002)(44832011)(486006)(8936002)(6246003)(110136005)(2501003)(316002)(33656002)(256004)(14454004)(476003)(14444005)(68736007)(478600001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB3291; H:HE1PR07MB3161.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: Q+Tr3A5Ny0bpRhyaSyPPeeGNslgGIH+gPHTwcpv2uUvLrcOWI90hC1Drv0U4azJQUAC7beDDXMjm71nDMs+WcYgUXpDVA8MG0fm9swl+FupNP+qA+xqf63y9j1rktLNSyVMhYO9cni8N9fc7SsQ5BH1lJSA9PHjSNF2HMjM+YLN+AANvCrqGYVRiZkAG991c0mDSBF7g8Acxa3yLhb5OV5M3ltW/rELF6saa2fuqrKWkzoOFKNvVk+Lq0KF4OIIp5L01zRZ3ae6O4rDIsooktp28hbqBxghdQtthqRgWIFe1qU3QSlJGJi1jN7XUgFHELjMLeQGeiRfLEeNDI7I0JZBsd48oMrSYM0JzNzJOrFWy6afXXxXAPRwP6XtNFMKsAQyzjxmWCkGxiHJY1yL8Aa2RD492tvmuPVvypJ89Q6U=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c19b0ff8-34db-4c33-32d4-08d707634a1e
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2019 07:25:32.0355 (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: HE1PR07MB3291
Archived-At: <https://mailarchive.ietf.org/arch/msg/sipcore/d8OWv5Oe1RLmj-yC1h7LfsgWV6c>
Subject: Re: [sipcore] Thoughts about draft-ietf-sipcore-sip-token-authnz-02.txt - Dale's comments
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, 13 Jul 2019 07:25:42 -0000

Hi Dale,

Please see inline.

>2.  One somewhat philosophical point is that the current version presents the work as implementing two (somewhat generic) call flows.
>But of course, SIP isn't defined in terms of call flows that SIP entities implement by having telepathic knowledge of where they are in particular 
>call flows, but rather in terms of specific internal states of SIP entities which cause them to respond in defined ways to incoming messages.  
>The collective effect of these action specifications makes an unlimited number of useful call flows work.
>
>So in this case, we need to dissect each step of these call flows and lay out the specific behaviors that have to be executed by the participating entities.
>
>In addition, this is the place to discern which of these behaviors fit into the various existing patterns and structures of SIP.

I think the draft already does that. What do you think it missing?

----

>4.  The question arose on the mailing list whether Proxy-Authenticate is ever used.  I know that the sipX family of PBXs uses it.  The general pattern is 
>that the proxy demands that the UAC authenticate itself, and then passes authenticated INVITEs to their destination UASs.  The destination phones are 
>configured to only accept requests from the IP address of the PBX.  This allows a very simple authentication scheme at the UAS to be leveraged into more 
>sophisticated authentication of all incoming requests by a more intelligent proxy.
>
>This structure also supports the standard SIP usage where the process of permitting an INVITE to flow *from* a UAC is not coupled to whether or not 
>the UAC is registered.  (Of course, a UAS can only *receive* an INVITE to its AOR if it is registered for that AOR.)  The draft seems to presume that the 
>ability to send INVITEs is implicitly controlled by whether the UAC has an active registration ... but that is not standard SIP.

Agreed.

The reason it may look different in the draft is because registration was one of the use-cases we earlier agreed was going to be covered in the draft.

---

>5.  If I understand it correctly, a SIP request is authenticated by an Authorization header containing the Bearer scheme and a valid access token.  
>As others have noted, any device which can copy the access token can issue any request in the name of the token's user.  This situation requires 
>that the SIP messages be fully protected from eavesdropping and that a message containing such an Authorization header must never be handled 
>by an untrusted entity.
>
>This is a particularly strict situation.  The draft recognizes this and the Security Considerations section says
>
>   The UAC MUST always make sure that it is communicating with the right
>   registrar/proxy using TLS and proper validation of the server
>   certificate and the identifier in that certificate to protect the
>   access token in transit.
>
> However, this restriction is sufficiently different from current practice that it should also be mentioned in the 
> earlier, "operational" sections.

Feel free to suggest where you want to add text.

Related to that, Olle commented that TLS may not be enough, as it is hop-to-hop when used with SIP. So, we have been discussing encoding the access token using encoded JWTs.

>This situations sounded familiar to me ... I eventually realized that it is exactly the situation with HTTP Basic authentication.
>
>It's also the reason why SIP rejected using Basic authentication.
>
>We need a way to use OAuth authentication that has the property of Digest authentication that the values in the Authorization 
>header are bound in some way to the particular request.  It seems to me that there are a couple of ways out of this problem.
>
>a) Given that OAuth designates the token we are using as "bearer", it's possible that OAuth provides a different mode of operation with the needed properties.
>
>b) Use the access_token as essentially the "passwd" value in a clone of the Digest algorithm.  This requires that the Authorized header has some other way of indicating 
>to the authenticator what access_token it used.
>Presumably that information could be bundled into a parameter of the (authenticated user) "uri" parameter of the header.

I'd like some more information, and perhaps an example, for this, because I am not sure I understand.

---

>6.  One new UA behavior is where the UAC coordinates the process of the user providing his credentials, forwarding them to the authorization server, 
>and receiving the tokens.  I don't see any need to standardize how this is triggered and operates, other than that the contents of the HTTP POST and 
>its response ([01]/[02] or [10]/[11]) need to be properly specified.  I assume that these are specified by the OAuth specification, but we need to ensure 
>that our draft clearly specifies whatever parameters are needed by the generic OAuth specification.
>
>The reason for being careful with this is that in order to ensure interoperability at the boundary between the UAC and the authorization server, their 
>communication is not truly "out of scope of this specification" but rather "delegated by this specification to the OAuth specification".

Where do you think the draft tries to standardize how OAuth operates? 

---

>7.  Similarly for the conversation between the SIP authenticator and the authorization server.

See comment 6.

---

>8.  Given that Bearer is a new authorization scheme, it doesn't directly demand any new UAC behavior regarding registration.  But the REGISTER [12] may 
>introduce a new behavior:  Currently, a UAC can only REGISTER for a particular AOR; that AOR appears as the To and From URIs.  But in this call flow, it's possible 
>that the UAC does not know which AOR it will eventually attempt to register to, only the SIP domain.
>
>So we may need to extend RFC 3261 to provide a "generic" REGISTER form, whose purpose is not to obtain a registration but rather to provoke a
>401 response containing the authz_server value that the UAC needs,
>
>       REGISTER sip:biloxi.com SIP/2.0
>       Via: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7
>       Max-Forwards: 20
>       To: <sip:biloxi.com>
>       From: <sip:biloxi.com>;tag=456248
>       Call-ID: 843817637684230@998sdasdh09
>       CSeq: 1826 REGISTER
>       Contact: <sip:192.0.2.4>
>
> Once the user is done with the OAuth handshake, the UAC will know the AOR to register to and can send a normal REGISTER.

I don't think we shall change or extend the basic concept of SIP registrations, where the user is trying to register an AOR.

---

>9.  It seems to me that there should be a stated constraint that the registrar must not issue a registration that is valid for longer than the future 
>validity of the access_token that is used to authenticate the registration request.  Presumably this is straightforward to implement in an OAuth context.

There is a discussion about that, somewhere in the list thread.

---

>10.  Both call flows show the UAC obtaining a refresh_token from the authorization server but there is no illustration of the operations that the UAC 
>will do to use the refresh_token to obtain an access_token with longer validity.  It is probably worth illustrating this, as it is a different interaction that the authentication server must support.

Agree. We can add that.

---

>11.  In regard to the sip.token media feature tag, it's not clear that it is particularly useful.  Presumably, if the authenticator of a request accepts 
>the Bearer scheme for one of its realms, whenever it gives a 401/407 response, it will always include a WWW-Authenticate/Proxy-Authenticate 
>header for the Bearer scheme and that realm, and that header will include an authz_server parameter.  If the UAC does not accept Bearer for a 
>particular realm, it will ignore such a header, so there is little cost of sending it to a UAC that does not support it.

I'll let Paul comment on this, because I think it raised the need for the indicator.

Regards,

Christer