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