idnits 2.17.1 draft-ietf-stir-rfc4474bis-15.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 obsoletes RFC4474, 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 == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (October 31, 2016) is 2734 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) == Missing Reference: 'RFCThis' is mentioned on line 1806, but not defined == Unused Reference: 'RFC7258' is defined on line 1990, but no explicit reference was found in the text == Outdated reference: A later version (-11) exists of draft-ietf-stir-passport-09 == Outdated reference: A later version (-18) exists of draft-ietf-stir-certificates-10 -- Obsolete informational reference (is this intentional?): RFC 4474 (Obsoleted by RFC 8224) -- Obsolete informational reference (is this intentional?): RFC 7159 (Obsoleted by RFC 8259) Summary: 0 errors (**), 0 flaws (~~), 6 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Peterson 3 Internet-Draft NeuStar 4 Obsoletes: 4474 (if approved) C. Jennings 5 Intended status: Standards Track Cisco 6 Expires: May 4, 2017 E. Rescorla 7 RTFM, Inc. 8 C. Wendt 9 Comcast 10 October 31, 2016 12 Authenticated Identity Management in the Session Initiation Protocol 13 (SIP) 14 draft-ietf-stir-rfc4474bis-15.txt 16 Abstract 18 The baseline security mechanisms in the Session Initiation Protocol 19 (SIP) are inadequate for cryptographically assuring the identity of 20 the end users that originate SIP requests, especially in an 21 interdomain context. This document defines a mechanism for securely 22 identifying originators of SIP requests. It does so by defining a 23 SIP header field for conveying a signature used for validating the 24 identity, and for conveying a reference to the credentials of the 25 signer. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on May 4, 2017. 44 Copyright Notice 46 Copyright (c) 2016 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 62 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 63 3. Architectural Overview . . . . . . . . . . . . . . . . . . . 4 64 4. Identity Header Field Syntax . . . . . . . . . . . . . . . . 6 65 4.1. PASSporT Construction . . . . . . . . . . . . . . . . . . 7 66 4.1.1. Example Full and Compact Forms of PASSporT in 67 Identity . . . . . . . . . . . . . . . . . . . . . . 9 68 5. Example of Operations . . . . . . . . . . . . . . . . . . . . 10 69 5.1. Example Identity Header Construction . . . . . . . . . . 11 70 6. Signature Generation and Validation . . . . . . . . . . . . . 13 71 6.1. Authentication Service Behavior . . . . . . . . . . . . . 13 72 6.1.1. Handling Repairable Errors . . . . . . . . . . . . . 15 73 6.2. Verifier Behavior . . . . . . . . . . . . . . . . . . . . 16 74 6.2.1. Authorization of Requests . . . . . . . . . . . . . . 17 75 6.2.2. Failure Response Codes Sent by a Verification Service 18 76 6.2.3. Handling the full form of PASSporT . . . . . . . . . 19 77 7. Credentials . . . . . . . . . . . . . . . . . . . . . . . . . 20 78 7.1. Credential Use by the Authentication Service . . . . . . 20 79 7.2. Credential Use by the Verification Service . . . . . . . 22 80 7.3. 'info' parameter URIs . . . . . . . . . . . . . . . . . . 22 81 7.4. Credential System Requirements . . . . . . . . . . . . . 23 82 8. Identity Types . . . . . . . . . . . . . . . . . . . . . . . 24 83 8.1. Differentiating Telephone Numbers from URIs . . . . . . . 25 84 8.2. Authority for Telephone Numbers . . . . . . . . . . . . . 26 85 8.3. Telephone Number Canonicalization Procedures . . . . . . 26 86 8.4. Authority for Domain Names . . . . . . . . . . . . . . . 27 87 8.5. URI Normalization . . . . . . . . . . . . . . . . . . . . 28 88 9. Extensibility . . . . . . . . . . . . . . . . . . . . . . . . 29 89 10. Backwards Compatibility with RFC4474 . . . . . . . . . . . . 30 90 11. Privacy Considerations . . . . . . . . . . . . . . . . . . . 30 91 12. Security Considerations . . . . . . . . . . . . . . . . . . . 32 92 12.1. Protected Request Fields . . . . . . . . . . . . . . . . 32 93 12.1.1. Protection of the To Header and Retargeting . . . . 34 94 12.2. Unprotected Request Fields . . . . . . . . . . . . . . . 35 95 12.3. Malicious Removal of Identity Headers . . . . . . . . . 35 96 12.4. Securing the Connection to the Authentication Service . 36 97 12.5. Authorization and Transitional Strategies . . . . . . . 37 98 12.6. Display-Names and Identity . . . . . . . . . . . . . . . 38 99 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 38 100 13.1. SIP Header Fields . . . . . . . . . . . . . . . . . . . 38 101 13.2. SIP Response Codes . . . . . . . . . . . . . . . . . . . 38 102 13.3. Identity-Info Parameters . . . . . . . . . . . . . . . . 39 103 13.4. Identity-Info Algorithm Parameter Values . . . . . . . . 39 104 14. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 39 105 15. Changes from RFC4474 . . . . . . . . . . . . . . . . . . . . 39 106 16. References . . . . . . . . . . . . . . . . . . . . . . . . . 40 107 16.1. Normative References . . . . . . . . . . . . . . . . . . 40 108 16.2. Informative References . . . . . . . . . . . . . . . . . 41 109 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 43 111 1. Introduction 113 This document provides enhancements to the existing mechanisms for 114 authenticated identity management in the Session Initiation Protocol 115 (SIP, [RFC3261]). An identity, for the purposes of this document, is 116 defined as either a canonical address-of-record (AoR) SIP URI 117 employed to reach a user (such as 'sip:alice@atlanta.example.com'), 118 or a telephone number, which commonly appears in either a TEL URI 119 [RFC3966] or as the user portion of a SIP URI. 121 [RFC3261] specifies several places within a SIP request where users 122 can express an identity for themselves, most prominently the user- 123 populated From header field. However, the recipient of a SIP request 124 has no way to verify that the From header field has been populated 125 appropriately, in the absence of some sort of cryptographic 126 authentication mechanism. This leaves SIP vulnerable to a category 127 of abuses, including impersonation attacks that facilitate or enable 128 robocalling, voicemail hacking, swatting, and related problems as 129 described in [RFC7340]. Ideally, a cryptographic approach to 130 identity can provide a much stronger and less spoofable assurance of 131 identity than the Caller ID services that the telephone network 132 provides today. 134 [RFC3261] encourages user agents (UAs) to implement a number of 135 potential authentication mechanisms, including Digest authentication, 136 Transport Layer Security (TLS), and S/MIME (implementations may 137 support other security schemes as well). However, few SIP user 138 agents today support the end-user certificates necessary to 139 authenticate themselves (via S/MIME, for example), and for its part 140 Digest authentication is limited by the fact that the originator and 141 destination must share a prearranged secret. Practically speaking, 142 originating user agents need to be able to securely communicate their 143 users' identity to destinations with which they have no previous 144 association. 146 As an initial attempt to address this gap, [RFC4474] specified a 147 means of signing portions of SIP requests in order to provide an 148 identity assurance. However, RFC4474 was in several ways misaligned 149 with deployment realities (see [I-D.rosenberg-sip-rfc4474-concerns]). 150 Most significantly, RFC4474 did not deal well with telephone numbers 151 as identifiers, despite their enduring use in SIP deployments. 152 RFC4474 also provided a signature over material that intermediaries 153 in existing deployments commonly altered. This specification 154 therefore deprecates the RFC4474 syntax and behavior, reconsidering 155 the problem space in light of the threat model in [RFC7375] and 156 aligning the signature format with PASSporT [I-D.ietf-stir-passport]. 157 Backwards compatibility considerations are given in Section 10. 159 2. Terminology 161 In this document, the key words "MUST", "MUST NOT", "REQUIRED", 162 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT 163 RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as 164 described in RFC 2119 [RFC2119]. 166 In addition, this document uses three terms specific to the 167 mechanism: 169 Identity: An identifier for the user of a communications service; 170 for the purposes of SIP, either a SIP URI or a telephone number. 171 Identities are derived from an "identity field" in a SIP request 172 such as the From header field. 174 Authentication Service: A logical role played by a SIP entity that 175 adds Identity headers to SIP requests. 177 Verification Service (or "Verifier"): A logical role played by a 178 SIP entity that validates Identity headers in a SIP request. 180 3. Architectural Overview 182 The identity architecture for SIP defined in this specification 183 depends on a logical "authentication service" which validates 184 outgoing requests. An authentication service may be implemented 185 either as part of a user agent or as a proxy server; typically, it is 186 a component of a network intermediary like a proxy to which 187 originating user agents send unsigned requests. Once the originator 188 of the message has been authenticated, through means entirely up to 189 the authentication service, the authentication service then creates 190 and adds an Identity header field to the request. This requires 191 computing cryptographic information, including a digital signature 192 over some components of messages, that lets other SIP entities verify 193 that the sending user has been authenticated and its claim of a 194 particular identity has been authorized. These "verification 195 services" validate the signature and enable policy decisions to be 196 made based on the results of the validation. 198 Policy decisions made after validation depend heavily on the 199 verification service's trust for the credentials that the 200 authentication service uses to sign requests. As robocalling, 201 voicemail hacking, and swatting usually involve impersonation of 202 telephone numbers, credentials that will be trusted by relying 203 parties to sign for telephone numbers are a key component of the 204 architecture. Authority over telephone numbers is however, not so 205 easy to establish on the Internet as authority over traditional 206 domain names. This document assumes the existence of credentials for 207 establishing authority over telephone numbers, for cases where the 208 telephone number is the identity of the user, but this document does 209 not mandate or specify a credential system. 210 [I-D.ietf-stir-certificates] describes a credential system compatible 211 with this architecture. 213 Although addressing the vulnerabilities in the STIR problem statement 214 and threat model mostly requires dealing with telephone number as 215 identities, SIP must also handle signing for SIP URIs as identities. 216 This is typically easier to deal with, as these identities are issued 217 to users by authorities over Internet domains. When a new user 218 becomes associated with example.com, for example, the administrator 219 of the SIP service for that domain can issue them an identity in that 220 namespace, such as sip:alice@example.com. Alice may then send 221 REGISTER requests to example.com that make her user agents eligible 222 to receive requests for sip:alice@example.com. In other cases, Alice 223 may herself be the owner of her own domain, and may issue herself 224 identities as she chooses. But ultimately, it is the controller of 225 the SIP service at example.com that must be responsible for 226 authorizing the use of names in the example.com domain. Therefore, 227 for the purposes of baseline SIP, the necessary credentials needed to 228 prove a user is authorized to use a particular From header field must 229 ultimately derive from the domain owner: either a user agent gives 230 requests to the domain name owner in order for them to be signed by 231 the domain owner's credentials, or the user agent must possess 232 credentials that prove in some fashion that the domain owner has 233 given the user agent the right to a name. 235 In order to share a cryptographic assurance of end-user SIP identity 236 in an interdomain or intradomain context, an authentication service 237 constructs tokens based on the PASSporT [I-D.ietf-stir-passport] 238 format, which is special encoding of a JSON [RFC7159] object 239 comprising values derived from certain header field values in the SIP 240 request. The authentication service computes a signature over those 241 JSON elements as PASSporT specifies. An encoding of the resulting 242 PASSporT is then placed in the SIP Identity header field. In order 243 to assist in the validation of the Identity header field, this 244 specification also describes a parameter of the Identity header field 245 that can be used by the recipient of a request to recover the 246 credentials of the signer. 248 Note that the scope of this document is limited to providing an 249 identity assurance for SIP requests; solving this problem for SIP 250 responses is outside the scope of this work (see [RFC4916]). Future 251 work might specify ways that a SIP implementation could gateway 252 PASSporTs to other protocols. 254 4. Identity Header Field Syntax 256 The Identity and Identity-Info header fields that were previously 257 defined in RFC4474 are here deprecated. This revised specification 258 collapses the grammar of Identity-Info into the Identity header field 259 via the "info" parameter. Note that unlike the prior specification 260 in RFC4474, the Identity header field is now allowed to appear more 261 than one time in a SIP request. The revised grammar for the Identity 262 header field builds on the ABNF [RFC5234] in RFC 3261 [RFC3261] 263 Section 25. It is as follows: 265 Identity = "Identity" HCOLON signed-identity-digest SEMI 266 ident-info *( SEMI ident-info-params ) 267 signed-identity-digest = *(base64-char / ".") 268 ident-info = "info" EQUAL ident-info-uri 269 ident-info-uri = LAQUOT absoluteURI RAQUOT 270 ident-info-params = ident-info-alg / ident-type / 271 ident-info-extension 272 ident-info-alg = "alg" EQUAL token 273 ident-type = "ppt" EQUAL token 274 ident-info-extension = generic-param 276 base64-char = ALPHA / DIGIT / "/" / "+" 278 In addition to the "info" parameter, and the "alg" parameter 279 previously defined in RFC4474, this specification defines the 280 optional "ppt" parameter. The 'absoluteURI' portion of ident-info- 281 uri MUST contain a URI; see Section 7.3 for more on choosing how to 282 advertise credentials through this parameter. 284 The signed-identity-digest contains a base64 encoding of a PASSporT 285 [I-D.ietf-stir-passport], which secures the request with a signature 286 that PASSporT generates over the JSON header and payload objects; 287 some of those header and claim element values will mirror values of 288 the SIP request. 290 4.1. PASSporT Construction 292 For SIP implementations to populate the PASSporT header JSON object 293 with fields from a SIP request, the following elements MUST be placed 294 as the values corresponding to the designated JSON keys: 296 First, per baseline [I-D.ietf-stir-passport], the JSON "typ" key 297 MUST have the value "passport". 299 Second, the JSON key "alg" MUST mirror the value of the optional 300 "alg" parameter in the SIP Identity header field. Note if the 301 "alg" parameter is absent from the Identity header, the default 302 value is "ES256". 304 Third, the JSON key "x5u" MUST have a value equivalent to the 305 quoted URI in the "info" parameter, per the simple string 306 comparison rules of [RFC3986] section 6.2.1. 308 Fourth, if a PASSporT extension is in use, then the optional JSON 309 key "ppt" MUST be present and have a value equivalent to the 310 quoted value of the "ppt" parameter of the Identity header field. 312 An example of the PASSporT header JSON object without any extension 313 is: 315 { "typ":"passport", 316 "alg":"ES256", 317 "x5u":"https://www.example.com/cert.cer" } 319 To populate the PASSporT payload JSON object from a SIP request, the 320 following elements MUST be placed as values corresponding to the 321 designated JSON keys: 323 First, the JSON "orig" object MUST be populated. If the 324 originating identity is a telephone number, then the array MUST be 325 populated with a JSON object containing a "tn" element with a 326 value set to the value of the quoted originating identity, a 327 canonicalized telephone number (see Section 8.3). Otherwise, the 328 object MUST be populated with a JSON object containing "uri" 329 element, set to the value of the AoR of the UA sending the message 330 as taken from the addr-spec of the From header field, per the 331 procedures in Section 8.5. 333 Second, the JSON "dest" array MUST be populated. If the 334 destination identity is a telephone number, then the array MUST be 335 populated with a JSON object containing a "tn" element with a 336 value set to the value of the quoted destination identity, a 337 canonicalized telephone number (see Section 8.3). Otherwise, the 338 array MUST be populated with a JSON object containing a "uri" 339 element, set to the value of the addr-spec component of the To 340 header field, which is the AoR to which the request is being sent, 341 per the procedures in Section 8.5. Multiple JSON objects are 342 permitted in "dest" for future compatibility reasons. 344 Third, the JSON key "iat" MUST appear. The authentication service 345 SHOULD set the value of "iat" to an encoding of the value of the 346 SIP Date header field as a JSON NumericDate (as UNIX time, per 347 [RFC7519] Section 2), though an authentication service MAY set the 348 value of "iat" to its own current clock time. If the 349 authentication service uses its own clock time then the use of the 350 full form of PASSporT is REQUIRED. In either case, the 351 authentication service MUST NOT generate a PASSporT for a SIP 352 request if the Date header is outside of its local policy for 353 freshness (recommended sixty seconds). 355 Fourth, if the request contains an SDP message body, and if that 356 SDP contains one or more "a=fingerprint" attributes, then the JSON 357 key "mky" MUST appear with the algorithm(s) and value(s) of the 358 fingerprint attributes (if they differ), following the format 359 given in [I-D.ietf-stir-passport] Section 5.2.2. 361 For example: 363 { "orig":{"tn":"12155551212"}, 364 "dest":{"tn":"12155551213"}, 365 "iat":1443208345 } 367 For information on the security properties of these SIP message 368 elements, and why their inclusion mitigates replay attacks, see 369 Section 12. Note that future extensions to PASSporT could introduce 370 new claims, and that further SIP procedures could be required to 371 extract information from the SIP request to populate the values of 372 those claims; see Section 9. 374 The "orig" and "dest" arrays may contain identifiers of heterogeneous 375 type; for example, the "orig" array might contain a "tn" claim, while 376 the "dest" contains a "uri" claim. Also note that in some cases, the 377 "dest" array may be populated with more than one value. This could 378 for example occur when multiple "dest" identities are specified in a 379 meshed conference. Defining how a SIP implementation would align 380 multiple destination identities in PASSporT with such systems is left 381 as a subject for future specification. 383 After these two JSON objects, the header and the payload, have been 384 constructed and base64-encoded, they must each be hashed and signed 385 per [I-D.ietf-stir-passport] Section 6. The header, payload and 386 signature components comprise a full PASSporT object. The resulting 387 PASSporT may be carried in SIP in either a full form, which includes 388 the header and payload as well as the signature, or a compact form 389 which only carries the signature per [I-D.ietf-stir-passport] 390 Section 7. The hashing and signing algorithm is specified by the 391 'alg' parameter of the Identity header field and the mirrored "alg" 392 parameter of PASSporT. All implementations of this specification 393 MUST support the required signing algorithms of PASSporT. At present 394 there is one mandatory-to-support value for the 'alg' parameter: 395 'ES256', as defined in [RFC7519], which connotes an ECDSA P-256 396 digital signature. 398 4.1.1. Example Full and Compact Forms of PASSporT in Identity 400 As Appendix F of the JWS specification [RFC7515] notes, there are 401 cases where "it is useful to integrity-protect content that is not 402 itself contained in a JWS." Since the fields that make up the 403 majority of the PASSporT header and payload have values replicated in 404 the SIP request, the SIP usage of PASSporT may exclude the base64 405 encoded version of the header and payload JSON objects from the 406 Identity header field and instead present a detached signature: what 407 PASSporT calls its compact form, see [I-D.ietf-stir-passport] 408 Section 7. 410 When an authentication service constructs an Identity header, the 411 contents of the signed-identity-digest field MUST contain either a 412 full or compact PASSporT. Use of the compact form is RECOMMENDED in 413 order to reduce message size, but note that extensions often require 414 the full form (see Section 9). 416 For example, a full form of PASSporT in an Identity header might look 417 as follows: 419 Identity: eyJhbGciOiJFUzI1NiIsInR5cCI6InBhc3Nwb3J0IiwieDV1I \ 420 joiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUub3JnL3Bhc3Nwb3J0LmNlciJ9.eyJ \ 421 kZXN0Ijp7InVyaSI6WyJzaXA6YWxpY2VAZXhhbXBsZS5jb20iXX0sImlhdC \ 422 I6IjE0NDMyMDgzNDUiLCJvcmlnIjp7InRuIjoiMTIxNTU1NTEyMTIifX0.r \ 423 q3pjT1hoRwakEGjHCnWSwUnshd0-zJ6F1VOgFWSjHBr8Qjpjlk-cpFYpFYs \ 424 ojNCpTzO3QfPOlckGaS6hEck7w;info= 427 The compact form of the same PASSporT object would appear in the 428 Identity header as: 430 Identity: ..rq3pjT1hoRwakEGjHCnWSwUnshd0-zJ6F1VOgFWSjHBr8Qj \ 431 pjlk-cpFYpFYsojNCpTzO3QfPOlckGaS6hEck7w; \ 432 info= 434 5. Example of Operations 436 This section provides an informative (non-normative) high-level 437 example of the operation of the mechanisms described in this 438 document. 440 Imagine a case where Bob, who has the home proxy of example.com and 441 the address-of-record sip:12155551212@example.com, wants to 442 communicate with Alice at sip:alice@example.org. They have no prior 443 relationship, and Alice implements best practices to prevent 444 impersonation attacks. 446 Bob's user agent generates an INVITE and places his address-of-record 447 in the From header field of the request. He then sends an INVITE to 448 an authentication service proxy for his domain. 450 ............................ .............................. 451 . . . . 452 . +-------+ . . +-------+ . 453 . Signs for | | . Signed . | | . 454 . 12125551xxx| Auth |------------> | Verif | . 455 . | Svc | . INVITE . | Svc | . 456 . | Proxy | . . | Proxy | . 457 . > +-------+ . . +-------+ \ . 458 . / | . -> \ . 459 . / | . --. \ . 460 . / | . -- . \ . 461 . / | . -- . \ . 462 . / +-------+. -- . \ . 463 . / | |.<- . \ . 464 . / | Cert |. . > . 465 . +-------+ | Store |. . +-------+ . 466 . | | | |. . | | . 467 . | Bob | +-------+. . | Alice | . 468 . | UA | . . | UA | . 469 . | | . . | | . 470 . +-------+ . . +-------+ . 471 . Domain A . . Domain B . 472 ............................ .............................. 474 The proxy authenticates Bob, and validates that he is authorized to 475 assert the identity that he populated in the From header field. The 476 proxy authentication service then constructs a PASSporT which 477 contains a JSON representation of values which mirror certain parts 478 of the SIP request, including the identity in the From header field 479 value. As a part of generating the PASSporT, the authentication 480 service signs a hash of that JSON header and payload with the private 481 key associated with the appropriate credential for the identity (in 482 this example, a certificate with authority to sign for numbers in a 483 range from 12155551000 to 121555519999), and the signature is 484 inserted by the proxy server into the Identity header field value of 485 the request as a compact form of PASSporT. Alternatively, the JSON 486 header and payload themselves might also have been included in the 487 object when using the full form of PASSporT. 489 The proxy authentication service, as the holder of a private key with 490 authority over Bob's telephone number, is asserting that the 491 originator of this request has been authenticated and that he is 492 authorized to claim the identity that appears in the From header 493 field. The proxy inserts an "info" parameter into the Identity 494 header field that tells Alice how to acquire keying material 495 necessary to validate its credentials (a public key), in case she 496 doesn't already have it. 498 When Alice's domain receives the request, a proxy verification 499 service validates the signature provided in the Identity header 500 field, and then determines that the authentication service 501 credentials demonstrate authority over the identity in the From 502 header field. This same validation operation might be performed by a 503 verification service in Alice's user agent server. Ultimately, this 504 valid request is rendered to Alice. If the validation were 505 unsuccessful, some other treatment could be applied by the receiving 506 domain or Alice's user agent. 508 5.1. Example Identity Header Construction 510 For the following SIP request: 512 INVITE sip:bob@biloxi.example.org SIP/2.0 513 Via: SIP/2.0/TLS pc33.atlanta.example.com;branch=z9hG4bKnashds8 514 To: Alice 515 From: Bob ;tag=1928301774> 516 Call-ID: a84b4c76e66710 517 CSeq: 314159 INVITE 518 Max-Forwards: 70 519 Date: Fri, 25 Sep 2015 19:12:25 GMT 520 Contact: 521 Content-Type: application/sdp 522 Content-Length: 147 523 v=0 524 o=UserA 2890844526 2890844526 IN IP4 pc33.atlanta.example.com 525 s=Session SDP 526 c=IN IP4 pc33.atlanta.example.com 527 t=0 0 528 m=audio 49172 RTP/AVP 0 529 a=rtpmap:0 PCMU/8000 531 An authentication service will create a corresponding PASSporT 532 object. The properly-serialized PASSporT header and payload JSON 533 objects would look as follows. For the header, the values chosen by 534 the authentication service at "example.org" might read: 536 {"alg":"ES256","typ":"passport","x5u":"https://cert.example.org/ 537 passport.cer"} 539 The serialized payload will derive values from the SIP request (the 540 From, To, and Date header field values) as follows: 542 {"dest":{"uri":["sip:alice@example.com"]},"iat":1443208345, 543 "orig":{"tn":"12155551212"}} 545 The authentication service would then generate the signature over the 546 object following the procedures in [I-D.ietf-stir-passport] 547 Section 6. That signature would look as follows: 549 rq3pjT1hoRwakEGjHCnWSwUnshd0-zJ6F1VOgFWSjHBr8Qjpjlk-cpFYpFYs \ 550 ojNCpTzO3QfPOlckGaS6hEck7w 552 An authentication service signing this request and using the compact 553 form of PASSporT would thus generate and add to the request an 554 Identity header field of the following form: 556 Identity: ..rq3pjT1hoRwakEGjHCnWSwUnshd0-zJ6F1VOgFWSjHBr8Qjpj \ 557 lk-cpFYpFYsojNCpTzO3QfPOlckGaS6hEck7w; \ 558 info= 560 6. Signature Generation and Validation 562 SIP entities that instantiate the authentication service and 563 verification service roles will, respectively, generate and validate 564 the Identity header and the signature it contains. 566 6.1. Authentication Service Behavior 568 Any entity that instantiates the authentication service role MUST 569 possess the private key of one or more credentials that can be used 570 to sign for a domain or a telephone number (see Section 7.1). The 571 authentication service role can be instantiated, for example, by an 572 intermediary such as a proxy server or by a user agent. 573 Intermediaries that instantiate this role MUST be capable of 574 authenticating one or more SIP users who can register for that 575 identity. Commonly, this role will be instantiated by a proxy 576 server, since proxy servers are more likely to have a static 577 hostname, hold corresponding credentials, and have access to SIP 578 registrar capabilities that allow them to authenticate users. It is 579 also possible that the authentication service role might be 580 instantiated by an entity that acts as a redirect server, but that is 581 left as a topic for future work. 583 An authentication service adds the Identity header field to SIP 584 requests. The procedures below define the steps that must be taken 585 when each Identity header field is added. More than one Identity 586 header field may appear in a single request, and an authentication 587 service may add an Identity header field to a request that already 588 contains one or more Identity header fields. 590 Entities instantiating the authentication service role perform the 591 following steps, in order, to generate an Identity header field for a 592 SIP request: 594 Step 1: Check Authority for the Identity 596 First, the authentication service must determine whether it is 597 authoritative for the identity of the originator of the request. The 598 authentication service extracts the identity from the URI value from 599 the "identity field"; in ordinary operations, that is the addr-spec 600 component of From header field. In order to determine whether the 601 signature for the identity field should be over the entire identity 602 field URI or just a telephone number, the authentication service MUST 603 follow the process described in Section 8.1. That section will 604 either lead to the telephone number canonicalization procedures in 605 Section 8.3 for telephone numbers, or to the URI normalization 606 procedures described in Section 8.5 for domain names. Whichever the 607 result, if the authentication service is not authoritative for the 608 identity in question, it SHOULD process and forward the request 609 normally unless the local policy is to block such requests. The 610 authentication service MUST NOT add an Identity header field if the 611 authentication service does not have the authority to make the claim 612 it asserts. 614 Step 2: Authenticate the Originator 616 The authentication service MUST then determine whether or not the 617 originator of the request is authorized to claim the identity given 618 in the identity field. In order to do so, the authentication service 619 MUST authenticate the originator of the message. Some possible ways 620 in which this authentication might be performed include: 622 If the authentication service is instantiated by a SIP 623 intermediary (proxy server), it may authenticate the request with 624 the authentication scheme used for registration in its domain 625 (e.g., Digest authentication). 627 If the authentication service is instantiated by a SIP user agent, 628 a user agent may authenticate its own user through any system- 629 specific means, perhaps simply by virtue of having physical access 630 to the user agent. 632 Authorization of the use of a particular username or telephone number 633 in the user part of the From header field is a matter of local policy 634 for the authentication service; see Section 7.1 for more information. 636 Note that this check is performed only on the addr-spec in the 637 identity field (e.g., the URI of the originator, like 638 'sip:alice@atlanta.example.com'); it does not cover the display-name 639 portion of the From header field (e.g., 'Alice Atlanta'). For more 640 information, see Section 12.6. 642 Step 3: Verify Date is Present and Valid 644 An authentication service MUST add a Date header field to SIP 645 requests that do not have one. The authentication service MUST 646 ensure that any preexisting Date header field in the request is 647 accurate. Local policy can dictate precisely how accurate the Date 648 must be; a RECOMMENDED maximum discrepancy of sixty seconds will 649 ensure that the request is unlikely to upset any verifiers. If the 650 Date header field value contains a time different by more than one 651 minute from the current time noted by the authentication service, the 652 authentication service SHOULD reject the request. This behavior is 653 not mandatory because a user agent client (UAC) could only exploit 654 the Date header field in order to cause a request to fail 655 verification; the Identity header field is not intended to provide a 656 perfect record of when messages are processed. Finally, the 657 authentication service MUST verify that both the Date header field 658 and the current time fall within the validity period of its 659 credential. 661 See Section 12.1 for information on how the Date header field assists 662 verifiers. 664 Step 4: Populate and Add the Identity Header 666 Subsequently, the authentication service MUST form a PASSporT object 667 and add a corresponding Identity header field to the request 668 containing either the full or compact form of PASSporT. For the 669 baseline PASSporT header (headers containing no "ppt" parameter), 670 this follows the procedures in Section 4; if the authentication 671 service is using an alternative "ppt" format, it MUST add an 672 appropriate "ppt" parameter and follow the procedures associated with 673 that extension (see Section 9). After the Identity header field has 674 been added to the request, the authentication service MUST also add a 675 "info" parameter to the Identity header field. The "info" parameter 676 contains a URI from which the authentication service's credential can 677 be acquired; see Section 7.3 for more on credential acquisition. 679 An authentication service MAY use the full form of the PASSporT in 680 the Identity header field. The presence of the full form is OPTIONAL 681 because the information carried in the baseline PASSporT headers and 682 claims is usually redundant with information already carried 683 elsewhere in the SIP request. Using the compact form can 684 significantly reduce SIP message size, especially when the PASSporT 685 payload contains media keys. The syntax of the compact form is given 686 in [I-D.ietf-stir-passport] Section 7; essentially, it contains only 687 the signature component of the PASSporT. 689 Note that per the behavior specified in [I-D.ietf-stir-passport], use 690 of the full form is mandatory when optional extensions are included. 691 See Section 9. 693 6.1.1. Handling Repairable Errors 695 Also, in some cases, a request signed by an authentication service 696 will be rejected by the verification service on the receiving side, 697 and the authentication service will receive a SIP 4xx status code in 698 the backwards direction, such as a 438 indicating a verification 699 failure. If the authentication service did not originally send the 700 full form of the PASSporT object in the Identity header field, it 701 SHOULD retry the request with the full form after receiving a 438 702 response; however implementations SHOULD NOT retry the request more 703 than once. The information in the full form is useful on the 704 verification side for debugging errors, and there are some known 705 causes of verification failures (such as the Date header field value 706 changing in transit, see Section 12.1 for more information) that can 707 be resolved by the inclusion of the full form of PASSporT. 709 Finally, the authentication service forwards the message normally. 711 6.2. Verifier Behavior 713 This document specifies a logical role for SIP entities called a 714 verification service, or verifier. When a verifier receives a SIP 715 message containing one or more Identity header fields, it inspects 716 the signature(s) to verify the identity of the originator of the 717 message. The results of a verification are provided as input to an 718 authorization process that is outside the scope of this document. 720 A SIP request may contain zero, one, or more Identity header fields. 721 A verification service performs the steps below on each Identity 722 header field that appears in a request. If a verification service 723 cannot use any Identity header in a request, due to the absence of 724 Identity headers or unsupported "ppt" parameters, and the presence of 725 an Identity header field is required by local policy (for example, 726 based on a per-sending-domain policy, or a per-sending-user policy), 727 then a 428 'Use Identity Header' response MUST be sent in the 728 backwards direction. For more on this and other verifier responses, 729 see Section 6.2.2. 731 In order to verify an Identity header field in a message, an entity 732 acting as a verifier MUST perform the following steps, in the order 733 here specified. Note that when an Identity header field contains a 734 full form PASSporT object, the verifier MUST follow the additional 735 procedures in Section 6.2.3. 737 Step 1: Check for an Unsupported "ppt" 739 The verifier MUST inspect any optional "ppt" parameter appearing in 740 the Identity header. If no "ppt" parameter is present, then the 741 verifier proceeds normally below. If a "ppt" parameter value is 742 present, and the verifier does not support it, it MUST ignore the 743 Identity header field. If a supported "ppt" parameter value is 744 present, the verifier proceeds with Step 2, and will ultimately 745 follow the "ppt" variations described in Step 5. 747 Step 2: Determine the Originator's Identity 749 In order to determine whether the signature for the identity field 750 should be over the entire identity field URI or just a telephone 751 number, the verification service MUST follow the process described in 752 Section 8.1. That section will either lead to the telephone number 753 canonicalization procedures in Section 8.3 for telephone numbers, or 754 to the URI normalization procedures described in Section 8.5 for 755 domain names. 757 Step 3: Identify Credential for Validation 759 The verifier must ensure that it possesses the proper keying material 760 to validate the signature in the Identity header field, which usually 761 involves dereferencing a URI in the "info" parameter of the Identity 762 header field. See Section 7.2 for more information on these 763 procedures. If the verifier does not support the credential 764 described in the "info" parameter, then it treats the credential for 765 this header field as unsupported. 767 Step 4: Check the Freshness of Date 769 The verifier furthermore ensures that the value of the Date header 770 field of the request meets local policy for freshness (sixty seconds 771 is RECOMMENDED) and that it falls within the validity period of the 772 credential used to sign the Identity header field. For more on the 773 attacks this prevents, see Section 12.1. If the full form of the 774 PASSporT is present, the verifier SHOULD compare the "iat" value in 775 the PASSporT to the Date header field value in the request. If the 776 two are different, and the "iat" value differs from the Date header 777 field value but remains within verification service policy for 778 freshness, the verification service SHOULD perform the computation 779 required by Step 5 using the "iat" value instead of the Date header 780 field value. 782 Step 5: Validate the Signature 784 The verifier MUST validate the signature in the Identity header field 785 over the PASSporT object. For baseline PASSporT objects (with no 786 Identity header field "ppt" parameter) the verifier MUST follow the 787 procedures for generating the signature over a PASSporT object 788 described in Section 4. If a "ppt" parameter is present (and per 789 Step 1, is supported), the verifier follows the procedures for that 790 "ppt" (see Section 9). If a verifier determines that the signature 791 in the Identity does not correspond to the reconstructed signed- 792 identity-digest, then the Identity header field should be considered 793 invalid. 795 6.2.1. Authorization of Requests 797 The verification of an Identity header field does not entail any 798 particular treatment of the request. The handling of the message 799 after the verification process depends on how the verification 800 service is implemented and on local policy. This specification does 801 not propose any authorization policy for user agents or proxy servers 802 to follow based on the presence of a valid Identity header field, the 803 presence of an invalid Identity header field, or the absence of an 804 Identity header field, or a stale Date header field value, but it is 805 anticipated that local policies could involve making different 806 forwarding decisions in intermediary implementations, or changing how 807 the user is alerted, or how identity is rendered, in user agent 808 implementations. 810 The presence of multiple Identity header fields within a message 811 raises the prospect that a verification services could receive a 812 message containing some valid and some invalid Identity header 813 fields. As a guideline, this specification recommends that only if a 814 verifier determines all Identity header fields within a message are 815 invalid should the request be considered to have an invalid identity. 816 If at least one Identity header field value is valid and from a 817 trusted source, then relying parties can use that header for 818 authorization decisions regardless of whether other untrusted or 819 invalid Identity headers appear in a request. 821 6.2.2. Failure Response Codes Sent by a Verification Service 823 RFC4474 originally defined four response codes for failure conditions 824 specific to the Identity header field and its original mechanism. 825 These status codes are retained in this specification, with some 826 slight modifications. Also, this specification details responding 827 with 403 when a stale Date header field value is received. 829 A 428 response will be sent (per Section 6.2) when an Identity header 830 field is required, but no Identity header field without a "ppt" 831 parameter, or with a supported "ppt" value, has been received. In 832 the case where one or more Identity header fields with unsupported 833 "ppt" values have been received, then a verification service may send 834 a 428 with the special reason phrase "Use Supported PASSporT Format". 835 Note however that this specification gives no guidance on how a 836 verification service might decide to require an Identity header field 837 for a particular SIP request. Such authorization policies are 838 outside the scope of this specification. 840 The 436 'Bad Identity Info' response code indicates an inability to 841 acquire the credentials needed by the verification service for 842 validating the signature in an Identity header field. Again, given 843 the potential presence of multiple Identity header fields, this 844 response code should only be sent when the verification service is 845 unable to deference the URIs and/or acquire the credentials 846 associated with all Identity header fields in the request. This 847 failure code could be repairable if the authentication service 848 resends the request with an 'info' parameter pointing to a credential 849 that the verification service can access. 851 The 437 'Unsupported Credential' is sent when a verification service 852 can acquire, or already holds, the credential represented by the 853 'info' parameter of at least one Identity header field in the 854 request, but does not support said credential(s), for reasons such as 855 failing to trust the issuing CA, or failing to support the algorithm 856 with which the credential was signed. 858 The 438 'Invalid Identity Header' response indicates that of the set 859 of Identity header fields in a request, no header field with a valid 860 and supported PASSporT object has been received. Like the 428 861 response, this is sent by a verification service when its local 862 policy dictates that a broken signature in an Identity header field 863 is grounds for rejecting a request. Note that in some cases, an 864 Identity header field may be broken for other reasons than that an 865 originator is attempting to spoof an identity: for example, when a 866 transit network alters the Date header field of the request. Sending 867 a full form PASSporT can repair some of these conditions (see 868 Section 6.2.3), so the recommended way to attempt to repair this 869 failure is to retry the request with the full form of PASSporT if it 870 had originally been sent with the compact form. The alternative 871 reason phrase 'Invalid PASSporT' SHOULD be used when an extended full 872 form PASSporT lacks required headers or claims, or when an extended 873 full form PASSporT signaled with the "ppt" parameter lacks required 874 claims for that extension. 876 Finally, a 403 response with the special reason phrase 'Stale Date" 877 may be sent when the verification service receives a request with a 878 Date header field value that is older than the local policy for 879 freshness permits. The same response may be used when the "iat" in 880 the full form of a PASSporT has a value older than the local policy 881 for freshness permits. 883 6.2.3. Handling the full form of PASSporT 885 If the full form of PASSporT is present in an Identity header, this 886 permits the use of optional extensions as described in 887 [I-D.ietf-stir-passport] Section 8.3. Furthermore, the verification 888 service can extract from the "orig" and "dest" elements of the 889 PASSporT full form the canonical telephone numbers created by the 890 authentication service, as well as an "iat" claim corresponding to 891 the Date header field that the authentication service used. These 892 values may be used to debug canonicalization problems, or to avoid 893 unnecessary signature breakage caused by intermediaries that alter 894 certain SIP header field values in transit. 896 However, the verification service MUST NOT treat the value in the 897 "orig" of a full form PASSporT as the originating identity of the 898 call: the originating identity of the call is always derived from the 899 SIP signaling, and it is that value, per the procedures above in 900 Section 6.2 Step 2, which is used to recompute the signature at the 901 verification service. That value, rather than the value inside the 902 PASSporT object, is rendered to an end user in ordinary SIP 903 operations, and if a verification service were to simply trust that 904 the value in the "orig" corresponded to the call that it received 905 without comparing it to the call signaling, this would enable various 906 cut-and-paste attacks. As an optimization, when the full form is 907 present, the verification service MAY delay performing that 908 cryptographic operation and first compute its own canonicalization of 909 an originating telephone number to compare it to the values in the 910 "orig" element of PASSporT. This would allow the verification 911 service to ascertain whether or not the two ends agree on the 912 canonical number form; if they do not, then surely the signature 913 validation would fail. 915 7. Credentials 917 This section gives general guidance on the use of credential systems 918 by authentication and verification services, as well as requirements 919 that must be met by credential systems that conform with this 920 architecture. It does not mandate any specific credential system. 922 Furthermore, this specification allows either a user agent or a proxy 923 server to provide the authentication service function and/or the 924 verification service function. For the purposes of end-to-end 925 security, it is obviously preferable for end systems to acquire their 926 own credentials; in this case user agents can act as authentication 927 services. However, for some deployments, end-user credentials may be 928 neither practical nor affordable, given the potentially large number 929 of SIP user agents (phones, PCs, laptops, PDAs, gaming devices) that 930 may be employed by a single user. Synchronizing keying material 931 across multiple devices may be prohibitively complex and require 932 quite a good deal of additional endpoint behavior. Managing several 933 credentials for the various devices could also be burdensome. Thus, 934 for reasons of credential management alone, implementing the 935 authentication service at an intermediary may be more practical. 936 This trade-off needs to be understood by implementers of this 937 specification. 939 7.1. Credential Use by the Authentication Service 941 In order to act as an authentication service, a SIP entity must have 942 access to the private keying material of one or more credentials that 943 cover domain names or telephone numbers. These credentials may 944 represent authority over one domain (such as example.com) or a set of 945 domains enumerated by the credential. Similarly, a credential may 946 represent authority over a single telephone number or a range of 947 telephone numbers. The way that the scope of a credential's 948 authority is expressed is specific to the credential mechanism. 950 Authorization of the use of a particular username or telephone number 951 in the From header field value is a matter of local policy for the 952 authentication service, one that depends greatly on the manner in 953 which authentication is performed. For non-telephone number user 954 parts, one policy might be as follows: the username given in the 955 'username' parameter of the Proxy-Authorization header field MUST 956 correspond exactly to the username in the From header field of the 957 SIP message. However, there are many cases in which this is too 958 limiting or inappropriate; a realm might use 'username' parameters in 959 Proxy-Authorization header field that do not correspond to the user- 960 portion of From header fields, or a user might manage multiple 961 accounts in the same administrative domain. In this latter case, a 962 domain might maintain a mapping between the values in the 'username' 963 parameter of the Proxy-Authorization header field and a set of one or 964 more SIP URIs that might legitimately be asserted for that 965 'username'. For example, the username can correspond to the 'private 966 identity' as defined in Third Generation Partnership Project (3GPP), 967 in which case the From header field can contain any one of the public 968 identities associated with this private identity. In this instance, 969 another policy might be as follows: the URI in the From header field 970 MUST correspond exactly to one of the mapped URIs associated with the 971 'username' given in the Proxy-Authorization header field. This is a 972 suitable approach for telephone numbers in particular. 974 This specification could also be used with credentials that cover a 975 single name or URI, such as alice@example.com or 976 sip:alice@example.com. This would require a modification to 977 authentication service behavior to operate on a whole URI rather than 978 a domain name. Because this is not believed to be a pressing use 979 case, this is deferred to future work, but implementers should note 980 this as a possible future direction. 982 Exceptions to such authentication service policies arise for cases 983 like anonymity; if the AoR asserted in the From header field uses a 984 form like 'sip:anonymous@example.com' (see [RFC3323]), then the 985 'example.com' proxy might authenticate only that the user is a valid 986 user in the domain and insert the signature over the From header 987 field as usual. 989 7.2. Credential Use by the Verification Service 991 In order to act as a verification service, a SIP entity must have a 992 way to acquire and retain credentials for authorities over particular 993 domain names, telephone numbers and/or number ranges. Dereferencing 994 the URI found in the "info" parameter of the Identity header field 995 (as described Section 7.3) MUST be supported by all verification 996 service implementations to create a baseline means of credential 997 acquisition. Provided that the credential used to sign a message is 998 not previously known to the verifier, SIP entities SHOULD discover 999 this credential by dereferencing the "info" parameter, unless they 1000 have some implementation-specific way of acquiring the needed keying 1001 material, such as an offline store of periodically-updated 1002 credentials. The 436 'Bad Identity Info' response exists for cases 1003 where the verification service cannot deference the URI in the "info" 1004 parameter. 1006 This specification does not propose any particular policy for a 1007 verification service to determine whether or not the holder of a 1008 credential is the appropriate party to sign for a given SIP identity. 1009 Guidance on this is deferred to credential mechanism specifications. 1011 Verification service implementations supporting this specification 1012 may wish to have some means of retaining credentials (in accordance 1013 with normal practices for credential lifetimes and revocation) in 1014 order to prevent themselves from needlessly downloading the same 1015 credential every time a request from the same identity is received. 1016 Credentials cached in this manner may be indexed in accordance with 1017 local policy: for example, by their scope of authority, or the URI 1018 given in the "info" parameter value. Further consideration of how to 1019 cache credentials is deferred to the credential mechanism 1020 specifications. 1022 7.3. 'info' parameter URIs 1024 An "info" parameter MUST contain a URI which dereferences to a 1025 resource that contains the public key components of the credential 1026 used by the authentication service to sign a request. It is 1027 essential that a URI in the "info" parameter be dereferencable by any 1028 entity that could plausibly receive the request. For common cases, 1029 this means that the URI SHOULD be dereferencable by any entity on the 1030 public Internet. In constrained deployment environments, a service 1031 private to the environment MAY be used instead. 1033 Beyond providing a means of accessing credentials for an identity, 1034 the "info" parameter further serves as a means of differentiating 1035 which particular credential was used to sign a request, when there 1036 are potentially multiple authorities eligible to sign. For example, 1037 imagine a case where a domain implements the authentication service 1038 role for a range of telephone numbers and a user agent belonging to 1039 Alice has acquired a credential for a single telephone number within 1040 that range. Either would be eligible to sign a SIP request for the 1041 number in question. Verification services however need a means to 1042 differentiate which one performed the signature. The "info" 1043 parameter performs that function. 1045 7.4. Credential System Requirements 1047 This document makes no recommendation for the use of any specific 1048 credential system. Today, there are two primary credential systems 1049 in place for proving ownership of domain names: certificates (e.g., 1050 X.509 v3, see [RFC5280]) and the domain name system itself (e.g., 1051 DANE, see [RFC6698]). It is envisioned that either could be used in 1052 the SIP identity context: an "info" parameter could for example give 1053 an HTTP URL of the Content-Type 'application/pkix-cert' pointing to a 1054 certificate (following the conventions of [RFC2585]). The "info" 1055 parameter might use the DNS URL scheme (see [RFC4501]) to designate 1056 keys in the DNS. 1058 While no comparable public credentials exist for telephone numbers, 1059 either approach could be applied to telephone numbers. A credential 1060 system based on certificates is given in 1061 [I-D.ietf-stir-certificates], but this specification can work with 1062 other credential systems; for example, using the DNS was proposed in 1063 [I-D.kaplan-stir-cider]. 1065 In order for a credential system to work with this mechanism, its 1066 specification must detail: 1068 which URIs schemes the credential will use in the "info" 1069 parameter, and any special procedures required to dereference the 1070 URIs 1072 how the verifier can learn the scope of the credential 1074 any special procedures required to extract keying material from 1075 the resources designated by the URI 1077 any algorithms required to validate the credentials (e.g. for 1078 certificates, any algorithms used by certificate authorities to 1079 sign certificates themselves), and 1081 how the associated credentials will support the mandatory signing 1082 algorithm(s) required by PASSporT [I-D.ietf-stir-passport]. 1084 SIP entities cannot reliably predict where SIP requests will 1085 terminate. When choosing a credential scheme for deployments of this 1086 specification, it is therefore essential that the trust anchor(s) for 1087 credentials be widely trusted, or that deployments restrict the use 1088 of this mechanism to environments where the reliance on particular 1089 trust anchors is assured by business arrangements or similar 1090 constraints. 1092 Note that credential systems must address key lifecycle management 1093 concerns: were a domain to change the credential available at the 1094 Identity header field "info" parameter URI before a verifier 1095 evaluates a request signed by an authentication service, this would 1096 cause obvious verifier failures. When a rollover occurs, 1097 authentication services SHOULD thus provide new "info" URIs for each 1098 new credential, and SHOULD continue to make older key acquisition 1099 URIs available for a duration longer than the plausible lifetime of a 1100 SIP transaction (a minute would most likely suffice). 1102 8. Identity Types 1104 The problem statement of STIR [RFC7340] focuses primarily on cases 1105 where the called and calling parties identified in the To and From 1106 header field values use telephone numbers, as this remains the 1107 dominant use case in the deployment of SIP. However, the Identity 1108 header mechanism also works with SIP URIs without telephone numbers 1109 (of the form "sip:user@host"), and potentially other identifiers when 1110 SIP interworks with other protocols. 1112 Authentication services vet the identity of the originator of a call, 1113 which is typically found in the From header field value. The 1114 guidance in this specification also applies to extracting the URI 1115 containing the originator's identity from the P-Asserted-Identity 1116 header field value instead of the From header field value. In some 1117 trusted environments, the P-Asserted-Identity header field is used in 1118 lieu of the From header field to convey the address-of-record or 1119 telephone number of the originator of a request; where it does, local 1120 policy might therefore dictate that the canonical identity derives 1121 from the P-Asserted-Identity header field rather than the From header 1122 field. 1124 Ultimately, in any case where local policy canonicalizes the identity 1125 into a form different from how it appears in the From header field, 1126 the use of the full form of PASSporT by authentication services is 1127 RECOMMENDED, but because the "orig" claim of PASSporT itself could 1128 then divulge information about users or networks, implementers should 1129 be mindful of the guidelines in Section 11. 1131 8.1. Differentiating Telephone Numbers from URIs 1133 In order to determine whether or not the user portion of a SIP URI is 1134 a telephone number, authentication services and verification services 1135 MUST perform the following procedure on any SIP URI they inspect 1136 which contains a numeric user part. Note that the same procedures 1137 are followed for creating the canonical form of a URI found in the 1138 From header field as they are for one found in the To header field or 1139 the P-Asserted-Identity header field. 1141 First, implementations will ascertain if the user-portion of the URI 1142 constitutes a telephone number. Telephone numbers most commonly 1143 appear in SIP header field values in the username portion of a SIP 1144 URI (e.g., 'sip:+17005551008@chicago.example.com;user=phone'). The 1145 user part of SIP URIs with the "user=phone" parameter conforms to the 1146 syntax of the TEL URI scheme (RFC 3966 [RFC3966]). It is also 1147 possible for a TEL URI to appear in SIP header fields outside the 1148 context of a SIP or SIPS URI (e.g., 'tel:+17005551008'). Thus, in 1149 standards-compliant environments, numbers will be explicitly labeled 1150 by the use of TEL URIs or the 'user=phone' parameter. 1152 Alternatively, implementations in environments that do not conform to 1153 those standards MAY follow local policies for identifying telephone 1154 numbers. For exampple, implementations could infer that the user 1155 part is a telephone number due to the presence of the '+' indicator 1156 at the start of the user-portion. Absent even that indication, if 1157 there are numbers present in the user-portion, implementations might 1158 conceivably also detect that the user-portion of the URI contains a 1159 telephone number by determining whether or not those numbers would be 1160 dialable or routable in the local environment -- bearing in mind that 1161 the telephone number may be a valid [E.164] number, a nationally- 1162 specific number, or even a private branch exchange number. 1163 Implementations could also rely on external hints: for example, a 1164 verification service implementation could infer from the type of 1165 credential that signed a request that the signature must be over a 1166 telephone number. 1168 Regardless of how the implementation detects telephone numbers, once 1169 a telephone number has been detected, implementations SHOULD follow 1170 the procedures in Section 8.3. If the URI field does not contain a 1171 telephone number, or if the result of the canonicalization of the 1172 From header field value does not form a valid E.164 telephone number, 1173 the authentication service and/or verification service SHOULD treat 1174 the entire URI as a SIP URI, and apply the procedures in Section 8.5. 1175 These URI normalization procedures are invoked to canonicalize the 1176 URI before it is included in a PASSporT object in, for example, a 1177 "uri" claim. See Section 8.5 for that behavior. 1179 8.2. Authority for Telephone Numbers 1181 In order for telephone numbers to be used with the mechanism 1182 described in this document, authentication services must receive 1183 credentials from an authority for telephone numbers or telephone 1184 number ranges, and verification services must trust the authority 1185 employed by the authentication service that signs a request. Per 1186 Section 7.4, enrollment procedures and credential management are 1187 outside the scope of this document; approaches to credential 1188 management for telephone numbers are discussed in 1189 [I-D.ietf-stir-certificates]. 1191 8.3. Telephone Number Canonicalization Procedures 1193 Once an implementation has identified a telephone number, it must 1194 construct a number string. That requires performing the following 1195 steps: 1197 Implementations MUST drop any "+"s, any internal dashes, 1198 parentheses or other non-numeric characters, excepting only the 1199 "#" or "*" keys used in some special service numbers (typically, 1200 these will appear only in the To header field value). This MUST 1201 result in an ASCII string limited to "#", "*" and digits without 1202 whitespace or visual separators. 1204 Next, an implementation must assess if the number string is a 1205 valid, globally-routable number with a leading country code. If 1206 not, implementations SHOULD convert the number into E.164 format, 1207 adding a country code if necessary; this may involve transforming 1208 the number from a dial string (see [RFC3966]), removing any 1209 national or international dialing prefixes or performing similar 1210 procedures. It is only in the case that an implementation cannot 1211 determine how to convert the number to a globally-routable format 1212 that this step may be skipped. This will be the case, for 1213 example, for nationally-specific service numbers (e.g. 911, 112); 1214 however, calls to those numbers are routed in a very strict 1215 fashion which ordinarily prevents them from reaching entities that 1216 don't understand the numbers. 1218 Some domains may need to take unique steps to convert their 1219 numbers into a global format, and such transformations during 1220 canonicalization can also be made in accordance with specific 1221 policies used within a local domain. For example, one domain may 1222 only use local number formatting and need to convert all To/From 1223 header field user portions to E.164 by prepending country-code and 1224 region code digits; another domain might have prefixed usernames 1225 with trunk-routing codes, in which case the canonicalization will 1226 need to remove the prefix. This specification cannot anticipate 1227 all of the potential transformations that might be useful. 1229 The resulting canonical number string will be used as input to the 1230 hash calculation during signing and verifying processes. 1232 The ABNF of this number string is: 1234 tn-spec = 1*tn-char 1235 tn-char = "#" / "*" / DIGIT 1237 The resulting number string is used in the construction of the 1238 telephone number field(s) in a PASSporT object. 1240 8.4. Authority for Domain Names 1242 To use a SIP URI as an identity in this mechanism requires 1243 authentication and verification systems to support standard 1244 mechanisms for proving authority over a domain name: that is, the 1245 domain name in the host portion of the SIP URI. 1247 A verifier MUST evaluate the correspondence between the user's 1248 identity and the signing credential by following the procedures 1249 defined in [RFC5922], Section 7.2. While [RFC5922] deals with the 1250 use of TLS and is specific to certificates, the procedures described 1251 are applicable to verifying identity if one substitutes the "hostname 1252 of the server" for the domain portion of the user's identity in the 1253 From header field of a SIP request with an Identity header field. 1255 This process is complicated by two deployment realities. In the 1256 first place, credentials have varying ways of describing their 1257 subjects, and may indeed have multiple subjects, especially in 1258 'virtual hosting' cases where multiple domains are managed by a 1259 single application (see [RFC5922] Section 7.8). Secondly, some SIP 1260 services may delegate SIP functions to a subordinate domain and 1261 utilize the procedures in [RFC3263] that allow requests for, say, 1262 'example.com' to be routed to 'sip.example.com'. As a result, a user 1263 with the AoR 'sip:alice@example.com' may process requests through a 1264 host like 'sip.example.com', and it may be that latter host that acts 1265 as an authentication service. 1267 To address the second of these problems, a domain that deploys an 1268 authentication service on a subordinate host might supply that host 1269 with the private keying material associated with a credential whose 1270 subject is a domain name that corresponds to the domain portion of 1271 the AoRs that the domain distributes to users. Note that this 1272 corresponds to the comparable case of routing inbound SIP requests to 1273 a domain. When the NAPTR and SRV procedures of RFC 3263 are used to 1274 direct requests to a domain name other than the domain in the 1275 original Request-URI (e.g., for 'sip:alice@example.com', the 1276 corresponding SRV records point to the service 'sip1.example.org'), 1277 the client expects that the certificate passed back in any TLS 1278 exchange with that host will correspond exactly with the domain of 1279 the original Request-URI, not the domain name of the host. 1280 Consequently, in order to make inbound routing to such SIP services 1281 work, a domain administrator must similarly be willing to share the 1282 domain's private key with the service. This design decision was made 1283 to compensate for the insecurity of the DNS, and it makes certain 1284 potential approaches to DNS-based 'virtual hosting' unsecurable for 1285 SIP in environments where domain administrators are unwilling to 1286 share keys with hosting services. 1288 8.5. URI Normalization 1290 Just as telephone numbers may undergo a number of syntactic 1291 transformations during transit, the same can happen to SIP and SIPS 1292 URIs without telephone numbers as they traverse certain 1293 intermediaries. Therefore, when generating a PASSporT object based 1294 on a SIP request, any SIP and SIPS URIs must be transformed into a 1295 canonical form which captures the address-of-record represented by 1296 the URI before they are provisioned in PASSporT claims such as "uri". 1297 The URI normalization procedures required are as follows. 1299 Following the ABNF of RFC3261, the SIP or SIPS URI in question MUST 1300 discard all elements after the "hostport" of the URI, including all 1301 uri-parameters and escaped headers, from its syntax. Of the userinfo 1302 component of the SIP URI, only the user element will be retained: any 1303 password (and any leading ":" before the password) MUST be removed, 1304 and since this userinfo necessarily does not contain a telephone- 1305 subscriber component, no further parameters can appear in the user 1306 portion. 1308 The hostport portion of the SIP or SIPS URI MUST similarly be 1309 stripped of any trailing port along with the ":" that proceeds the 1310 port, leaving only the host. 1312 The ABNF of this canonical URI form (following the syntax defined in 1313 RFC3261) is: 1315 canon-uri = ( "sip" / "sips" ) ":" user "@" host 1317 Finally, the URI will be subject to syntax-based URI normalization 1318 procedures of [RFC3986] Section 6.2.2. Implementations MUST perform 1319 case normalization (rendering the scheme, user, and host all 1320 lowercase) and percent-encoding normalization (decoding any percent- 1321 encoded octet that corresponds to an unreserved character, per 1323 [RFC3986] Section 2.3). However, note that normalization procedures 1324 face known challenges in some internationalized environments (see 1325 [I-D.ietf-iri-comparison]) and that perfect normalization of URIs may 1326 not be possible in those environments. 1328 For future PASSporT applications, it may be desirable to provide an 1329 identifier without an attached protocol scheme. Future 1330 specifications that define PASSporT claims for SIP as a using 1331 protocol could use these basic procedures, but eliminate the scheme 1332 component. A more exact definition is left to future specifications. 1334 9. Extensibility 1336 As future requirements may warrant increasing the scope of the 1337 Identity mechanism, this specification specifies an optional "ppt" 1338 parameter of the Identity header field, which mirrors the "ppt" 1339 header in PASSporT. The "ppt" parameter value MUST consist of a 1340 token containing an extension specification, which denotes an 1341 extended set of one or more signed claims per the type extensibility 1342 mechanism specified in [I-D.ietf-stir-passport] Section 8. Note that 1343 per the guidance in that section, "ppt" is used only to enforce a 1344 mandatory extension: optional claims may be added to any PASSporT 1345 object without requiring the use of "ppt", but the compact form of 1346 PASSporT MUST NOT be used when optional claims are present in the 1347 PASSporT payload. 1349 The potential for extensions is one the primary motivations for 1350 allowing the presence of multiple Identity header fields in the same 1351 SIP request. It is envisioned that future extensions might allow for 1352 alternate information to be signed, or to explicitly allow different 1353 parties to provide the signatures than the authorities envisioned by 1354 baseline STIR. A request might, for example, have one Identity added 1355 by an authentication service at the originating administrative 1356 domain, and then another Identity header field added by some further 1357 intermediary using a PASSporT extension. While this specification 1358 does not define any such specific purpose for multiple Identity 1359 header fields, implementations MUST support receiving multiple header 1360 fields for future compatibility reasons. 1362 An authentication service cannot assume that verifiers will 1363 understand any given extension. Verifiers that do support an 1364 extension may then trigger appropriate application-level behavior in 1365 the presence of an extension; authors of extensions should provide 1366 appropriate extension-specific guidance to application developers on 1367 this point. 1369 10. Backwards Compatibility with RFC4474 1371 This specification introduces several significant changes from the 1372 RFC4474 version of the Identity header field. However, due to the 1373 problems enumerated in [I-D.rosenberg-sip-rfc4474-concerns], it is 1374 not believed that the original Identity header field has seen any 1375 deployment, or even implementation in deployed products. 1377 As such, this mechanism contains no provisions for signatures 1378 generated with this specification to work with RFC4474-compliant 1379 implementations, nor any related backwards-compatibility provisions. 1380 Hypothetically, were an RFC4474-compliant implementation to receive 1381 messages containing this revised version of the Identity header 1382 field, it would likely fail the request with a 436 response code due 1383 to the absence of an Identity-Info header field. Implementations of 1384 this specification, for debugging purposes, might interpret a 436 1385 with a reason phrase of "Bad Identity-Info" as an indication that the 1386 request has failed because it reached a (hypothetical) 1387 RFC4474-compliant verification service. 1389 11. Privacy Considerations 1391 The purpose of this mechanism is to provide a reliable identification 1392 of the originator of a SIP request, specifically a cryptographic 1393 assurance that an authority asserts the originator can claim the URI 1394 the identity stipulated in the request. This URI may contain or 1395 imply a variety of personally identifying information, including the 1396 name of a human being, their place of work or service provider, and 1397 possibly further details. The intrinsic privacy risks associated 1398 with that URI are, however, no different from those of baseline SIP. 1399 Per the guidance in [RFC6973], implementers should make users aware 1400 of the privacy trade-off of providing secure identity. 1402 The identity mechanism presented in this document is compatible with 1403 the standard SIP practices for privacy described in [RFC3323]. A SIP 1404 proxy server can act both as a RFC3323 privacy service and as an 1405 authentication service. Since a user agent can provide any From 1406 header field value that the authentication service is willing to 1407 authorize, there is no reason why private SIP URIs that contain 1408 legitimate domains (e.g., sip:anonymous@example.com) cannot be signed 1409 by an authentication service. The construction of the Identity 1410 header field is the same for private URIs as it is for any other sort 1411 of URIs. Similar practices could be used to support opportunistic 1412 signing of SIP requests for UA-integrated authentication services 1413 with self-signed certificates, though that is outside the scope of 1414 this specification and is left as a matter for future investigation. 1416 Note, however, that even when using anonymous SIP URIs, an 1417 authentication service must possess a certificate corresponding to 1418 the host portion of the addr-spec of the From header field value of 1419 the request; accordingly, using domains like 'anonymous.invalid' will 1420 not be usable by privacy services that simultaneously act as 1421 authentication services. The assurance offered by the usage of 1422 anonymous URIs with a valid domain portion is "this is a known user 1423 in my domain that I have authenticated, but I am keeping its identity 1424 private". 1426 It is worth noting two features of this more anonymous form of 1427 identity. One can eliminate any identifying information in a domain 1428 through the use of the domain 'anonymous.invalid," but we must then 1429 acknowledge that it is difficult for a domain to be both anonymous 1430 and authenticated. The use of the "anonymous.invalid" domain entails 1431 that no corresponding authority for the domain can exist, and as a 1432 consequence, authentication service functions for that domain are 1433 meaningless. The second feature is more germane to the threats this 1434 document mitigates [RFC7375]. None of the relevant attacks, all of 1435 which rely on the attacker taking on the identity of a victim or 1436 hiding their identity using someone else's identity, are enabled by 1437 an anonymous identity. As such, the inability to assert an authority 1438 over an anonymous domain is irrelevant to our threat model. 1440 [RFC3325] defines the "id" priv-value token, which is specific to the 1441 P-Asserted-Identity header field. The sort of assertion provided by 1442 the P-Asserted-Identity header field is very different from the 1443 Identity header field presented in this document. It contains 1444 additional information about the originator of a message that may go 1445 beyond what appears in the From header field; P-Asserted-Identity 1446 holds a definitive identity for the originator that is somehow known 1447 to a closed network of intermediaries. Presumably, that network will 1448 use this identity for billing or security purposes. The danger of 1449 this network-specific information leaking outside of the closed 1450 network motivated the "id" priv-value token. The "id" priv-value 1451 token has no implications for the Identity header field, and privacy 1452 services MUST NOT remove the Identity header field when a priv-value 1453 of "id" appears in a Privacy header field. 1455 The full form of the PASSporT object provides the complete JSON 1456 objects used to generate the signed-identity-digest of the Identity 1457 header field value, including the canonicalized form of the telephone 1458 number of the originator of a call, if the signature is over a 1459 telephone number. In some contexts, local policy may require a 1460 canonicalization which differs substantially from the original From 1461 header field. Depending on those policies, potentially the full form 1462 of PASSporT might divulge information about the originating network 1463 or user that might not appear elsewhere in the SIP request. Were it 1464 to be used to reflect the contents of the P-Asserted-Identity header 1465 field, for example, then the object would need to be converted to the 1466 compact form when the P-Asserted-Identity header is removed to avoid 1467 any such leakage outside of a trust domain. Since, in those 1468 contexts, the canonical form of the originator's identity could not 1469 be reassembled by a verifier, and thus the Identity signature 1470 validation process would fail, using P-Asserted-Identity with the 1471 full form of PASSporT in this fashion is NOT RECOMMENDED outside of 1472 environments where SIP requests will never leave the trust domain. 1473 As a side note, history shows that closed networks never stay closed 1474 and one should design their implementation assuming connectivity to 1475 the broader Internet. 1477 Finally, note that unlike [RFC3325], the mechanism described in this 1478 specification adds no information to SIP requests that has privacy 1479 implications - apart from disclosing that an authentication service 1480 is willing to sign for an originator. 1482 12. Security Considerations 1484 This document describes a mechanism that provides a signature over 1485 the Date header field of SIP requests, parts of the To and From 1486 header fields, and when present any media keying material in the 1487 message body. In general, the considerations related to the security 1488 of these header fields are the same as those given in [RFC3261] for 1489 including header fields in tunneled 'message/sip' MIME bodies (see 1490 Section 23 of RFC3261 in particular). The following section details 1491 the individual security properties obtained by including each of 1492 these header fields within the signature; collectively, this set of 1493 header fields provides the necessary properties to prevent 1494 impersonation. It addresses the solution-specific attacks against 1495 in-band solutions enumerated in [RFC7375] Section 4.1. 1497 12.1. Protected Request Fields 1499 The From header field value (in ordinary operations) indicates the 1500 identity of the originator of the message. The SIP address-of-record 1501 URI, or an embedded telephone number, in the From header field is the 1502 identity of a SIP user, for the purposes of this document. Note that 1503 in some deployments the identity of the originator may reside in P- 1504 Asserted-Id instead. The originator's identity is the key piece of 1505 information that this mechanism secures; the remainder of the signed 1506 parts of a SIP request are present to provide reference integrity and 1507 to prevent certain types of cut-and-paste attacks. 1509 The Date header field value protects against cut-and-paste attacks, 1510 as described in [RFC3261], Section 23.4.2. That specification 1511 recommends that implementations notify the user of a potential 1512 security issue if the signed Date header field value is stale by an 1513 hour or more. To prevent cut-and-paste of recently-observed 1514 messages, this specification instead RECOMMENDS a shorter interval of 1515 sixty seconds. Implementations of this specification MUST NOT deem 1516 valid a request with an outdated Date header field. Note that per 1517 [RFC3893] Section 10 behavior, servers can keep state of recently 1518 received requests, and thus if an Identity header field is replayed 1519 by an attacker within the Date interval, verifiers can detect that it 1520 is spoofed because a message with an identical Date from the same 1521 source had recently been received. 1523 It has been observed in the wild that some networks change the Date 1524 header field value of SIP requests in transit, and that alternative 1525 behavior might be necessary to accommodate that use case. 1526 Verification services that observe a signature validation failure MAY 1527 therefore reconstruct the Date header field component of the 1528 signature from the "iat" carried in the full form of PASSporT: 1529 provided that time recorded by "iat" falls within the local policy 1530 for freshness that would ordinarily apply to the Date header, the 1531 verification service MAY treat the signature as valid, provided it 1532 keeps adequate state to detect recent replays. Note that this will 1533 require the inclusion of the full form of the PASSporT object by 1534 authentication services in networks where such failures are observed. 1536 The To header field value provides the identity of the SIP user that 1537 this request originally targeted. Covering the identity in the To 1538 header field with the Identity signature serves two purposes. First, 1539 it prevents cut-and-paste attacks in which an Identity header field 1540 from a legitimate request for one user is cut-and-pasted into a 1541 request for a different user. Second, it preserves the starting URI 1542 scheme of the request, which helps prevent downgrade attacks against 1543 the use of SIPS. The To identity offers additional protection 1544 against cut-and-paste attacks beyond the Date header field. For 1545 example, without a signature over the To identity, an attacker who 1546 receives a call from a target could immediately cut-and-paste the 1547 Identity and From header field value from that INVITE into a new 1548 request to the target's voicemail service within the Date interval, 1549 and the voicemail service would have no way knowing that the Identity 1550 header field it received had been originally signed for a call 1551 intended for a different number. However, note the caveats below in 1552 Section 12.1.1. 1554 When signing a request that contains a fingerprint of keying material 1555 in SDP for DTLS-SRTP [RFC5763], this mechanism always provides a 1556 signature over that fingerprint. This signature prevents certain 1557 classes of impersonation attacks in which an attacker forwards or 1558 cut-and-pastes a legitimate request. Although the target of the 1559 attack may accept the request, the attacker will be unable to 1560 exchange media with the target as they will not possess a key 1561 corresponding to the fingerprint. For example, there are some 1562 baiting attacks, launched with the REFER method or through social 1563 engineering, where the attacker receives a request from the target 1564 and reoriginates it to a third party. These might not be prevented 1565 by only a signature over the From, To and Date, but could be 1566 prevented by securing a fingerprint for DTLS-SRTP. While this is a 1567 different form of impersonation than is commonly used for 1568 robocalling, ultimately there is little purpose in establishing the 1569 identity of the user that originated a SIP request if this assurance 1570 is not coupled with a comparable assurance over the contents of the 1571 subsequent media communication. This signature also reduces the 1572 potential for active eavesdropping attacks against the SIP media. In 1573 environments where DTLS-SRTP is unsupported, however, no field is 1574 signed and no protections are provided. 1576 12.1.1. Protection of the To Header and Retargeting 1578 Armed with the original value of the To header field, the recipient 1579 of a request may be tempted compare it to their own identity in order 1580 to determine whether or not the identity information in this call 1581 might have been replayed. However, any request may be legitimately 1582 retargeted as well, and as a result legitimate requests may reach a 1583 SIP endpoint whose user is not identified by the URI designated in 1584 the To header field value. It is therefore difficult for any 1585 verifier to decide whether or not some prior retargeting was 1586 "legitimate." Retargeting can also cause confusion when identity 1587 information is provided for requests sent in the backwards direction 1588 in a dialog, as the dialog identifiers may not match credentials held 1589 by the ultimate target of the dialog. For further information on the 1590 problems of response identity see [I-D.peterson-sipping-retarget]. 1592 Any means for authentication services or verifiers to anticipate 1593 retargeting is outside the scope of this document, and likely to have 1594 equal applicability to response identity as it does to requests in 1595 the backwards direction within a dialog. Consequently, no special 1596 guidance is given for implementers here regarding the 'connected 1597 party' problem (see [RFC4916]); authentication service behavior is 1598 unchanged if retargeting has occurred for a dialog-forming request. 1599 Ultimately, the authentication service provides an Identity header 1600 field for requests in the dialog only when the user is authorized to 1601 assert the identity given in the From header field, and if they are 1602 not, an Identity header field is not provided. And per the threat 1603 model of [RFC7375], resolving problems with 'connected' identity has 1604 little bearing on detecting robocalling or related impersonation 1605 attacks. 1607 12.2. Unprotected Request Fields 1609 RFC4474 originally had protections for the Contact, Call-ID and CSeq. 1610 These are removed from RFC4474bis. The absence of these header field 1611 values creates some opportunities for determined attackers to 1612 impersonate based on cut-and-paste attacks; however, the absence of 1613 these header field values does not seem impactful to preventing the 1614 simple unauthorized claiming of an identity for the purposes of 1615 robocalling, voicemail hacking, or swatting, which is the primary 1616 scope of the current document. 1618 It might seem attractive to provide a signature over some of the 1619 information present in the Via header field value(s). For example, 1620 without a signature over the sent-by field of the topmost Via header 1621 field, an attacker could remove that Via header field and insert its 1622 own in a cut-and-paste attack, which would cause all responses to the 1623 request to be routed to a host of the attacker's choosing. However, 1624 a signature over the topmost Via header field does not prevent 1625 attacks of this nature, since the attacker could leave the topmost 1626 Via intact and merely insert a new Via header field directly after 1627 it, which would cause responses to be routed to the attacker's host 1628 "on their way" to the valid host, which has exactly the same end 1629 result. Although it is possible that an intermediary-based 1630 authentication service could guarantee that no Via hops are inserted 1631 between the sending user agent and the authentication service, it 1632 could not prevent an attacker from adding a Via hop after the 1633 authentication service, and thereby preempting responses. It is 1634 necessary for the proper operation of SIP for subsequent 1635 intermediaries to be capable of inserting such Via header fields, and 1636 thus it cannot be prevented. As such, though it is desirable, 1637 securing Via is not possible through the sort of identity mechanism 1638 described in this document; the best known practice for securing Via 1639 is the use of SIPS. 1641 12.3. Malicious Removal of Identity Headers 1643 In the end analysis, the Identity header field cannot protect itself. 1644 Any attacker could remove the header field from a SIP request, and 1645 modify the request arbitrarily afterwards. However, this mechanism 1646 is not intended to protect requests from men-in-the-middle who 1647 interfere with SIP messages; it is intended only to provide a way 1648 that the originators of SIP requests can prove that they are who they 1649 claim to be. At best, by stripping identity information from a 1650 request, a man-in-the-middle could make it impossible to distinguish 1651 any illegitimate messages he would like to send from those messages 1652 sent by an authorized user. However, it requires a considerably 1653 greater amount of energy to mount such an attack than it does to 1654 mount trivial impersonations by just copying someone else's From 1655 header field. This mechanism provides a way that an authorized user 1656 can provide a definitive assurance of his identity that an 1657 unauthorized user, an impersonator, cannot. 1659 12.4. Securing the Connection to the Authentication Service 1661 In the absence of user agent-based authentication services, the 1662 assurance provided by this mechanism is strongest when a user agent 1663 forms a direct connection, preferably one secured by TLS, to an 1664 intermediary-based authentication service. The reasons for this are 1665 twofold: 1667 If a user does not receive a certificate from the authentication 1668 service over the TLS connection that corresponds to the expected 1669 domain (especially when the user receives a challenge via a 1670 mechanism such as Digest), then it is possible that a rogue server 1671 is attempting to pose as an authentication service for a domain 1672 that it does not control, possibly in an attempt to collect shared 1673 secrets for that domain. A similar practice could be used for 1674 telephone numbers, though the application of certificates for 1675 telephone numbers to TLS is left as a matter for future study. 1677 Without TLS, the various header field values and the body of the 1678 request will not have integrity protection when the request 1679 arrives at an authentication service. Accordingly, a prior 1680 legitimate or illegitimate intermediary could modify the message 1681 arbitrarily. 1683 Of these two concerns, the first is most material to the intended 1684 scope of this mechanism. This mechanism is intended to prevent 1685 impersonation attacks, not man-in-the-middle attacks; integrity over 1686 parts of the header and body is provided by this mechanism only to 1687 prevent replay attacks. However, it is possible that applications 1688 relying on the presence of the Identity header field could leverage 1689 this integrity protection for services other than replay protection. 1691 Accordingly, direct TLS connections SHOULD be used between the UAC 1692 and the authentication service whenever possible. The opportunistic 1693 nature of this mechanism, however, makes it very difficult to 1694 constrain UAC behavior, and moreover there will be some deployment 1695 architectures where a direct connection is simply infeasible and the 1696 UAC cannot act as an authentication service itself. Accordingly, 1697 when a direct connection and TLS are not possible, a UAC should use 1698 the SIPS mechanism, Digest 'auth-int' for body integrity, or both 1699 when it can. The ultimate decision to add an Identity header field 1700 to a request lies with the authentication service, of course; domain 1701 policy must identify those cases where the UAC's security association 1702 with the authentication service is too weak. 1704 12.5. Authorization and Transitional Strategies 1706 Ultimately, the worth of an assurance provided by an Identity header 1707 field is limited by the security practices of the authentication 1708 service that issues the assurance. Relying on an Identity header 1709 field generated by a remote administrative domain assumes that the 1710 issuing domain uses recommended administrative practices to 1711 authenticate its users. However, it is possible that some 1712 authentication services will implement policies that effectively make 1713 users unaccountable (e.g., ones that accept unauthenticated 1714 registrations from arbitrary users). The value of an Identity header 1715 field from such authentication services is questionable. While there 1716 is no magic way for a verifier to distinguish "good" from "bad" 1717 signers by inspecting a SIP request, it is expected that further work 1718 in authorization practices could be built on top of this identity 1719 solution; without such an identity solution, many promising 1720 approaches to authorization policy are impossible. That much said, 1721 it is RECOMMENDED that authentication services based on proxy servers 1722 employ strong authentication practices. 1724 One cannot expect the Identity header field to be supported by every 1725 SIP entity overnight. This leaves the verifier in a compromising 1726 position; when it receives a request from a given SIP user, how can 1727 it know whether or not the originator's domain supports Identity? In 1728 the absence of ubiquitous support for identity, some transitional 1729 strategies are necessary. 1731 A verifier could remember when it receives a request from a domain 1732 or telephone number that uses Identity, and in the future, view 1733 messages received from that source without an Identity header 1734 field with skepticism. 1736 A verifier could consult some sort of directory that indicates 1737 whether a given caller should have a signed identity. There are a 1738 number of potential ways in which this could be implemented. This 1739 is left as a subject for future work. 1741 In the long term, some sort of identity mechanism, either the one 1742 documented in this specification or a successor, must become 1743 mandatory-to-use for the SIP protocol; that is the only way to 1744 guarantee that this protection can always be expected by verifiers. 1746 Finally, it is worth noting that the presence or absence of the 1747 Identity header fields cannot be the sole factor in making an 1748 authorization decision. Permissions might be granted to a message on 1749 the basis of the specific verified Identity or really on any other 1750 aspect of a SIP request. Authorization policies are outside the 1751 scope of this specification, but this specification advises any 1752 future authorization work not to assume that messages with valid 1753 Identity header fields are always good. 1755 12.6. Display-Names and Identity 1757 As a matter of interface design, SIP user agents might render the 1758 display-name portion of the From header field of a caller as the 1759 identity of the caller; there is a significant precedent in email 1760 user interfaces for this practice. Securing the display-name 1761 component of the From header field value is outside the scope of this 1762 document, but may be the subject of future work, such as through the 1763 "ppt" name mechanism. 1765 In the absence of signing the display-name, authentication services 1766 might check and validate it, and compare it to a list of acceptable 1767 display-names that may be used by the originator; if the display-name 1768 does not meet policy constraints, the authentication service could 1769 return a 403 response code. In this case, the reason phrase should 1770 indicate the nature of the problem; for example, "Inappropriate 1771 Display Name". However, the display-name is not always present, and 1772 in many environments the requisite operational procedures for 1773 display-name validation may not exist, so no normative guidance is 1774 given here. 1776 13. IANA Considerations 1778 This document contains a number of actions for IANA. 1780 13.1. SIP Header Fields 1782 The Identity-Info header in the SIP Header Fields registry should be 1783 marked as deprecated by [RFCThis]. 1785 Also, the Identity-Info header reserved the compact form "n" at its 1786 time of registration. Please remove that compact form from the 1787 registry. The Identity header however retains the compact form "y" 1788 reserved by RFC4474. 1790 13.2. SIP Response Codes 1792 The Reason phrase for the 436 response default reason phrase should 1793 be changed from "Bad Identity-Info" to "Bad Identity Info" in the SIP 1794 Response Code registry. 1796 The 437 "Unsupported Certificate" default reason phrase should be 1797 changed to "Unsupported Credential". 1799 13.3. Identity-Info Parameters 1801 The IANA manages a registry for Identity-Info parameters. The 1802 specification asks the IANA to change the name of this registry to 1803 "Identity Parameters". 1805 The "alg" parameter entry in the registry should be updated to 1806 reference [RFCThis] as its specification. 1808 This specification defines one new value for the registry: "info" as 1809 defined in this specification in Section 7.3. 1811 13.4. Identity-Info Algorithm Parameter Values 1813 This IANA manages an Identity-Info Algorithm Parameter Values 1814 registry which this specification deprecates. We request that the 1815 IANA delete this registry. Since the algorithms for signing 1816 PASSporTs are defined in [I-D.ietf-stir-passport] rather than in this 1817 specification, there is no longer a need for an algorithm parameter 1818 registry for the Identity header field. 1820 14. Acknowledgments 1822 The authors would like to thank Jim Schaad, Ning Zhang, Syed Ali, 1823 Olle Jacobson, Dave Frankel, Robert Sparks, Dave Crocker, Stephen 1824 Kent, Brian Rosen, Alex Bobotek, Paul Kyzviat, Jonathan Lennox, 1825 Richard Shockey, Martin Dolly, Andrew Allen, Hadriel Kaplan, Sanjay 1826 Mishra, Anton Baskov, Pierce Gorman, David Schwartz, Eric Burger, 1827 Alan Ford, Christer Holmberg, Philippe Fouquart, Michael Hamer, 1828 Henning Schulzrinne, and Richard Barnes for their comments. 1830 15. Changes from RFC4474 1832 The following are salient changes from the original RFC 4474: 1834 Generalized the credential mechanism; credential enrollment, 1835 acquisition and trust is now outside the scope of this document 1837 Reduced the scope of the Identity signature to remove CSeq, Call- 1838 ID, Contact, and the message body; signing of key fingerprints in 1839 SDP is now included 1841 Deprecated the Identity-Info header field and relocated its 1842 components into parameters of the Identity header field (which 1843 obsoletes the previous version of the header field) 1845 The Identity header field can now appear multiple times in one 1846 request 1847 Replaced previous signed-identity-digest format with PASSporT 1848 (signing algorithms now defined in a separate specification) 1850 Revised status code descriptions 1852 16. References 1854 16.1. Normative References 1856 [E.164] ITU-T, "The international public telecommunication 1857 numbering plan", E 164, February 2005, 1858 . 1860 [I-D.ietf-stir-passport] 1861 Wendt, C. and J. Peterson, "Personal Assertion Token 1862 (PASSporT)", draft-ietf-stir-passport-09 (work in 1863 progress), October 2016. 1865 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1866 Requirement Levels", BCP 14, RFC 2119, 1867 DOI 10.17487/RFC2119, March 1997, 1868 . 1870 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1871 A., Peterson, J., Sparks, R., Handley, M., and E. 1872 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1873 DOI 10.17487/RFC3261, June 2002, 1874 . 1876 [RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation 1877 Protocol (SIP): Locating SIP Servers", RFC 3263, 1878 DOI 10.17487/RFC3263, June 2002, 1879 . 1881 [RFC3966] Schulzrinne, H., "The tel URI for Telephone Numbers", 1882 RFC 3966, DOI 10.17487/RFC3966, December 2004, 1883 . 1885 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1886 Resource Identifier (URI): Generic Syntax", STD 66, 1887 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1888 . 1890 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1891 Housley, R., and W. Polk, "Internet X.509 Public Key 1892 Infrastructure Certificate and Certificate Revocation List 1893 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 1894 . 1896 [RFC5922] Gurbani, V., Lawrence, S., and A. Jeffrey, "Domain 1897 Certificates in the Session Initiation Protocol (SIP)", 1898 RFC 5922, DOI 10.17487/RFC5922, June 2010, 1899 . 1901 16.2. Informative References 1903 [I-D.ietf-iri-comparison] 1904 Masinter, L. and M. DĂźrst, "Comparison, 1905 Equivalence and Canonicalization of Internationalized 1906 Resource Identifiers", draft-ietf-iri-comparison-02 (work 1907 in progress), October 2012. 1909 [I-D.ietf-stir-certificates] 1910 Peterson, J. and S. Turner, "Secure Telephone Identity 1911 Credentials: Certificates", draft-ietf-stir- 1912 certificates-10 (work in progress), October 2016. 1914 [I-D.kaplan-stir-cider] 1915 Kaplan, H., "A proposal for Caller Identity in a DNS-based 1916 Entrusted Registry (CIDER)", draft-kaplan-stir-cider-00 1917 (work in progress), July 2013. 1919 [I-D.peterson-sipping-retarget] 1920 Peterson, J., "Retargeting and Security in SIP: A 1921 Framework and Requirements", draft-peterson-sipping- 1922 retarget-00 (work in progress), February 2005. 1924 [I-D.rosenberg-sip-rfc4474-concerns] 1925 Rosenberg, J., "Concerns around the Applicability of RFC 1926 4474", draft-rosenberg-sip-rfc4474-concerns-00 (work in 1927 progress), February 2008. 1929 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 1930 Infrastructure Operational Protocols: FTP and HTTP", 1931 RFC 2585, DOI 10.17487/RFC2585, May 1999, 1932 . 1934 [RFC3323] Peterson, J., "A Privacy Mechanism for the Session 1935 Initiation Protocol (SIP)", RFC 3323, 1936 DOI 10.17487/RFC3323, November 2002, 1937 . 1939 [RFC3325] Jennings, C., Peterson, J., and M. Watson, "Private 1940 Extensions to the Session Initiation Protocol (SIP) for 1941 Asserted Identity within Trusted Networks", RFC 3325, 1942 DOI 10.17487/RFC3325, November 2002, 1943 . 1945 [RFC3893] Peterson, J., "Session Initiation Protocol (SIP) 1946 Authenticated Identity Body (AIB) Format", RFC 3893, 1947 DOI 10.17487/RFC3893, September 2004, 1948 . 1950 [RFC4474] Peterson, J. and C. Jennings, "Enhancements for 1951 Authenticated Identity Management in the Session 1952 Initiation Protocol (SIP)", RFC 4474, 1953 DOI 10.17487/RFC4474, August 2006, 1954 . 1956 [RFC4501] Josefsson, S., "Domain Name System Uniform Resource 1957 Identifiers", RFC 4501, DOI 10.17487/RFC4501, May 2006, 1958 . 1960 [RFC4916] Elwell, J., "Connected Identity in the Session Initiation 1961 Protocol (SIP)", RFC 4916, DOI 10.17487/RFC4916, June 1962 2007, . 1964 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1965 Specifications: ABNF", STD 68, RFC 5234, 1966 DOI 10.17487/RFC5234, January 2008, 1967 . 1969 [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework 1970 for Establishing a Secure Real-time Transport Protocol 1971 (SRTP) Security Context Using Datagram Transport Layer 1972 Security (DTLS)", RFC 5763, DOI 10.17487/RFC5763, May 1973 2010, . 1975 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 1976 of Named Entities (DANE) Transport Layer Security (TLS) 1977 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 1978 2012, . 1980 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1981 Morris, J., Hansen, M., and R. Smith, "Privacy 1982 Considerations for Internet Protocols", RFC 6973, 1983 DOI 10.17487/RFC6973, July 2013, 1984 . 1986 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 1987 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 1988 2014, . 1990 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 1991 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 1992 2014, . 1994 [RFC7340] Peterson, J., Schulzrinne, H., and H. Tschofenig, "Secure 1995 Telephone Identity Problem Statement and Requirements", 1996 RFC 7340, DOI 10.17487/RFC7340, September 2014, 1997 . 1999 [RFC7375] Peterson, J., "Secure Telephone Identity Threat Model", 2000 RFC 7375, DOI 10.17487/RFC7375, October 2014, 2001 . 2003 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 2004 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 2005 2015, . 2007 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 2008 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 2009 . 2011 Authors' Addresses 2013 Jon Peterson 2014 Neustar, Inc. 2015 1800 Sutter St Suite 570 2016 Concord, CA 94520 2017 US 2019 Email: jon.peterson@neustar.biz 2021 Cullen Jennings 2022 Cisco 2023 400 3rd Avenue SW, Suite 350 2024 Calgary, AB T2P 4H2 2025 Canada 2027 Email: fluffy@cisco.com 2029 Eric Rescorla 2030 RTFM, Inc. 2031 2064 Edgewood Drive 2032 Palo Alto, CA 94303 2033 USA 2035 Email: ekr@rtfm.com 2036 Chris Wendt 2037 Comcast 2038 One Comcast Center 2039 Philadelphia, PA 19103 2040 USA 2042 Email: chris-ietf@chriswendt.net