idnits 2.17.1 draft-ietf-sipcore-sip-token-authnz-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC3261, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC3261, updated by this document, for RFC5378 checks: 2000-07-17) -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 7, 2019) is 1752 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '00' on line 172 -- Looks like a reference, but probably isn't: '01' on line 174 -- Looks like a reference, but probably isn't: '02' on line 174 -- Looks like a reference, but probably isn't: '03' on line 272 -- Looks like a reference, but probably isn't: '04' on line 191 -- Looks like a reference, but probably isn't: '05' on line 191 -- Looks like a reference, but probably isn't: '06' on line 168 -- Looks like a reference, but probably isn't: '07' on line 276 -- Looks like a reference, but probably isn't: '08' on line 240 -- Looks like a reference, but probably isn't: '09' on line 244 -- Looks like a reference, but probably isn't: '10' on line 246 -- Looks like a reference, but probably isn't: '11' on line 246 -- Looks like a reference, but probably isn't: '12' on line 257 -- Looks like a reference, but probably isn't: '13' on line 263 -- Looks like a reference, but probably isn't: '14' on line 263 -- Looks like a reference, but probably isn't: '15' on line 232 == Unused Reference: 'RFC7231' is defined on line 461, but no explicit reference was found in the text == Unused Reference: 'RFC7523' is defined on line 470, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'OPENID' ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 20 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SIP Core R. Shekh-Yusef, Ed. 3 Internet-Draft Avaya 4 Updates: 3261 (if approved) C. Holmberg 5 Intended status: Standards Track Ericsson 6 Expires: January 8, 2020 V. Pascual 7 webrtchacks 8 July 7, 2019 10 Third-Party Token-based Authentication and Authorization for Session 11 Initiation Protocol (SIP) 12 draft-ietf-sipcore-sip-token-authnz-02 14 Abstract 16 This document defines a mechanism for SIP, that is based on the OAuth 17 2.0 and OpenID Connect Core 1.0 specifications, to enable the 18 delegation of the user authentication and SIP registration 19 authorization to a dedicated third-party entity that is separate from 20 the SIP network elements that provide the SIP service. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on January 8, 2020. 39 Copyright Notice 41 Copyright (c) 2019 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (https://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 This document may contain material from IETF Documents or IETF 55 Contributions published or made publicly available before November 56 10, 2008. The person(s) controlling the copyright in some of this 57 material may not have granted the IETF Trust the right to allow 58 modifications of such material outside the IETF Standards Process. 59 Without obtaining an adequate license from the person(s) controlling 60 the copyright in such materials, this document may not be modified 61 outside the IETF Standards Process, and derivative works of it may 62 not be created outside the IETF Standards Process, except to format 63 it for publication as an RFC or to translate it into languages other 64 than English. 66 Table of Contents 68 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 69 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 70 1.2. SIP User Agent Types . . . . . . . . . . . . . . . . . . 3 71 2. Authentication and Authorization flow . . . . . . . . . . . . 4 72 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 4 73 2.1.1. Configured AS . . . . . . . . . . . . . . . . . . . . 4 74 2.1.2. Discovered AS . . . . . . . . . . . . . . . . . . . . 6 75 2.2. Initial Registration . . . . . . . . . . . . . . . . . . 7 76 2.3. Subsequent Registrations . . . . . . . . . . . . . . . . 8 77 2.4. Non-Registration Requests . . . . . . . . . . . . . . . . 8 78 3. WWW-Authenticate Response Header Field . . . . . . . . . . . 8 79 4. 'sip.token' Media Feature Tag . . . . . . . . . . . . . . . . 9 80 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 81 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 82 6.1. SIP Media Feaure Tag . . . . . . . . . . . . . . . . . . 10 83 6.1.1. sip.token . . . . . . . . . . . . . . . . . . . . . . 10 84 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 10 85 8. Normative References . . . . . . . . . . . . . . . . . . . . 11 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 88 1. Introduction 90 The SIP protocol [RFC3261] uses the framework used by the HTTP 91 protocol for authenticating users, which is a simple challenge- 92 response authentication mechanism that allows a server to challenge a 93 client request and allows a client to provide authentication 94 information in response to that challenge. 96 OAuth 2.0 [RFC6749] defines a token based authorization framework to 97 allow clients to access resources on behalf of their user. 99 The OpenID Connect 1.0 [OPENID] specifications defines a simple 100 identity layer on top of the OAuth 2.0 protocol, which enables 101 clients to verify the identity of the user based on the 102 authentication performed by a dedicated authorization server, as well 103 as to obtain basic profile information about the user. 105 This document defines an mechanism for SIP, that is based on the 106 OAuth 2.0 and OpenID Connect Core 1.0 specifications, to enable the 107 delegation of the user authentication and SIP registration 108 authorization to a dedicated third-party entity that is separate from 109 the SIP network elements that provide the SIP service. 111 1.1. Terminology 113 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 114 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 115 document are to be interpreted as described in [RFC2119]. 117 1.2. SIP User Agent Types 119 [RFC6749] defines two types of clients, confidential and public, that 120 apply to the SIP User Agents. 122 o Confidential User Agent: is a SIP UA that is capable of 123 maintaining the confidentiality of the user credentials and any 124 tokens obtained using these user credentials. 126 o Public User Agent: is a SIP UA that is incapable of maintainings 127 the confidentiality of the user credentials and any obtained 128 tokens. 130 2. Authentication and Authorization flow 132 This flow is used by a Confidential UA with rich UI to authenticate 133 to an authorization server and to directly obtain tokens to be able 134 to register and get service from the SIP network. 136 2.1. Overview 138 The following sections provide overview of the supported flows. 140 2.1.1. Configured AS 142 The following figure provides a high level view of flow of messages 143 when the UA is aware of the AS ahead of time: 145 UA Registrar AS 146 --------------------------------------------------------------------- 147 | | | 148 [00] The UA prompts the user to provides his credentials | 149 | | | 150 | [01] HTTP POST /token | | 151 |-------------------------------------------------------------->| 152 | | | 153 | [02] 200 OK {access_token, refresh_token, [id_token]} | 154 |<--------------------------------------------------------------| 155 | | | 156 | | | 157 | [03] REGISTER | | 158 | Authorization: Bearer | 159 |------------------------------>| | 160 | | | 161 | | [04] HTTP POST /introspect | 162 | | {access_token} | 163 | |------------------------------>| 164 | | | 165 | | [05] 200 OK {metadata} | 166 | |<------------------------------| 167 | | | 168 | [06] 200 OK | | 169 |<------------------------------| | 170 | | | 172 In step [00], the UA collects the user's credentials with the AS. 174 In steps [01] and [02], the UA first contacts the Authorization 175 Server to authenticate the user and obtain tokens to be used to get 176 access to the SIP network. 178 The tokens returned to the UA depend on the type of server: with an 179 OAuth Authorization Server, the tokens provided are the access token 180 and refresh token. With an OpenID Connect server, an additional ID- 181 Token is returned, which contains the SIP URI of the user. The 182 method used to authenticate the user and obtain these tokens is out 183 of scope for this document. 185 In step [03], the UA starts the registration process with the SIP 186 registrar by sending a REGISTER request with the access token it 187 obtained previously. 189 The registrar validates the access token, and if the access token 190 provided by the UA is an opaque token, then the registrar MAY perform 191 an introspection, steps [04] and [05], to obtain more information 192 about the token and its scope, as per [RFC7662]. Otherwise, after 193 the registrar validates the token to make sure it was signed by a 194 trusted entity, it inspects its claims and act upon it. 196 When the registrar is satisfied with the token, it then replies with 197 the 200 OK to complete the registration process. 199 2.1.2. Discovered AS 201 The following figure provides a high level view of flow of messages 202 when the UA discovers the AS to conatc from the registrar: 204 UA Registrar AS 205 --------------------------------------------------------------------- 206 | | | 207 | [07] REGISTER | | 208 |------------------------------>| | 209 | | | 210 | [08] 401 Unauthorized | | 211 | WWW-Authenticate: Bearer "authz_server"="" | 212 |<------------------------------| | 213 | | | 214 [09] The UA prompts the user to provides his credentials | 215 | | | 216 | [10] HTTP POST /token | | 217 |-------------------------------------------------------------->| 218 | | | 219 | [11] 200 OK {access_token, refresh_token, [id_token]} | 220 |<--------------------------------------------------------------| 221 | | | 222 | [12] REGISTER | | 223 | Authorization: Bearer | 224 |------------------------------>| | 225 | | [13] HTTP POST /introspect | 226 | | {access_token} | 227 | |------------------------------>| 228 | | | 229 | | [14] 200 OK {metadata} | 230 | |<------------------------------| 231 | | | 232 | [15] 200 OK | | 233 |<------------------------------| | 234 | | | 236 In step [07] the UA starts the registration process by sending a SIP 237 REGISTER request to the registrar without any credentials. The 238 REGISTER request includes an indication that the UA supports token- 239 based autentication in the form of sip.token media feature tag. The 240 registrar then challenges the UA, in step [08], by responding with 241 401 Unauthorized and includes the authorization server to contact to 242 obtain a token. 244 In step [09], the UA collects the user's credentials with the AS. 246 In steps [10] and [11], the UA contacts the Authorization Server to 247 authenticate the user and obtain tokens to be used to get access to 248 the SIP network. 250 The tokens returned to the UA depend on the type of server: with an 251 OAuth Authorization Server, the tokens provided are the access token 252 and refresh token. With an OpenID Connect server, an additional ID- 253 Token is returned, which contains the SIP URI of the user. The 254 method used to authenticate the user and obtain these tokens is out 255 of scope for this document. 257 In step [12], the UA retries the registration process with the SIP 258 registrar by sending a REGISTER request with the access token it 259 obtained previously. 261 The registrar validates the access token, and if the access token 262 provided by the UA is an opaque token, then then registrar MAY 263 perform an introspection, steps [13] and [14], to obtain more 264 information about the token and its scope, as per [RFC7662]. 265 Otherwise, after the registrar validates the token to make sure it 266 was signed by a trusted entity, it inspects its claims and act upon 267 it. 269 2.2. Initial Registration 271 If the UA has already obtained a token, then the UA starts the 272 registration process, step [03], by sending a REGISTER request, with 273 the access token in the Authorization header, to the registrar. 275 If the UA does not have a token, then the UA starts the registration 276 process, step [07], by sending a REGISTER request without an 277 Authorization header. The registrar MUST then challenge the UA by 278 responding with 401 Unauthorized and include the WWW-Authenticate 279 Response Header Field which includes the server to contact to obtain 280 a token, as specified in Section 3 282 The REGISTER request SHOULD include a sip.token media feature tag in 283 the Contact header field of the request, unless it knows (e.g., by 284 means of configuration) that the registrar supports the token 285 authentication mechanism. 287 The UA MUST include an Authorization header field with the Bearer 288 scheme in the request to carry the access token, as specified in 289 [RFC6750]. 291 When the registrar is satisfied with the token, it then replies with 292 the 200 OK to complete the registration process. 294 2.3. Subsequent Registrations 296 All subsequent REGISTER requests from the UA MUST include a valid 297 access token. The UA MUST obtain a new access token before the 298 access token expiry period to continue to get service from the 299 system. The method used to obtain a new fresh access tokens is out 300 of scope for this document. 302 The REGISTER request SHOULD include a sip.token media feature tag in 303 the Contact header field of the request, unless it knows (e.g., by 304 means of configuration) that the registrar supports the token 305 authentication mechanism. 307 2.4. Non-Registration Requests 309 The UA MUST NOT insert a token in a non-REGISTER request, unless the 310 non-REGISTER request has been challenged, or the peer is considered a 311 trusted entity. 313 If a non-REGISTER request from the UA is challenged with a WWW- 314 Authenticate header field to provide credentials for the same realm 315 specified in the challenge to the registration request, then the UA 316 MUST include a valid access token in the request retry. The UA MUST 317 include an Authorization header field with the Bearer scheme in the 318 request to carry the access token, as specified in [RFC6750]. 320 Challenges with WWW-Authenticate with different realm specified in 321 the challenge to the registration request are out of scope for this 322 document. Challenges with Proxy-Authenticate are out of scope for 323 this document. 325 3. WWW-Authenticate Response Header Field 327 This section describes the syntax of the WWW-Authenticate Response 328 Header Field when used with the Bearer scheme to challenge the UA for 329 credentials. 331 challenge =/ ("Bearer" LWS bearer-cln *(COMMA bearer-cln)) 332 bearer-cln = realm / scope / authz-server / error / 333 auth-param 334 authz-server = "authz_server" EQUAL authz-server-value 335 authz-server-value = quoted-string 337 The realm and auth-param parameters are defined in [RFC3261]. 339 As per [RFC3261], the realm string alone defines the protection 340 domain. [RFC3261] states that the realm string must be globally 341 unique and recommends that the realm string contains a hostname or 342 domain name. It also states that the realm string should be human- 343 readable identifier that can be rendered to the user. 345 The scope and error parameters are defined in [RFC6749]. 347 The scope parameter could be used by the registrar/proxy to indicate 348 to the UAC the minimum scope that must be associated with the access 349 token to be able to get service. As defined in [RFC6749], the value 350 of the scope parameter is expressed as a list of space-delimited, 351 case-sensitive strings. The strings are defined by the authorization 352 server. The values of the scope parameter is out of scope for this 353 document. 355 The error parameter could be used by the registrar/proxy to indicate 356 to the UAC the reason for the error, with possible values of 357 "invalid_token" or "invalid_scope". 359 4. 'sip.token' Media Feature Tag 361 The sip.token media feature tag, when inserted in the Contact header 362 field of a SIP REGISTER request, conveys that the SIP UA associated 363 with the tag supports a token based authentication mechanism, where 364 the user authentication and SIP registration authorization is 365 performed by a third party. The media feature tag has no values. 367 token-mt = "+sip.token" 369 5. Security Considerations 371 The UAC MUST always make sure that it is communicating with the right 372 registrar/proxy using TLS and proper validation of the server 373 certificate and the identifier in that certificate to protect the 374 access token in transit. 376 If the token being used is a bearer token as specified in [RFC6750], 377 then the security considration of that document apply. 379 If the token being used is a JWT as specified in [RFC7519], then the 380 security considration of that document apply. 382 6. IANA Considerations 384 6.1. SIP Media Feaure Tag 386 6.1.1. sip.token 388 This section defines a new media feature tag that extends the "SIP 389 Media Feature Tag Registration Tree" subregistry [RFC3840] under the 390 "Media Feature Tags" registry (https://www.iana.org/assignments/ 391 media-feature-tags). 393 Media feature tag name: sip.token 395 Summary of the media feature indicated by this feature tag: This 396 media feature tag, when inserted in the Contact header field 397 of a SIP REGISTER request, conveys that the SIP UA associated 398 with the tag supports a token based authentication mechanism, 399 where the user authentication and SIP registration authorization 400 is performed by a third party. 402 Values appropriate for use with this feature tag: none 404 Related standards or documents: RFC XXXX 406 Security considerations: This media feature tag does not introduce 407 new security considerations, as it simply indicates support for 408 a basic SIP feature. However, if an attacker manages to remove 409 the media feature tag from a SIP REGISTER request, the SIP UA 410 that inserted it might not be able to authenticate itself with 411 the SIP registrar to which the SIP request is addressed, as the 412 SIP registrar might not be aware that the SIP UA supports the 413 feature associated with the media feature tag. 415 Contact: IESG (iesg@ietf.org) 417 7. Acknowledgments 419 The authors would also like to thank Paul Kyzivat for his reviews and 420 feedback on this document. 422 The authors would also like to thank the following for their review 423 and feedback of the original document that was replaced with this 424 document: 426 Andrew Allen, Martin Dolly, Keith Drage, Paul Kyzivat, Jon Peterson, 427 Michael Procter, Roy Radhika, Matt Ryan, Ivo Sedlacek, Roman Shpount, 428 Robert Sparks, Asveren Tolga, and Dale Worley. 430 8. Normative References 432 [OPENID] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and 433 C. Mortimore, "OpenID Connect Core 1.0", February 2014. 435 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 436 Requirement Levels", BCP 14, RFC 2119, 437 DOI 10.17487/RFC2119, March 1997, 438 . 440 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 441 A., Peterson, J., Sparks, R., Handley, M., and E. 442 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 443 DOI 10.17487/RFC3261, June 2002, 444 . 446 [RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, 447 "Indicating User Agent Capabilities in the Session 448 Initiation Protocol (SIP)", RFC 3840, 449 DOI 10.17487/RFC3840, August 2004, 450 . 452 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 453 RFC 6749, DOI 10.17487/RFC6749, October 2012, 454 . 456 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 457 Framework: Bearer Token Usage", RFC 6750, 458 DOI 10.17487/RFC6750, October 2012, 459 . 461 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 462 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 463 DOI 10.17487/RFC7231, June 2014, 464 . 466 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 467 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 468 . 470 [RFC7523] Jones, M., Campbell, B., and C. Mortimore, "JSON Web Token 471 (JWT) Profile for OAuth 2.0 Client Authentication and 472 Authorization Grants", RFC 7523, DOI 10.17487/RFC7523, May 473 2015, . 475 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 476 RFC 7662, DOI 10.17487/RFC7662, October 2015, 477 . 479 Authors' Addresses 481 Rifaat Shekh-Yusef (editor) 482 Avaya 483 425 Legget Drive 484 Ottawa, Ontario 485 Canada 487 Phone: +1-613-595-9106 488 EMail: rifaat.ietf@gmail.com 490 Christer Holmberg 491 Ericsson 492 Hirsalantie 11 493 Jorvas 02420 494 Finland 496 EMail: christer.holmberg@ericsson.com 498 Victor Pascual 499 webrtchacks 500 Spain 502 EMail: victor.pascual.avila@gmail.com