idnits 2.17.1 draft-ietf-stir-rfc4474bis-13.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 (September 29, 2016) is 2766 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 1772, but not defined == Outdated reference: A later version (-11) exists of draft-ietf-stir-passport-07 == Outdated reference: A later version (-18) exists of draft-ietf-stir-certificates-08 -- 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 2, 2017 E. Rescorla 7 RTFM, Inc. 8 C. Wendt 9 Comcast 10 September 29, 2016 12 Authenticated Identity Management in the Session Initiation Protocol 13 (SIP) 14 draft-ietf-stir-rfc4474bis-13.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 2, 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.pkx" } 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 4.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 5. 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 6. 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 6. 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 5. 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 object's 676 headers and claims is usually redundant with information already 677 carried elsewhere in the SIP request. Using the compact form can 678 significantly reduce SIP message size, especially when the PASSporT 679 object contains media keys. The syntax of the compact form is given 680 in [I-D.ietf-stir-passport] Section 6; essentially, it contains a 681 base64 encoding of the JSON header and payload in the PASSporT 682 object. 684 Note that per the behavior specified in [I-D.ietf-stir-passport], use 685 of the full form is mandatory when optional extensions are included. 686 See Section 9. 688 6.1.1. Handling Repairable Errors 690 Also, in some cases, a request signed by an authentication service 691 will be rejected by the verification service on the receiving side, 692 and the authentication service will receive a SIP 4xx status code in 693 the backwards direction, such as a 438 indicating a verification 694 failure. If the authentication service did not originally send the 695 full form of the PASSporT object in the Identity header field, it 696 SHOULD retry the request with the full form after receiving a 438 697 response; however implementations SHOULD NOT retry the request more 698 than once. The information in the full form is useful on the 699 verification side for debugging errors, and there are some known 700 causes of verification failures (such as the Date header field value 701 changing in transit, see Section 12.1 for more information) that can 702 be resolved by the inclusion of the full form of PASSporT. 704 Finally, the authentication service forwards the message normally. 706 6.2. Verifier Behavior 708 This document specifies a logical role for SIP entities called a 709 verification service, or verifier. When a verifier receives a SIP 710 message containing one or more Identity header fields, it inspects 711 the signature(s) to verify the identity of the originator of the 712 message. The results of a verification are provided as input to an 713 authorization process that is outside the scope of this document. 715 A SIP request may contain zero, one, or more Identity header fields. 716 A verification service performs the steps below on each Identity 717 header field that appears in a request. If the verifier does not 718 support an Identity header field "ppt" parameter which is present, or 719 if no Identity header field is present at all, and the presence of an 720 Identity header field is required by local policy (for example, based 721 on a per-sending-domain policy, or a per-sending-user policy), then a 722 428 'Use Identity Header' response MUST be sent in the backwards 723 direction. For more on this and other verifier responses, see 724 Section 6.2.2. 726 In order to verify an Identity header field in a message, an entity 727 acting as a verifier MUST perform the following steps, in the order 728 here specified. Note that when an Identity header field contains a 729 full form PASSporT object, the verifier MUST follow the additional 730 procedures in Section 6.2.3. 732 Step 1: Check for an Unsupported "ppt" 734 The verifier MUST inspect any optional "ppt" parameter appearing in 735 the Identity request. If no "ppt" parameter is present, then the 736 verifier proceeds normally below. If a "ppt" parameter value is 737 present, and the verifier does not support it, it MUST ignore the 738 Identity header field. If a supported "ppt" parameter value is 739 present, the verifier proceeds with Step 2, and will ultimately 740 follow the "ppt" variations described in Step 5. 742 Step 2: Determine the Originator's Identity 744 In order to determine whether the signature for the identity field 745 should be over the entire identity field URI or just a telephone 746 number, the verification service MUST follow the process described in 747 Section 8.1. That section will either lead to the telephone number 748 canonicalization procedures in Section 8.3 for telephone numbers, or 749 to the URI normalization procedures described in Section 8.5 for 750 domain names. 752 Step 3: Identify Credential for Validation 754 The verifier must ensure that it possesses the proper keying material 755 to validate the signature in the Identity header field, which usually 756 involves dereferencing a URI in the "info" parameter of the Identity 757 header field. See Section 7.2 for more information on these 758 procedures. If the verifier does not support the credential 759 described in the "info" parameter, then it treats the credential for 760 this header field as unsupported. 762 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 is later but within 771 verification service policy for freshness, the verification service 772 SHOULD perform the computation required by Step 5 using the "iat" 773 value instead of the Date header field value. 775 Step 5: Validate the Signature 777 The verifier MUST validate the signature in the Identity header field 778 over the PASSporT object. For baseline PASSporT objects (with no 779 Identity header field "ppt" parameter) the verifier MUST follow the 780 procedures for generating the signature over a PASSporT object 781 described in Section 4. If a "ppt" parameter is present (and per 782 Step 1, is supported), the verifier follows the procedures for that 783 "ppt" (see Section 9). If a verifier determines that the that the 784 signature in the Identity does not correspond to the reconstructed 785 signed-identity-digest, then the Identity header field should be 786 considered invalid. 788 6.2.1. Authorization of Requests 790 The verification of an Identity header field does not entail any 791 particular treatment of the request. The handling of the message 792 after the verification process depends on how the verification 793 service is implemented and on local policy. This specification does 794 not propose any authorization policy for user agents or proxy servers 795 to follow based on the presence of a valid Identity header field, the 796 presence of an invalid Identity header field, or the absence of an 797 Identity header field, or a stale Date header field value, but it is 798 anticipated that local policies could involve making different 799 forwarding decisions in intermediary implementations, or changing how 800 the user is alerted, or how identity is rendered, in user agent 801 implementations. 803 The presence of multiple Identity header fields within a message 804 raises the prospect that a verification services could receive a 805 message containing some valid and some invalid Identity header 806 fields. As a guideline, this specification recommends that only if a 807 verifier determines all Identity header fields within a message are 808 invalid should the request be considered to have an invalid identity. 809 If at least one Identity header field value is valid and from a 810 trusted source, then relying parties can use that header for 811 authorization decisions regardless of whether other untrusted or 812 invalid Identity headers appear in a request. 814 6.2.2. Failure Response Codes Sent by a Verification Service 816 RFC4474 originally defined four response codes for failure conditions 817 specific to the Identity header field and its original mechanism. 818 These status codes are retained in this specification, with some 819 slight modifications. Also, this specification details responding 820 with 403 when a stale Date header field value is received. 822 A 428 response will be sent (per Section 6.2) when an Identity header 823 field is required, but no Identity header field without a "ppt" 824 parameter, or with a supported "ppt" value, has been received. In 825 the case where one or more Identity header fields with unsupported 826 "ppt" values have been received, then a verification service may send 827 a 428 with the special reason phrase "Use Supported PASSporT Format". 828 Note however that this specification gives no guidance on how a 829 verification service might decide to require an Identity header field 830 for a particular SIP request. Such authorization policies are 831 outside the scope of this specification. 833 The 436 'Bad Identity Info' response code indicates an inability to 834 acquire the credentials needed by the verification service for 835 validating the signature in an Identity header field. Again, given 836 the potential presence of multiple Identity header fields, this 837 response code should only be sent when the verification service is 838 unable to deference the URIs and/or acquire the credentials 839 associated with all Identity header fields in the request. This 840 failure code could be repairable if the authentication service 841 resends the request with an 'info' parameter pointing to a credential 842 that the verification service can access. 844 The 437 'Unsupported Credential' is sent when a verification service 845 can acquire, or already holds, the credential represented by the 846 'info' parameter of at least one Identity header field in the 847 request, but does not support said credential(s), for reasons such as 848 failing to trust the issuing CA, or failing to support the algorithm 849 with which the credential was signed. 851 The 438 'Invalid Identity Header' response indicates that of the set 852 of Identity header fields in a request, no header field with a valid 853 and supported PASSporT object has been received. Like the 428 854 response, this is sent by a verification service when its local 855 policy dictates that a broken signature in an Identity header field 856 is grounds for rejecting a request. Note that in some cases, an 857 Identity header field may be broken for other reasons than that an 858 originator is attempting to spoof an identity: for example, when a 859 transit network alters the Date header field of the request. Sending 860 a full form PASSporT can repair some of these conditions (see 861 Section 6.2.3), so the recommended way to attempt to repair this 862 failure is to retry the request with the full form of PASSporT if it 863 had originally been sent with the compact form. The alternative 864 reason phrase 'Invalid PASSporT' SHOULD be used when an extended full 865 form PASSporT lacks required headers or claims, or when an extended 866 full form PASSporT signaled with the "ppt" parameter lacks required 867 claims for that extension. 869 Finally, a 403 response with the special reason phrase 'Stale Date" 870 may be sent when the verification service receives a request with a 871 Date header field value that is older than the local policy for 872 freshness permits. The same response may be used when the "iat" in 873 the full form of a PASSporT has a value older than the local policy 874 for freshness permits. 876 6.2.3. Handling the full form of PASSporT 878 If the full form of PASSporT is present in an Identity header, this 879 permits the use of optional extensions as described in 880 [I-D.ietf-stir-passport] Section 7.3. The verification service can 881 extract from the "orig" element" a canonical telephone number created 882 by the authentication service, as well as an "iat" claim 883 corresponding to the Date header field that the authentication 884 service used. These may be used to debug canonicalization problems, 885 or to avoid unnecessary signature breakage caused by intermediaries 886 that alter the Date header field value in transit. 888 As an optimization, when the full form is present, the verification 889 service MAY compute its own canonicalization of an originating 890 telephone number and compare it to the values in the "orig" element 891 of PASSporT before performing any cryptographic functions in order to 892 ascertain whether or not the two ends agree on the canonical number 893 form. 895 7. Credentials 897 This section gives general guidance on the use of credential systems 898 by authentication and verification services, as well as requirements 899 that must be met by credential systems that conform with this 900 architecture. It does not mandate any specific credential system. 902 Furthermore, this specification allows either a user agent or a proxy 903 server to provide the authentication service function and/or the 904 verification service function. For the purposes of end-to-end 905 security, it is obviously preferable for end systems to acquire their 906 own credentials; in this case user agents can act as authentication 907 services. However, for some deployments, end-user credentials may be 908 neither practical nor affordable, given the potentially large number 909 of SIP user agents (phones, PCs, laptops, PDAs, gaming devices) that 910 may be employed by a single user. Synchronizing keying material 911 across multiple devices may be prohibitively complex and require 912 quite a good deal of additional endpoint behavior. Managing several 913 credentials for the various devices could also be burdensome. Thus, 914 for reasons of credential management alone, implementing the 915 authentication service at an intermediary may be more practical. 916 This trade-off needs to be understood by implementers of this 917 specification. 919 7.1. Credential Use by the Authentication Service 921 In order to act as an authentication service, a SIP entity must have 922 access to the private keying material of one or more credentials that 923 cover domain names or telephone numbers. These credentials may 924 represent authority over one domain (such as example.com) or a set of 925 domains enumerated by the credential. Similarly, a credential may 926 represent authority over a single telephone number or a range of 927 telephone numbers. The way that the scope of a credential's 928 authority is expressed is specific to the credential mechanism. 930 Authorization of the use of a particular username or telephone number 931 in the From header field value is a matter of local policy for the 932 authentication service, one that depends greatly on the manner in 933 which authentication is performed. For non-telephone number user 934 parts, one policy might be as follows: the username given in the 935 'username' parameter of the Proxy-Authorization header field MUST 936 correspond exactly to the username in the From header field of the 937 SIP message. However, there are many cases in which this is too 938 limiting or inappropriate; a realm might use 'username' parameters in 939 Proxy-Authorization header field that do not correspond to the user- 940 portion of From header fields, or a user might manage multiple 941 accounts in the same administrative domain. In this latter case, a 942 domain might maintain a mapping between the values in the 'username' 943 parameter of the Proxy-Authorization header field and a set of one or 944 more SIP URIs that might legitimately be asserted for that 945 'username'. For example, the username can correspond to the 'private 946 identity' as defined in Third Generation Partnership Project (3GPP), 947 in which case the From header field can contain any one of the public 948 identities associated with this private identity. In this instance, 949 another policy might be as follows: the URI in the From header field 950 MUST correspond exactly to one of the mapped URIs associated with the 951 'username' given in the Proxy-Authorization header field. This is a 952 suitable approach for telephone numbers in particular. 954 This specification could also be used with credentials that cover a 955 single name or URI, such as alice@example.com or 956 sip:alice@example.com. This would require a modification to 957 authentication service behavior to operate on a whole URI rather than 958 a domain name. Because this is not believed to be a pressing use 959 case, this is deferred to future work, but implementers should note 960 this as a possible future direction. 962 Exceptions to such authentication service policies arise for cases 963 like anonymity; if the AoR asserted in the From header field uses a 964 form like 'sip:anonymous@example.com' (see [RFC3323]), then the 965 'example.com' proxy might authenticate only that the user is a valid 966 user in the domain and insert the signature over the From header 967 field as usual. 969 7.2. Credential Use by the Verification Service 971 In order to act as a verification service, a SIP entity must have a 972 way to acquire and retain credentials for authorities over particular 973 domain names, telephone numbers and/or number ranges. Dereferencing 974 the URI found in the "info" parameter of the Identity header field 975 (as described Section 7.3) MUST be supported by all verification 976 service implementations to create a baseline means of credential 977 acquisition. Provided that the credential used to sign a message is 978 not previously known to the verifier, SIP entities SHOULD discover 979 this credential by dereferencing the "info" parameter, unless they 980 have some implementation-specific way of acquiring the needed keying 981 material, such as an offline store of periodically-updated 982 credentials. The 436 'Bad Identity Info' response exists for cases 983 where the verification service cannot deference the URI in the "info" 984 parameter. 986 This specification does not propose any particular policy for a 987 verification service to determine whether or not the holder of a 988 credential is the appropriate party to sign for a given SIP identity. 989 Guidance on this is deferred to credential mechanism specifications. 991 Verification service implementations supporting this specification 992 may wish to have some means of retaining credentials (in accordance 993 with normal practices for credential lifetimes and revocation) in 994 order to prevent themselves from needlessly downloading the same 995 credential every time a request from the same identity is received. 996 Credentials cached in this manner may be indexed in accordance with 997 local policy: for example, by their scope of authority, or the URI 998 given in the "info" parameter value. Further consideration of how to 999 cache credentials is deferred to the credential mechanism 1000 specifications. 1002 7.3. 'info' parameter URIs 1004 An "info" parameter MUST contain a URI which dereferences to a 1005 resource that contains the public key components of the credential 1006 used by the authentication service to sign a request. It is 1007 essential that a URI in the "info" parameter be dereferencable by any 1008 entity that could plausibly receive the request. For common cases, 1009 this means that the URI SHOULD be dereferencable by any entity on the 1010 public Internet. In constrained deployment environments, a service 1011 private to the environment MAY be used instead. 1013 Beyond providing a means of accessing credentials for an identity, 1014 the "info" parameter further serves as a means of differentiating 1015 which particular credential was used to sign a request, when there 1016 are potentially multiple authorities eligible to sign. For example, 1017 imagine a case where a domain implements the authentication service 1018 role for a range of telephone numbers and a user agent belonging to 1019 Alice has acquired a credential for a single telephone number within 1020 that range. Either would be eligible to sign a SIP request for the 1021 number in question. Verification services however need a means to 1022 differentiate which one performed the signature. The "info" 1023 parameter performs that function. 1025 7.4. Credential System Requirements 1027 This document makes no recommendation for the use of any specific 1028 credential system. Today, there are two primary credential systems 1029 in place for proving ownership of domain names: certificates (e.g., 1030 X.509 v3, see [RFC5280]) and the domain name system itself (e.g., 1031 DANE, see [RFC6698]). It is envisioned that either could be used in 1032 the SIP identity context: an "info" parameter could for example give 1033 an HTTP URL of the Content-Type 'application/pkix-cert' pointing to a 1034 certificate (following the conventions of [RFC2585]). The "info" 1035 parameter might use the DNS URL scheme (see [RFC4501]) to designate 1036 keys in the DNS. 1038 While no comparable public credentials exist for telephone numbers, 1039 either approach could be applied to telephone numbers. A credential 1040 system based on certificates is given in 1041 [I-D.ietf-stir-certificates], but this specification can work with 1042 other credential systems; for example, using the DNS was proposed in 1043 [I-D.kaplan-stir-cider]. 1045 In order for a credential system to work with this mechanism, its 1046 specification must detail: 1048 which URIs schemes the credential will use in the "info" 1049 parameter, and any special procedures required to dereference the 1050 URIs 1052 how the verifier can learn the scope of the credential 1054 any special procedures required to extract keying material from 1055 the resources designated by the URI 1057 any algorithms required to validate the credentials (e.g. for 1058 certificates, any algorithms used by certificate authorities to 1059 sign certificates themselves), and 1061 how the associated credentials will support the mandatory signing 1062 algorithm(s) required by PASSporT [I-D.ietf-stir-passport]. 1064 SIP entities cannot reliably predict where SIP requests will 1065 terminate. When choosing a credential scheme for deployments of this 1066 specification, it is therefore essential that the trust anchor(s) for 1067 credentials be widely trusted, or that deployments restrict the use 1068 of this mechanism to environments where the reliance on particular 1069 trust anchors is assured by business arrangements or similar 1070 constraints. 1072 Note that credential systems must address key lifecycle management 1073 concerns: were a domain to change the credential available at the 1074 Identity header field "info" parameter URI before a verifier 1075 evaluates a request signed by an authentication service, this would 1076 cause obvious verifier failures. When a rollover occurs, 1077 authentication services SHOULD thus provide new "info" URIs for each 1078 new credential, and SHOULD continue to make older key acquisition 1079 URIs available for a duration longer than the plausible lifetime of a 1080 SIP transaction (a minute would most likely suffice). 1082 8. Identity Types 1084 The problem statement of STIR [RFC7340] focuses primarily on cases 1085 where the called and calling parties identified in the To and From 1086 header field values use telephone numbers, as this remains the 1087 dominant use case in the deployment of SIP. However, the Identity 1088 header mechanism also works with SIP URIs without telephone numbers 1089 (of the form "sip:user@host"), and potentially other identifiers when 1090 SIP interworks with other protocols. 1092 Authentication services vet the identity of the originator of a call, 1093 which is typically found in the From header field value. The 1094 guidance in this specification also applies to extracting the URI 1095 containing the originator's identity from the P-Asserted-Identity 1096 header field value instead of the From header field value. In some 1097 trusted environments, the P-Asserted-Identity header field is used in 1098 lieu of the From header field to convey the address-of-record or 1099 telephone number of the originator of a request; where it does, local 1100 policy might therefore dictate that the canonical identity derives 1101 from the P-Asserted-Identity header field rather than the From header 1102 field. 1104 Ultimately, in any case where local policy canonicalizes the identity 1105 into a form different from how it appears in the From header field, 1106 the use of the full form of PASSporT by authentication services is 1107 RECOMMENDED, but because the "orig" claim of PASSporT could itself 1108 could then divulge information about users or networks, implementers 1109 should be mindful of the guidelines in Section 11. 1111 8.1. Differentiating Telephone Numbers from URIs 1113 It may not be trivial to tell if a given URI contains a telephone 1114 number. In order to determine whether or not the user portion of a 1115 SIP URI is a telephone number, authentication services and 1116 verification services MUST perform the following procedure on any SIP 1117 URI they inspect which contains a numeric user part. Note that the 1118 same procedures are followed for creating the canonical form of URIs 1119 found in the From header field as they are in the To header field or 1120 the P-Asserted-Identity header field. 1122 First, implementations must look for obvious indications that the 1123 user-portion of the URI constitutes a telephone number. Telephone 1124 numbers most commonly appear in SIP header field values in the 1125 username portion of a SIP URI (e.g., 1126 'sip:+17005551008@chicago.example.com;user=phone'). The user part of 1127 that URI conforms to the syntax of the TEL URI scheme (RFC 3966 1128 [RFC3966]). It is also possible for a TEL URI to appear in the SIP 1129 To or From header field outside the context of a SIP or SIPS URI 1130 (e.g., 'tel:+17005551008'). Thus, in some environments, numbers will 1131 be explicitly labeled by the use of TEL URIs or the 'user=phone' 1132 parameter, or implicitly by the presence of the '+' indicator at the 1133 start of the user-portion. Absent these indications, if there are 1134 numbers present in the user-portion, implementations may also detect 1135 that the user-portion of the URI contains a telephone number by 1136 determining whether or not those numbers would be dialable or 1137 routable in the local environment -- bearing in mind that the 1138 telephone number may be a valid [E.164] number, a nationally-specific 1139 number, or even a private branch exchange number. Once a telephone 1140 number has been detected, implementations should follow the 1141 procedures in Section 8.3. 1143 If the URI field does not contain a telephone number, or if the 1144 result of the canonicalization of the From header field value does 1145 not form a valid E.164 telephone number, the authentication service 1146 and/or verification service SHOULD treat the entire URI as a SIP URI, 1147 and apply the procedures in Section 8.5. These URI normalization 1148 procedures are invoked to canonicalize the URI before it is included 1149 in a PASSporT object in, for example, a "uri" claim. See Section 8.5 1150 for that behavior. 1152 8.2. Authority for Telephone Numbers 1154 In order for telephone numbers to be used with the mechanism 1155 described in this document, authentication services must receive 1156 credentials from an authority for telephone numbers or telephone 1157 number ranges, and verification services must trust the authority 1158 employed by the authentication service that signs a request. Per 1159 Section 7.4, enrollment procedures and credential management are 1160 outside the scope of this document; approaches to credential 1161 management for telephone numbers are discussed in 1162 [I-D.ietf-stir-certificates]. 1164 8.3. Telephone Number Canonicalization Procedures 1166 Once an implementation has identified a telephone number, it must 1167 construct a number string. That requires performing the following 1168 steps: 1170 Implementations MUST drop any "+"s, any internal dashes, 1171 parentheses or other non-numeric characters, excepting only the 1172 leading "#" or "*" keys used in some special service numbers 1173 (typically, these will appear only in the To header field value). 1174 This MUST result in an ASCII string limited to "#", "*" and digits 1175 without whitespace or visual separators. 1177 Next, an implementation must assess if the number string is a 1178 valid, globally-routable number with a leading country code. If 1179 not, implementations SHOULD convert the number into E.164 format, 1180 adding a country code if necessary; this may involve transforming 1181 the number from a dial string (see [RFC3966]), removing any 1182 national or international dialing prefixes or performing similar 1183 procedures. It is only in the case that an implementation cannot 1184 determine how to convert the number to a globally-routable format 1185 that this step may be skipped. This will be the case, for 1186 example, for nationally-specific service numbers (e.g. 911, 112); 1187 however, calls to those numbers are routed in a very strict 1188 fashion which ordinarily prevents them from reaching entities that 1189 don't understand the numbers. 1191 Some domains may need to take unique steps to convert their 1192 numbers into a global format, and such transformations during 1193 canonicalization can also be made in accordance with specific 1194 policies used within a local domain. For example, one domain may 1195 only use local number formatting and need to convert all To/From 1196 header field user portions to E.164 by prepending country-code and 1197 region code digits; another domain might have prefixed usernames 1198 with trunk-routing codes, in which case the canonicalization will 1199 need to remove the prefix. This specification cannot anticipate 1200 all of the potential transformations that might be useful. 1202 The resulting canonical number string will be used as input to the 1203 hash calculation during signing and verifying processes. 1205 The ABNF of this number string is: 1207 tn-spec = [ "#" / "*" ] 1*DIGIT 1209 The resulting number string is used in the construction of the 1210 telephone number field(s) in a PASSporT object. 1212 8.4. Authority for Domain Names 1214 To use a SIP URI as an identity in this mechanism requires 1215 authentication and verification systems to support standard 1216 mechanisms for proving authority over a domain name: that is, the 1217 domain name in the host portion of the SIP URI. 1219 A verifier MUST evaluate the correspondence between the user's 1220 identity and the signing credential by following the procedures 1221 defined in [RFC5922], Section 7.2. While [RFC5922] deals with the 1222 use of TLS and is specific to certificates, the procedures described 1223 are applicable to verifying identity if one substitutes the "hostname 1224 of the server" for the domain portion of the user's identity in the 1225 From header field of a SIP request with an Identity header field. 1227 This process is complicated by two deployment realities. In the 1228 first place, credentials have varying ways of describing their 1229 subjects, and may indeed have multiple subjects, especially in 1230 'virtual hosting' cases where multiple domains are managed by a 1231 single application (see [RFC5922] Section 7.8). Secondly, some SIP 1232 services may delegate SIP functions to a subordinate domain and 1233 utilize the procedures in [RFC3263] that allow requests for, say, 1234 'example.com' to be routed to 'sip.example.com'. As a result, a user 1235 with the AoR 'sip:alice@example.com' may process requests through a 1236 host like 'sip.example.com', and it may be that latter host that acts 1237 as an authentication service. 1239 To address the second of these problems, a domain that deploys an 1240 authentication service on a subordinate host MUST be willing to 1241 supply that host with the private keying material associated with a 1242 credential whose subject is a domain name that corresponds to the 1243 domain portion of the AoRs that the domain distributes to users. 1244 Note that this corresponds to the comparable case of routing inbound 1245 SIP requests to a domain. When the NAPTR and SRV procedures of RFC 1246 3263 are used to direct requests to a domain name other than the 1247 domain in the original Request-URI (e.g., for 1248 'sip:alice@example.com', the corresponding SRV records point to the 1249 service 'sip1.example.org'), the client expects that the certificate 1250 passed back in any TLS exchange with that host will correspond 1251 exactly with the domain of the original Request-URI, not the domain 1252 name of the host. Consequently, in order to make inbound routing to 1253 such SIP services work, a domain administrator must similarly be 1254 willing to share the domain's private key with the service. This 1255 design decision was made to compensate for the insecurity of the DNS, 1256 and it makes certain potential approaches to DNS-based 'virtual 1257 hosting' unsecurable for SIP in environments where domain 1258 administrators are unwilling to share keys with hosting services. 1260 8.5. URI Normalization 1262 Just as telephone numbers may undergo a number of syntactic 1263 transformations during transit, the same can happen to SIP and SIPS 1264 URIs without telephone numbers as they traverse certain 1265 intermediaries. Therefore, when generating a PASSporT object based 1266 on a SIP request, any SIP and SIPS URIs must be transformed into a 1267 canonical form which captures the address-of-record represented by 1268 the URI before they are provisioned in PASSporT claims such as "uri". 1269 The URI normalization procedures required are as follows. 1271 Following the ABNF of RFC3261, the SIP or SIPS URI in question MUST 1272 discard all elements after the "hostport" of the URI, including all 1273 uri-parameters and escaped headers, from its syntax. Of the userinfo 1274 component of the SIP URI, only the user element will be retained: any 1275 password (and any leading ":" before the password) MUST be removed, 1276 and since this userinfo necessarily does not contain a telephone- 1277 subscriber component, no further parameters can appear in the user 1278 portion. 1280 The hostport portion of the SIP or SIPS URI MUST similarly be 1281 stripped of any trailing port along with the ":" that proceeds the 1282 port, leaving only the host. 1284 The ABNF of this canonical URI form (following the syntax defined in 1285 RFC3261) is: 1287 canon-uri = ( "sip" / "sips" ) ":" user "@" host 1289 Finally, the URI will be subject to syntax-based URI normalization 1290 procedures of [RFC3986] Section 6.2.2. Implementations MUST perform 1291 case normalization (rendering the scheme, user, and host all 1292 lowercase) and percent-encoding normalization (decoding any percent- 1293 encoded octet that corresponds to an unreserved character, per 1294 [RFC3986] Section 2.3). However, note that normalization procedures 1295 face known challenges in some internationalized environments (see 1296 [I-D.ietf-iri-comparison]) and that perfect normalization of URIs may 1297 not be possible in those environments. 1299 For future PASSporT applications, it may be desirable to provide an 1300 identifier without an attached protocol scheme. Future 1301 specifications that define PASSporT claims for SIP as a using 1302 protocol could use these basic procedures, but eliminate the scheme 1303 component. A more exact definition is left to future specifications. 1305 9. Extensibility 1307 As future requirements may warrant increasing the scope of the 1308 Identity mechanism, this specification specifies an optional "ppt" 1309 parameter of the Identity header field, which mirrors the "ppt" 1310 header in PASSporT. The "ppt" parameter value MUST consist of a 1311 token containing an extension specification, which denotes an 1312 extended set of one or more signed claims per the type extensibility 1313 mechanism specified in [I-D.ietf-stir-passport] Section 7. Note that 1314 per the guidance in that section, "ppt" is used only to enforce a 1315 mandatory extension: optional claims may be added to any PASSporT 1316 object without requiring the use of "ppt", but the compact form of 1317 PASSporT MUST NOT be used when optional claims are present in the 1318 PASSporT payload. 1320 The potential for extensions is one the primary motivations for 1321 allowing the presence of multiple Identity header fields in the same 1322 SIP request. It is envisioned that future extensions might allow for 1323 alternate information to be signed, or to explicitly allow different 1324 parties to provide the signatures than the authorities envisioned by 1325 baseline STIR. A request might, for example, have one Identity added 1326 by an authentication service at the originating administrative 1327 domain, and then another Identity header field added by some further 1328 intermediary using a PASSporT extension. While this specification 1329 does not define any such specific purpose for multiple Identity 1330 header fields, implementations MUST support receiving multiple header 1331 fields for future compatibility reasons. 1333 An authentication service cannot assume that verifiers will 1334 understand any given extension. Verifiers that do support an 1335 extension may then trigger appropriate application-level behavior in 1336 the presence of an extension; authors of extensions should provide 1337 appropriate extension-specific guidance to application developers on 1338 this point. 1340 10. Backwards Compatibility with RFC4474 1342 This specification introduces several significant changes from the 1343 RFC4474 version of the Identity header field. However, due to the 1344 problems enumerated in [I-D.rosenberg-sip-rfc4474-concerns], it is 1345 not believed that the original Identity header field has seen any 1346 deployment, or even implementation in deployed products. 1348 As such, this mechanism contains no provisions for signatures 1349 generated with this specification to work with RFC4474-compliant 1350 implementations, nor any related backwards-compatibility provisions. 1351 Hypothetically, were an RFC4474-compliant implementation to receive 1352 messages containing this revised version of the Identity header 1353 field, it would likely fail the request with a 436 response code due 1354 to the absence of an Identity-Info header field. Implementations of 1355 this specification, for debugging purposes, might interpret a 436 1356 with a reason phrase of "Bad Identity-Info" as an indication that the 1357 request has failed because it reached a (hypothetical) 1358 RFC4474-compliant verification service. 1360 11. Privacy Considerations 1362 The purpose of this mechanism is to provide a reliable identification 1363 of the originator of a SIP request, specifically a cryptographic 1364 assurance that an authority asserts the originator can claim the URI 1365 the identity stipulated in the request. This URI may contain or 1366 imply a variety of personally identifying information, including the 1367 name of a human being, their place of work or service provider, and 1368 possibly further details. The intrinsic privacy risks associated 1369 with that URI are, however, no different from those of baseline SIP. 1370 Per the guidance in [RFC6973], implementers should make users aware 1371 of the privacy trade-off of providing secure identity. 1373 The identity mechanism presented in this document is compatible with 1374 the standard SIP practices for privacy described in [RFC3323]. A SIP 1375 proxy server can act both as a RFC3323 privacy service and as an 1376 authentication service. Since a user agent can provide any From 1377 header field value that the authentication service is willing to 1378 authorize, there is no reason why private SIP URIs that contain 1379 legitimate domains (e.g., sip:anonymous@example.com) cannot be signed 1380 by an authentication service. The construction of the Identity 1381 header field is the same for private URIs as it is for any other sort 1382 of URIs. Similar practices could be used to support opportunistic 1383 signing of SIP requests for UA-integrated authentication services 1384 with self-signed certificates, though that is outside the scope of 1385 this specification and is left as a matter for future investigation. 1387 Note, however, that even when using anonymous SIP URIs, an 1388 authentication service must possess a certificate corresponding to 1389 the host portion of the addr-spec of the From header field value of 1390 the request; accordingly, using domains like 'anonymous.invalid' will 1391 not be usable by privacy services that simultaneously act as 1392 authentication services. The assurance offered by the usage of 1393 anonymous URIs with a valid domain portion is "this is a known user 1394 in my domain that I have authenticated, but I am keeping its identity 1395 private". 1397 It is worth noting two features of this more anonymous form of 1398 identity. One can eliminate any identifying information in a domain 1399 through the use of the domain 'anonymous.invalid," but we must then 1400 acknowledge that it is difficult for a domain to be both anonymous 1401 and authenticated. The use of the "anonymous.invalid" domain entails 1402 that no corresponding authority for the domain can exist, and as a 1403 consequence, authentication service functions for that domain are 1404 meaningless. The second feature is more germane to the threats this 1405 document mitigates [RFC7375]. None of the relevant attacks, all of 1406 which rely on the attacker taking on the identity of a victim or 1407 hiding their identity using someone else's identity, are enabled by 1408 an anonymous identity. As such, the inability to assert an authority 1409 over an anonymous domain is irrelevant to our threat model. 1411 [RFC3325] defines the "id" priv-value token, which is specific to the 1412 P-Asserted-Identity header field. The sort of assertion provided by 1413 the P-Asserted-Identity header field is very different from the 1414 Identity header field presented in this document. It contains 1415 additional information about the originator of a message that may go 1416 beyond what appears in the From header field; P-Asserted-Identity 1417 holds a definitive identity for the originator that is somehow known 1418 to a closed network of intermediaries. Presumably, that network will 1419 use this identity for billing or security purposes. The danger of 1420 this network-specific information leaking outside of the closed 1421 network motivated the "id" priv-value token. The "id" priv-value 1422 token has no implications for the Identity header field, and privacy 1423 services MUST NOT remove the Identity header field when a priv-value 1424 of "id" appears in a Privacy header field. 1426 The full form of the PASSporT object provides the complete JSON 1427 objects used to generate the signed-identity-digest of the Identity 1428 header field value, including the canonicalized form of the telephone 1429 number of the originator of a call, if the signature is over a 1430 telephone number. In some contexts, local policy may require a 1431 canonicalization which differs substantially from the original From 1432 header field. Depending on those policies, potentially the full form 1433 of PASSporT might divulge information about the originating network 1434 or user that might not appear elsewhere in the SIP request. Were it 1435 to be used to reflect the contents of the P-Asserted-Identity header 1436 field, for example, then the object would need to be converted to the 1437 compact form when the P-Asserted-Identity header is removed to avoid 1438 any such leakage outside of a trust domain. Since, in those 1439 contexts, the canonical form of the originator's identity could not 1440 be reassembled by a verifier, and thus the Identity signature 1441 validation process would fail, using P-Asserted-Identity with the 1442 full form of PASSporT in this fashion is NOT RECOMMENDED outside of 1443 environments where SIP requests will never leave the trust domain. 1444 As a side note, history shows that closed networks never stay closed 1445 and one should design their implementation assuming connectivity to 1446 the broader Internet. 1448 Finally, note that unlike [RFC3325], the mechanism described in this 1449 specification adds no information to SIP requests that has privacy 1450 implications - apart from disclosing that an authentication service 1451 is willing to sign for an originator. 1453 12. Security Considerations 1455 This document describes a mechanism that provides a signature over 1456 the Date header field of SIP requests, parts of the To and From 1457 header fields, and when present any media keying material in the 1458 message body. In general, the considerations related to the security 1459 of these header fields are the same as those given in [RFC3261] for 1460 including header fields in tunneled 'message/sip' MIME bodies (see 1461 Section 23 of RFC3261 in particular). The following section details 1462 the individual security properties obtained by including each of 1463 these header fields within the signature; collectively, this set of 1464 header fields provides the necessary properties to prevent 1465 impersonation. It addresses the solution-specific attacks against 1466 in-band solutions enumerated in [RFC7375] Section 4.1. 1468 12.1. Protected Request Fields 1470 The From header field value (in ordinary operations) indicates the 1471 identity of the originator of the message. The SIP address-of-record 1472 URI, or an embedded telephone number, in the From header field is the 1473 identity of a SIP user, for the purposes of this document. Note that 1474 in some deployments the identity of the originator may reside in P- 1475 Asserted-Id instead. The originator's identity is the key piece of 1476 information that this mechanism secures; the remainder of the signed 1477 parts of a SIP request are present to provide reference integrity and 1478 to prevent certain types of cut-and-paste attacks. 1480 The Date header field value protects against cut-and-paste attacks, 1481 as described in [RFC3261], Section 23.4.2. That specification 1482 recommends that implementations notify the user of a potential 1483 security issue if the signed Date header field value is stale by an 1484 hour or more. To prevent cut-and-paste of recently-observed 1485 messages, this specification instead RECOMMENDS a shorter interval of 1486 sixty seconds. Implementations of this specification MUST NOT deem 1487 valid a request with an outdated Date header field. Note that per 1488 [RFC3893] Section 10 behavior, servers can keep state of recently 1489 received requests, and thus if an Identity header field is replayed 1490 by an attacker within the Date interval, verifiers can detect that it 1491 is spoofed because a message with an identical Date from the same 1492 source had recently been received. 1494 It has been observed in the wild that some networks change the Date 1495 header field value of SIP requests in transit, and that alternative 1496 behavior might be necessary to accommodate that use case. 1497 Verification services that observe a signature validation failure MAY 1498 therefore reconstruct the Date header field component of the 1499 signature from the "iat" carried in the full form of PASSporT: 1500 provided that time recorded by "iat" falls within the local policy 1501 for freshness that would ordinarily apply to the Date header, the 1502 verification service MAY treat the signature as valid, provided it 1503 keeps adequate state to detect recent replays. Note that this will 1504 require the inclusion of the full form of the PASSporT object by 1505 authentication services in networks where such failures are observed. 1507 The To header field value provides the identity of the SIP user that 1508 this request originally targeted. Covering the identity in the To 1509 header field with the Identity signature serves two purposes. First, 1510 it prevents cut-and-paste attacks in which an Identity header field 1511 from a legitimate request for one user is cut-and-pasted into a 1512 request for a different user. Second, it preserves the starting URI 1513 scheme of the request, which helps prevent downgrade attacks against 1514 the use of SIPS. The To identity offers additional protection 1515 against cut-and-paste attacks beyond the Date header field. For 1516 example, without a signature over the To identity, an attacker who 1517 receives a call from a target could immediately cut-and-paste the 1518 Identity and From header field value from that INVITE into a new 1519 request to the target's voicemail service within the Date interval, 1520 and the voicemail service would have no way knowing that the Identity 1521 header field it received had been originally signed for a call 1522 intended for a different number. However, note the caveats below in 1523 Section 12.1.1. 1525 When signing a request that contains a fingerprint of keying material 1526 in SDP for DTLS-SRTP [RFC5763], this mechanism always provides a 1527 signature over that fingerprint. This signature prevents certain 1528 classes of impersonation attacks in which an attacker forwards or 1529 cut-and-pastes a legitimate request. Although the target of the 1530 attack may accept the request, the attacker will be unable to 1531 exchange media with the target as they will not possess a key 1532 corresponding to the fingerprint. For example, there are some 1533 baiting attacks, launched with the REFER method or through social 1534 engineering, where the attacker receives a request from the target 1535 and reoriginates it to a third party. These might not be prevented 1536 by only a signature over the From, To and Date, but could be 1537 prevented by securing a fingerprint for DTLS-SRTP. While this is a 1538 different form of impersonation than is commonly used for 1539 robocalling, ultimately there is little purpose in establishing the 1540 identity of the user that originated a SIP request if this assurance 1541 is not coupled with a comparable assurance over the contents of the 1542 subsequent media communication. This signature also, per [RFC7258], 1543 reduces the potential for passive monitoring attacks against the SIP 1544 media. In environments where DTLS-SRTP is unsupported, however, no 1545 field is signed and no protections are provided. 1547 12.1.1. Protection of the To Header and Retargeting 1549 Armed with the original value of the To header field, the recipient 1550 of a request may be tempted compare it to their own identity in order 1551 to determine whether or not the identity information in this call 1552 might have been replayed. However, any request may be legitimately 1553 retargeted as well, and as a result legitimate requests may reach a 1554 SIP endpoint whose user is not identified by the URI designated in 1555 the To header field value. It is therefore difficult for any 1556 verifier to decide whether or not some prior retargeting was 1557 "legitimate." Retargeting can also cause confusion when identity 1558 information is provided for requests sent in the backwards direction 1559 in a dialog, as the dialog identifiers may not match credentials held 1560 by the ultimate target of the dialog. For further information on the 1561 problems of response identity see [I-D.peterson-sipping-retarget]. 1563 Any means for authentication services or verifiers to anticipate 1564 retargeting is outside the scope of this document, and likely to have 1565 equal applicability to response identity as it does to requests in 1566 the backwards direction within a dialog. Consequently, no special 1567 guidance is given for implementers here regarding the 'connected 1568 party' problem (see [RFC4916]); authentication service behavior is 1569 unchanged if retargeting has occurred for a dialog-forming request. 1570 Ultimately, the authentication service provides an Identity header 1571 field for requests in the dialog only when the user is authorized to 1572 assert the identity given in the From header field, and if they are 1573 not, an Identity header field is not provided. And per the threat 1574 model of [RFC7375], resolving problems with 'connected' identity has 1575 little bearing on detecting robocalling or related impersonation 1576 attacks. 1578 12.2. Unprotected Request Fields 1580 RFC4474 originally had protections for the Contact, Call-ID and CSeq. 1581 These are removed from RFC4474bis. The absence of these header field 1582 values creates some opportunities for determined attackers to 1583 impersonate based on cut-and-paste attacks; however, the absence of 1584 these header field values does not seem impactful to preventing the 1585 simple unauthorized claiming of an identity for the purposes of 1586 robocalling, voicemail hacking, or swatting, which is the primary 1587 scope of the current document. 1589 It might seem attractive to provide a signature over some of the 1590 information present in the Via header field value(s). For example, 1591 without a signature over the sent-by field of the topmost Via header 1592 field, an attacker could remove that Via header field and insert its 1593 own in a cut-and-paste attack, which would cause all responses to the 1594 request to be routed to a host of the attacker's choosing. However, 1595 a signature over the topmost Via header field does not prevent 1596 attacks of this nature, since the attacker could leave the topmost 1597 Via intact and merely insert a new Via header field directly after 1598 it, which would cause responses to be routed to the attacker's host 1599 "on their way" to the valid host, which has exactly the same end 1600 result. Although it is possible that an intermediary-based 1601 authentication service could guarantee that no Via hops are inserted 1602 between the sending user agent and the authentication service, it 1603 could not prevent an attacker from adding a Via hop after the 1604 authentication service, and thereby preempting responses. It is 1605 necessary for the proper operation of SIP for subsequent 1606 intermediaries to be capable of inserting such Via header fields, and 1607 thus it cannot be prevented. As such, though it is desirable, 1608 securing Via is not possible through the sort of identity mechanism 1609 described in this document; the best known practice for securing Via 1610 is the use of SIPS. 1612 12.3. Malicious Removal of Identity Headers 1614 In the end analysis, the Identity header field cannot protect itself. 1615 Any attacker could remove the header field from a SIP request, and 1616 modify the request arbitrarily afterwards. However, this mechanism 1617 is not intended to protect requests from men-in-the-middle who 1618 interfere with SIP messages; it is intended only to provide a way 1619 that the originators of SIP requests can prove that they are who they 1620 claim to be. At best, by stripping identity information from a 1621 request, a man-in-the-middle could make it impossible to distinguish 1622 any illegitimate messages he would like to send from those messages 1623 sent by an authorized user. However, it requires a considerably 1624 greater amount of energy to mount such an attack than it does to 1625 mount trivial impersonations by just copying someone else's From 1626 header field. This mechanism provides a way that an authorized user 1627 can provide a definitive assurance of his identity that an 1628 unauthorized user, an impersonator, cannot. 1630 12.4. Securing the Connection to the Authentication Service 1632 In the absence of user agent-based authentication services, the 1633 assurance provided by this mechanism is strongest when a user agent 1634 forms a direct connection, preferably one secured by TLS, to an 1635 intermediary-based authentication service. The reasons for this are 1636 twofold: 1638 If a user does not receive a certificate from the authentication 1639 service over the TLS connection that corresponds to the expected 1640 domain (especially when the user receives a challenge via a 1641 mechanism such as Digest), then it is possible that a rogue server 1642 is attempting to pose as an authentication service for a domain 1643 that it does not control, possibly in an attempt to collect shared 1644 secrets for that domain. A similar practice could be used for 1645 telephone numbers, though the application of certificates for 1646 telephone numbers to TLS is left as a matter for future study. 1648 Without TLS, the various header field values and the body of the 1649 request will not have integrity protection when the request 1650 arrives at an authentication service. Accordingly, a prior 1651 legitimate or illegitimate intermediary could modify the message 1652 arbitrarily. 1654 Of these two concerns, the first is most material to the intended 1655 scope of this mechanism. This mechanism is intended to prevent 1656 impersonation attacks, not man-in-the-middle attacks; integrity over 1657 parts of the header and body is provided by this mechanism only to 1658 prevent replay attacks. However, it is possible that applications 1659 relying on the presence of the Identity header field could leverage 1660 this integrity protection for services other than replay protection. 1662 Accordingly, direct TLS connections SHOULD be used between the UAC 1663 and the authentication service whenever possible. The opportunistic 1664 nature of this mechanism, however, makes it very difficult to 1665 constrain UAC behavior, and moreover there will be some deployment 1666 architectures where a direct connection is simply infeasible and the 1667 UAC cannot act as an authentication service itself. Accordingly, 1668 when a direct connection and TLS are not possible, a UAC should use 1669 the SIPS mechanism, Digest 'auth-int' for body integrity, or both 1670 when it can. The ultimate decision to add an Identity header field 1671 to a request lies with the authentication service, of course; domain 1672 policy must identify those cases where the UAC's security association 1673 with the authentication service is too weak. 1675 12.5. Authorization and Transitional Strategies 1677 Ultimately, the worth of an assurance provided by an Identity header 1678 field is limited by the security practices of the authentication 1679 service that issues the assurance. Relying on an Identity header 1680 field generated by a remote administrative domain assumes that the 1681 issuing domain uses recommended administrative practices to 1682 authenticate its users. However, it is possible that some 1683 authentication services will implement policies that effectively make 1684 users unaccountable (e.g., ones that accept unauthenticated 1685 registrations from arbitrary users). The value of an Identity header 1686 field from such authentication services is questionable. While there 1687 is no magic way for a verifier to distinguish "good" from "bad" 1688 signers by inspecting a SIP request, it is expected that further work 1689 in authorization practices could be built on top of this identity 1690 solution; without such an identity solution, many promising 1691 approaches to authorization policy are impossible. That much said, 1692 it is RECOMMENDED that authentication services based on proxy servers 1693 employ strong authentication practices. 1695 One cannot expect the Identity header field to be supported by every 1696 SIP entity overnight. This leaves the verifier in a compromising 1697 position; when it receives a request from a given SIP user, how can 1698 it know whether or not the originator's domain supports Identity? In 1699 the absence of ubiquitous support for identity, some transitional 1700 strategies are necessary. 1702 A verifier could remember when it receives a request from a domain 1703 or telephone number that uses Identity, and in the future, view 1704 messages received from that source without an Identity header 1705 field with skepticism. 1707 A verifier could consult some sort of directory that indicates 1708 whether a given caller should have a signed identity. There are a 1709 number of potential ways in which this could be implemented. This 1710 is left as a subject for future work. 1712 In the long term, some sort of identity mechanism, either the one 1713 documented in this specification or a successor, must become 1714 mandatory-to-use for the SIP protocol; that is the only way to 1715 guarantee that this protection can always be expected by verifiers. 1717 Finally, it is worth noting that the presence or absence of the 1718 Identity header fields cannot be the sole factor in making an 1719 authorization decision. Permissions might be granted to a message on 1720 the basis of the specific verified Identity or really on any other 1721 aspect of a SIP request. Authorization policies are outside the 1722 scope of this specification, but this specification advises any 1723 future authorization work not to assume that messages with valid 1724 Identity header fields are always good. 1726 12.6. Display-Names and Identity 1728 As a matter of interface design, SIP user agents might render the 1729 display-name portion of the From header field of a caller as the 1730 identity of the caller; there is a significant precedent in email 1731 user interfaces for this practice. Securing the display-name 1732 component of the From header field value is outside the scope of this 1733 document, but may be the subject of future work, such as through the 1734 "ppt" name mechanism. 1736 In the absence of signing the display-name, authentication services 1737 might check and validate it, and compare it to a list of acceptable 1738 display-names that may be used by the originator; if the display-name 1739 does not meet policy constraints, the authentication service could 1740 return a 403 response code. In this case, the reason phrase should 1741 indicate the nature of the problem; for example, "Inappropriate 1742 Display Name". However, the display-name is not always present, and 1743 in many environments the requisite operational procedures for 1744 display-name validation may not exist, so no normative guidance is 1745 given here. 1747 13. IANA Considerations 1749 This document contains a number of actions for IANA. 1751 13.1. SIP Header Fields 1753 The Identity-Info header in the SIP Header Fields registry should be 1754 marked as deprecated by [RFCThis]. 1756 13.2. SIP Response Codes 1758 The Reason phrase for the 436 response default reason phrase should 1759 be changed from "Bad Identity-Info" to "Bad Identity Info" in the SIP 1760 Response Code registry. 1762 The 437 "Unsupported Certificate" default reason phrase should be 1763 changed to "Unsupported Credential". 1765 13.3. Identity-Info Parameters 1767 The IANA manages a registry for Identity-Info parameters. The 1768 specification asks the IANA to change the name of this registry to 1769 "Identity Parameters". 1771 The "alg" parameter entry in the registry should be updated to 1772 reference [RFCThis] as its specification. 1774 This specification defines one new value for the registry: "info" as 1775 defined in this specification in Section 7.3. 1777 13.4. Identity-Info Algorithm Parameter Values 1779 This IANA manages an Identity-Info Algorithm Parameter Values 1780 registry which this specification deprecates. We request that the 1781 IANA delete this registry. Since the algorithms for signing 1782 PASSporTs are defined in [I-D.ietf-stir-passport] rather than in this 1783 specification, there is no longer a need for an algorithm parameter 1784 registry for the Identity header field. 1786 14. Acknowledgments 1788 The authors would like to thank Syed Ali, Olle Jacobson, Dave 1789 Frankel, Robert Sparks, Dave Crocker, Stephen Kent, Brian Rosen, Alex 1790 Bobotek, Paul Kyzviat, Jonathan Lennox, Richard Shockey, Martin 1791 Dolly, Andrew Allen, Hadriel Kaplan, Sanjay Mishra, Anton Baskov, 1792 Pierce Gorman, David Schwartz, Eric Burger, Alan Ford, Christer 1793 Holmberg, Philippe Fouquart, Michael Hamer, Henning Schulzrinne, and 1794 Richard Barnes for their comments. 1796 15. Changes from RFC4474 1798 The following are salient changes from the original RFC 4474: 1800 Generalized the credential mechanism; credential enrollment, 1801 acquisition and trust is now outside the scope of this document 1803 Reduced the scope of the Identity signature to remove CSeq, Call- 1804 ID, Contact, and the message body; signing of key fingerprints in 1805 SDP is now included 1807 Deprecated the Identity-Info header field and relocated its 1808 components into parameters of the Identity header field (which 1809 obsoletes the previous version of the header field) 1811 The Identity header field can now appear multiple times in one 1812 request 1813 Replaced previous signed-identity-digest format with PASSporT 1814 (signing algorithms now defined in a separate specification) 1816 Revised status code descriptions 1818 16. References 1820 16.1. Normative References 1822 [E.164] ITU-T, "The international public telecommunication 1823 numbering plan", E 164, February 2005, 1824 . 1826 [I-D.ietf-stir-passport] 1827 Wendt, C. and J. Peterson, "Persona Assertion Token", 1828 draft-ietf-stir-passport-07 (work in progress), September 1829 2016. 1831 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1832 Requirement Levels", BCP 14, RFC 2119, 1833 DOI 10.17487/RFC2119, March 1997, 1834 . 1836 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1837 A., Peterson, J., Sparks, R., Handley, M., and E. 1838 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1839 DOI 10.17487/RFC3261, June 2002, 1840 . 1842 [RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation 1843 Protocol (SIP): Locating SIP Servers", RFC 3263, 1844 DOI 10.17487/RFC3263, June 2002, 1845 . 1847 [RFC3966] Schulzrinne, H., "The tel URI for Telephone Numbers", 1848 RFC 3966, DOI 10.17487/RFC3966, December 2004, 1849 . 1851 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1852 Resource Identifier (URI): Generic Syntax", STD 66, 1853 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1854 . 1856 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1857 Housley, R., and W. Polk, "Internet X.509 Public Key 1858 Infrastructure Certificate and Certificate Revocation List 1859 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 1860 . 1862 [RFC5922] Gurbani, V., Lawrence, S., and A. Jeffrey, "Domain 1863 Certificates in the Session Initiation Protocol (SIP)", 1864 RFC 5922, DOI 10.17487/RFC5922, June 2010, 1865 . 1867 16.2. Informative References 1869 [I-D.ietf-iri-comparison] 1870 Masinter, L. and M. DĂźrst, "Comparison, 1871 Equivalence and Canonicalization of Internationalized 1872 Resource Identifiers", draft-ietf-iri-comparison-02 (work 1873 in progress), October 2012. 1875 [I-D.ietf-stir-certificates] 1876 Peterson, J. and S. Turner, "Secure Telephone Identity 1877 Credentials: Certificates", draft-ietf-stir- 1878 certificates-08 (work in progress), September 2016. 1880 [I-D.kaplan-stir-cider] 1881 Kaplan, H., "A proposal for Caller Identity in a DNS-based 1882 Entrusted Registry (CIDER)", draft-kaplan-stir-cider-00 1883 (work in progress), July 2013. 1885 [I-D.peterson-sipping-retarget] 1886 Peterson, J., "Retargeting and Security in SIP: A 1887 Framework and Requirements", draft-peterson-sipping- 1888 retarget-00 (work in progress), February 2005. 1890 [I-D.rosenberg-sip-rfc4474-concerns] 1891 Rosenberg, J., "Concerns around the Applicability of RFC 1892 4474", draft-rosenberg-sip-rfc4474-concerns-00 (work in 1893 progress), February 2008. 1895 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 1896 Infrastructure Operational Protocols: FTP and HTTP", 1897 RFC 2585, DOI 10.17487/RFC2585, May 1999, 1898 . 1900 [RFC3323] Peterson, J., "A Privacy Mechanism for the Session 1901 Initiation Protocol (SIP)", RFC 3323, 1902 DOI 10.17487/RFC3323, November 2002, 1903 . 1905 [RFC3325] Jennings, C., Peterson, J., and M. Watson, "Private 1906 Extensions to the Session Initiation Protocol (SIP) for 1907 Asserted Identity within Trusted Networks", RFC 3325, 1908 DOI 10.17487/RFC3325, November 2002, 1909 . 1911 [RFC3893] Peterson, J., "Session Initiation Protocol (SIP) 1912 Authenticated Identity Body (AIB) Format", RFC 3893, 1913 DOI 10.17487/RFC3893, September 2004, 1914 . 1916 [RFC4474] Peterson, J. and C. Jennings, "Enhancements for 1917 Authenticated Identity Management in the Session 1918 Initiation Protocol (SIP)", RFC 4474, 1919 DOI 10.17487/RFC4474, August 2006, 1920 . 1922 [RFC4501] Josefsson, S., "Domain Name System Uniform Resource 1923 Identifiers", RFC 4501, DOI 10.17487/RFC4501, May 2006, 1924 . 1926 [RFC4916] Elwell, J., "Connected Identity in the Session Initiation 1927 Protocol (SIP)", RFC 4916, DOI 10.17487/RFC4916, June 1928 2007, . 1930 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1931 Specifications: ABNF", STD 68, RFC 5234, 1932 DOI 10.17487/RFC5234, January 2008, 1933 . 1935 [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework 1936 for Establishing a Secure Real-time Transport Protocol 1937 (SRTP) Security Context Using Datagram Transport Layer 1938 Security (DTLS)", RFC 5763, DOI 10.17487/RFC5763, May 1939 2010, . 1941 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 1942 of Named Entities (DANE) Transport Layer Security (TLS) 1943 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 1944 2012, . 1946 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1947 Morris, J., Hansen, M., and R. Smith, "Privacy 1948 Considerations for Internet Protocols", RFC 6973, 1949 DOI 10.17487/RFC6973, July 2013, 1950 . 1952 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 1953 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 1954 2014, . 1956 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 1957 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 1958 2014, . 1960 [RFC7340] Peterson, J., Schulzrinne, H., and H. Tschofenig, "Secure 1961 Telephone Identity Problem Statement and Requirements", 1962 RFC 7340, DOI 10.17487/RFC7340, September 2014, 1963 . 1965 [RFC7375] Peterson, J., "Secure Telephone Identity Threat Model", 1966 RFC 7375, DOI 10.17487/RFC7375, October 2014, 1967 . 1969 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 1970 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 1971 2015, . 1973 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 1974 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 1975 . 1977 Authors' Addresses 1979 Jon Peterson 1980 Neustar, Inc. 1981 1800 Sutter St Suite 570 1982 Concord, CA 94520 1983 US 1985 Email: jon.peterson@neustar.biz 1987 Cullen Jennings 1988 Cisco 1989 400 3rd Avenue SW, Suite 350 1990 Calgary, AB T2P 4H2 1991 Canada 1993 Email: fluffy@cisco.com 1995 Eric Rescorla 1996 RTFM, Inc. 1997 2064 Edgewood Drive 1998 Palo Alto, CA 94303 1999 USA 2001 Email: ekr@rtfm.com 2002 Chris Wendt 2003 Comcast 2004 One Comcast Center 2005 Philadelphia, PA 19103 2006 USA 2008 Email: chris-ietf@chriswendt.net