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