idnits 2.17.1 draft-ietf-stir-rfc4474bis-03.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 : ---------------------------------------------------------------------------- ** There are 3 instances of too long lines in the document, the longest one being 9 characters in excess of 72. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 276: '... MUST possess the private key of one...' RFC 2119 keyword, line 278: '...stantiate this role MUST be capable of...' RFC 2119 keyword, line 294: '...tication service MUST extract the iden...' RFC 2119 keyword, line 299: '...uthentication service MUST extract the...' RFC 2119 keyword, line 308: '... number MAY add the optional 'canon'...' (62 more instances...) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 8, 2015) is 3337 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) == Unused Reference: 'RFC3280' is defined on line 1331, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 3280 (Obsoleted by RFC 5280) == Outdated reference: A later version (-18) exists of draft-ietf-stir-certificates-00 -- Obsolete informational reference (is this intentional?): RFC 3548 (Obsoleted by RFC 4648) -- Obsolete informational reference (is this intentional?): RFC 4234 (Obsoleted by RFC 5234) -- Obsolete informational reference (is this intentional?): RFC 4474 (Obsoleted by RFC 8224) Summary: 4 errors (**), 0 flaws (~~), 3 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 Intended status: Standards Track C. Jennings 5 Expires: September 9, 2015 Cisco 6 E. Rescorla 7 RTFM, Inc. 8 March 8, 2015 10 Authenticated Identity Management in the Session Initiation Protocol 11 (SIP) 12 draft-ietf-stir-rfc4474bis-03.txt 14 Abstract 16 The baseline security mechanisms in the Session Initiation Protocol 17 (SIP) are inadequate for cryptographically assuring the identity of 18 the end users that originate SIP requests, especially in an 19 interdomain context. This document defines a mechanism for securely 20 identifying originators of SIP requests. It does so by defining new 21 SIP header fields for conveying a signature used for validating the 22 identity, and for conveying a reference to the credentials of the 23 signer. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on September 9, 2015. 42 Copyright Notice 44 Copyright (c) 2015 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Background . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 3. Overview of Operations . . . . . . . . . . . . . . . . . . . 5 62 4. Signature Generation and Validation . . . . . . . . . . . . . 6 63 4.1. Authentication Service Behavior . . . . . . . . . . . . . 6 64 4.2. Verifier Behavior . . . . . . . . . . . . . . . . . . . . 9 65 5. Credentials . . . . . . . . . . . . . . . . . . . . . . . . . 10 66 5.1. Credential Use by the Authentication Service . . . . . . 10 67 5.2. Credential Use by the Verification Service . . . . . . . 12 68 5.3. Handling Identity-Info URIs . . . . . . . . . . . . . . . 12 69 5.4. Credential Systems . . . . . . . . . . . . . . . . . . . 13 70 6. Identity Types . . . . . . . . . . . . . . . . . . . . . . . 14 71 6.1. Telephone Numbers . . . . . . . . . . . . . . . . . . . . 14 72 6.1.1. Canonicalization Procedures . . . . . . . . . . . . . 15 73 6.2. Domain Names . . . . . . . . . . . . . . . . . . . . . . 16 74 7. Header Syntax . . . . . . . . . . . . . . . . . . . . . . . . 17 75 8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 20 76 9. Security Considerations . . . . . . . . . . . . . . . . . . . 21 77 9.1. Handling of digest-string Elements . . . . . . . . . . . 21 78 9.1.1. Protection of the To Header and Retargeting . . . . . 24 79 9.2. Securing the Connection to the Authentication Service . . 25 80 9.3. Authorization and Transitional Strategies . . . . . . . . 26 81 9.4. Display-Names and Identity . . . . . . . . . . . . . . . 27 82 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 83 10.1. Header Field Names . . . . . . . . . . . . . . . . . . . 27 84 10.2. Identity-Info Parameters . . . . . . . . . . . . . . . . 28 85 10.3. Identity-Info Algorithm Parameter Values . . . . . . . . 28 86 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 28 87 12. Changes from RFC4474 . . . . . . . . . . . . . . . . . . . . 28 88 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 29 89 13.1. Normative References . . . . . . . . . . . . . . . . . . 29 90 13.2. Informative References . . . . . . . . . . . . . . . . . 29 91 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31 93 1. Introduction 95 This document provides enhancements to the existing mechanisms for 96 authenticated identity management in the Session Initiation Protocol 97 (SIP, [RFC3261]). An identity, for the purposes of this document, is 98 defined as either a SIP URI, commonly a canonical address-of-record 99 (AoR) employed to reach a user (such as 100 'sip:alice@atlanta.example.com'), or a telephone number, which can be 101 represented as either a TEL URI [RFC3966] or as the user portion of a 102 SIP URI. 104 [RFC3261] stipulates several places within a SIP request where users 105 can express an identity for themselves, primarily the user-populated 106 From header field. However, the recipient of a SIP request has no 107 way to verify that the From header field has been populated 108 appropriately, in the absence of some sort of cryptographic 109 authentication mechanism. This leaves SIP vulnerable to a category 110 of abuses, including impersonation attacks that enable robocalling 111 and related problems as described in [RFC7340]. 113 [RFC3261] specifies a number of security mechanisms that can be 114 employed by SIP user agents (UAs), including Digest, Transport Layer 115 Security (TLS), and S/MIME (implementations may support other 116 security schemes as well). However, few SIP user agents today 117 support the end-user certificates necessary to authenticate 118 themselves (via S/MIME, for example), and furthermore Digest 119 authentication is limited by the fact that the originator and 120 destination must share a prearranged secret. It is desirable for SIP 121 user agents to be able to send requests to destinations with which 122 they have no previous association. A cryptographic approach, like 123 the one described in this document, can provide a much stronger and 124 less spoofable assurance of identity than the Caller ID services that 125 the telephone network provides today. 127 [RFC4474] previously specified a means of signing portions of SIP 128 requests in order to provide that identity assurance. However, RFC 129 4474 was in several ways misaligned with deployment realities (see 130 [I-D.rosenberg-sip-rfc4474-concerns]). Most significantly, RFC 4474 131 did not deal well with telephone numbers as identifiers, despite 132 their enduring use in SIP deployments. RFC 4474 also provided a 133 signature over material that intermediaries in the field commonly 134 altered. This specification therefore revises RFC 4474 in light of 135 recent reconsideration of the problem space to align with the threat 136 model in [RFC7375]. 138 2. Background 140 The secure operation of many SIP applications and services depends on 141 authorization policies. These policies may be automated, or they may 142 be exercised manually by humans. An example of the latter would be 143 an Internet telephone application that displays the calling party 144 number (and/or Caller-ID) of a caller, which a human may review to 145 make a policy decision before answering a call. An example of the 146 former would be a voicemail service that compares the identity of the 147 caller to a whitelist before determining whether it should allow the 148 caller access to recorded messages. In both of these cases, 149 attackers might attempt to circumvent these authorization policies 150 through impersonation. Since the primary identifier of the sender of 151 a SIP request, the From header field, can be populated arbitrarily by 152 the controller of a user agent, impersonation is very simple today. 153 The mechanism described in this document provides a strong identity 154 system for SIP requests for detecting attempted impersonation. 156 This document proposes an authentication architecture for SIP in 157 which requests are processed by a logical authentication service that 158 may be implemented as part of a user agent or as a proxy server. 159 Once a message has been authenticated, the service then adds new 160 cryptographic information to requests to communicate to other SIP 161 entities that the sending user has been authenticated and its use of 162 the From header field has been authorized. 164 But authorized by whom? Identities are issued to users by 165 authorities. When a new user becomes associated with example.com, 166 the administrator of the SIP service for that domain will issue them 167 an identity in that namespace, such as alice@example.com. Alice may 168 then send REGISTER requests to example.com that make her user agents 169 eligible to receive requests for sip:alice@example.com. In some 170 cases, Alice may be the owner of the domain herself, and may issue 171 herself identities as she chooses. But ultimately, it is the 172 controller of the SIP service at example.com that must be responsible 173 for authorizing the use of names in the example.com domain. 174 Therefore, for the purposes of this specification, the credentials 175 needed to prove a user is authorized to use a particular From header 176 field must ultimately derive from the domain owner: either a user 177 agent gives requests to the domain name owner in order for them to be 178 signed by the domain owner's credentials, or the user agent must 179 possess credentials that prove in some fashion that the domain owner 180 has given the user agent the right to a name. 182 The situation is however more complicated for telephone numbers. 183 Authority over telephone numbers does not correspond directly to 184 Internet domains. While a user could register at a SIP domain with a 185 username that corresponds to a telephone number, any connection 186 between the administrator of that domain and the assignment of 187 telephone numbers is not currently reflected on the Internet. 188 Telephone numbers do not share the domain-scope property described 189 above, as they are dialed without any domain component. This 190 document thus assumes the existence of a separate means of 191 establishing authority over telephone numbers, for cases where the 192 telephone number is the identity of the user. As with SIP URIs, the 193 necessary credentials to prove authority for a name might reside 194 either in the endpoint or at some intermediary. 196 This document specifies a means of sharing a cryptographic assurance 197 of end-user SIP identity in an interdomain or intradomain context. 198 It relies on the authentication service adding to requests a SIP 199 header, the Identity header, which contains that cryptographic 200 assurance. In order to assist in the validation of the Identity 201 header, this specification also describes an Identity-Info header 202 that can be used by the recipient of a request to recover the 203 credentials of the signer. Note that the scope of this document is 204 limited to providing this identity assurance for SIP requests; 205 solving this problem for SIP responses is outside the scope of this 206 work (see [RFC4916]). 208 This specification allows either a user agent or a proxy server to 209 provide the authentication service function and/or to verify 210 identities. To maximize end-to-end security, it is obviously 211 preferable for end-users to acquire their own credentials; if they 212 do, their user agents can act as authentication services. However, 213 for some deployments end-user credentials may be neither practical 214 nor affordable, given the potentially large number of SIP user agents 215 (phones, PCs, laptops, PDAs, gaming devices) that may be employed by 216 a single user. In such environments, synchronizing keying material 217 across multiple devices may be prohobitively complex and require 218 quite a good deal of additional endpoint behavior. Managing several 219 credentials for the various devices could also be burdensome. In 220 these cases, implementation the authentication service at an 221 intermediary may be more practical. This trade-off needs to be 222 understood by implementers of this specification. 224 3. Overview of Operations 226 This section provides an informative (non-normative) high-level 227 overview of the mechanisms described in this document. 229 Imagine a case where Alice, who has the home proxy of example.com and 230 the address-of-record sip:alice@example.com, wants to communicate 231 with Bob at sip:bob@example.org. They have no prior relationship, 232 and Bob implements best practices to prevent impersonation attacks. 234 Alice generates an INVITE and places her identity, in this case her 235 address-of-record, in the From header field of the request. She then 236 sends an INVITE over TLS to an authentication service proxy for the 237 example.com domain. 239 The authentication service authenticates Alice (possibly by sending a 240 Digest authentication challenge) and validates that she is authorized 241 to assert the identity that she populated in the From header field. 242 This value is Alice's AoR, but in other cases it could be some 243 different value that the proxy server has authority over, such as a 244 telephone number. The proxy then computes a hash over some 245 particular headers, including the From header field (and optionally 246 the body) of the message. This hash is signed with the appropriate 247 credential for the identity (example.com, in the 248 sip:alice@example.com case) and inserted in a new header field in the 249 SIP message, the 'Identity' header. 251 The proxy, as the holder of the private key for the example.com 252 domain, is asserting that the originator of this request has been 253 authenticated and that she is authorized to claim the identity that 254 appears in the From header field. The proxy also inserts a companion 255 header field, Identity-Info, that tells Bob how to acquire keying 256 material necessary to validate its credentials (a public key), if he 257 doesn't already have it. 259 When Bob's domain receives the request, it verifies the signature 260 provided in the Identity header, and thus can validate that the 261 authority over the identity in the From header field authenticated 262 the user, and permitted the user to assert that From header field 263 value. This same validation operation may be performed by Bob's user 264 agent server (UAS). As the request has been validated, it is 265 rendered to Bob. If the validation was unsuccessful, some other 266 treatment would be applied by the receiving domain. 268 4. Signature Generation and Validation 270 4.1. Authentication Service Behavior 272 This document specifies a role for SIP entities called an 273 authentication service. The authentication service role can be 274 instantiated by an intermediary such as a proxy server or by a user 275 agent. Any entity that instantiates the authentication service role 276 MUST possess the private key of one or more credentials that can be 277 used to sign for a domain or a telephone number (see Section 5.1). 278 Intermediaries that instantiate this role MUST be capable of 279 authenticating one or more SIP users who can register for that 280 identity. Commonly, this role will be instantiated by a proxy 281 server, since these entities are more likely to have a static 282 hostname, hold corresponding credentials, and have access to SIP 283 registrar capabilities that allow them to authenticate users. It is 284 also possible that the authentication service role might be 285 instantiated by an entity that acts as a redirect server, but that is 286 left as a topic for future work. 288 Entities instantiating the authentication service role perform the 289 following steps, in order, to generate an Identity header for a SIP 290 request: 292 Step 1: 294 The authentication service MUST extract the identity of the sender 295 from the request. The authentication service takes this URI value 296 from the addr-spec component of From header field; this URI will be 297 referred to here as the 'identity field'. If the identity field 298 contains a SIP or SIP Secure (SIPS) URI, and the user portion is not 299 a telephone number, the authentication service MUST extract the 300 hostname portion of the identity field and compare it to the 301 domain(s) for which it is responsible (following the procedures in 302 RFC 3261 [RFC3261], Section 16.4). If the identity field uses the 303 TEL URI scheme [RFC3966], or the identity field is a SIP or SIPS URI 304 with a telephone number in the user portion, the authentication 305 service determines whether or not it is responsible for this 306 telephone number; see Section 6.1 for more information. An 307 authentication service proceeding with a signature over a telephone 308 number MAY add the optional 'canon' parameter to the request as 309 described in that section. If the authentication service is not 310 authoritative for the identity in question, it SHOULD process and 311 forward the request normally, but it MUST NOT follow the steps below 312 to add an Identity header. An authentication service MUST NOT add an 313 Identity header to a request that already has one. 315 Step 2: 317 The authentication service MUST then determine whether or not the 318 sender of the request is authorized to claim the identity given in 319 the identity field. In order to do so, the authentication service 320 MUST authenticate the sender of the message. Some possible ways in 321 which this authentication might be performed include: 323 If the authentication service is instantiated by a SIP 324 intermediary (proxy server), it may authenticate the request with 325 the authentication scheme used for registration in its domain 326 (e.g., Digest authentication). 328 If the authentication service is instantiated by a SIP user agent, 329 a user agent may authenticate its own user through any system- 330 specific means, perhaps simply by virtue of having physical access 331 to the user agent. 333 Authorization of the use of a particular username or telephone number 334 in the user part of the From header field is a matter of local policy 335 for the authentication service, see Section 5.1 for more information. 337 Note that this check is performed only on the addr-spec in the From 338 header field (e.g., the URI of the sender, like 339 'sip:alice@atlanta.example.com'); it does not convert the display- 340 name portion of the From header field (e.g., 'Alice Atlanta'). 341 Authentication services MAY check and validate the display-name as 342 well, and compare it to a list of acceptable display-names that may 343 be used by the sender; if the display-name does not meet policy 344 constraints, the authentication service could return a 403 response 345 code. In this case, the reason phrase should indicate the nature of 346 the problem; for example, "Inappropriate Display Name". However, the 347 display-name is not always present, and in many environments the 348 requisite operational procedures for display-name validation may not 349 exist, so no normative guidance is given here. For more information, 350 see Section 9.4. 352 Step 3: 354 An authentication service MUST add a Date header field to SIP 355 requests if one is not already present. The authentication service 356 MUST ensure that any preexisting Date header in the request is 357 accurate. Local policy can dictate precisely how accurate the Date 358 must be; a RECOMMENDED maximum discrepancy of sixty seconds will 359 ensure that the request is unlikely to upset any verifiers. If the 360 Date header contains a time different by more than one minute from 361 the current time noted by the authentication service, the 362 authentication service SHOULD reject the request. This behavior is 363 not mandatory because a user agent client (UAC) could only exploit 364 the Date header in order to cause a request to fail verification; the 365 Identity header is not intended to provide a source of non- 366 repudiation or a perfect record of when messages are processed. 367 Finally, the authentication service MUST verify that the Date header 368 falls within the validity period of its credential. 370 See Section 7 for information on how the Date header field assists 371 verifiers. 373 Step 4: 375 The authentication service MAY form an identity-reliance signature 376 and add an Identity-Reliance header to the request containing this 377 signature. The Identity-Reliance header provides body security 378 properties that are useful for non-INVITE transactions, and in 379 environments where body security of INVITE transactions is necessary. 380 Details on the generation of this header are provided in Section 7. 381 If the authentication service is adding an Identity-Reliance header, 382 it MUST also add a Content-Length header field to SIP requests if one 383 is not already present; this can help verifiers to double-check that 384 they are hashing exactly as many bytes of message-body as the 385 authentication service when they verify the message. 387 Step 5: 389 The authentication service MUST form the identity signature and add 390 an Identity header to the request containing this signature. After 391 the Identity header has been added to the request, the authentication 392 service MUST also add an Identity-Info header. The Identity-Info 393 header contains a URI from which the authentication service's 394 credential can be acquired; see Section 5.3 for more on credential 395 acquisition. Details on the syntax of both of these headers are 396 provided in Section 7. 398 Finally, the authentication service MUST forward the message 399 normally. 401 4.2. Verifier Behavior 403 This document specifies a logical role for SIP entities called a 404 verification service, or verifier. When a verifier receives a SIP 405 message containing an Identity header, it inspects the signature to 406 verify the identity of the sender of the message. Typically, the 407 results of a verification are provided as input to an authorization 408 process that is outside the scope of this document. If an Identity 409 header is not present in a request, and one is required by local 410 policy (for example, based on a per-sending-domain policy, or a per- 411 sending-user policy), then a 428 'Use Identity Header' response MUST 412 be sent. 414 In order to verify the identity of the sender of a message, an entity 415 acting as a verifier MUST perform the following steps, in the order 416 here specified. 418 Step 1: 420 In order to determine whether the signature for the URI in the From 421 header field value should be over the entire URI or just a 422 canonicalized telephone number, the verification service must follow 423 the canonicalization process described in Section 6.1.1. That 424 section also describes the procedures the verification service must 425 follow to determine if the signer is authoritative for a telephone 426 number. For domains, the verifier MUST follow the process described 427 in Section 6.2 to determine if the signer is authoritative for the 428 URI in the From header field. 430 Step 2: 432 The verifier must first ensure that it possesses the proper keying 433 material to validate the signature in the Identity header field, 434 which usually involves dereferencing the Identity-Info header. See 435 Section 5.2 for more information on these procedures. 437 Step 3: 439 The verifier MUST validate the signature in the Identity header 440 field, following the procedures for generating the hashed digest- 441 string described in Section 7. If a verifier determines that the 442 signature on the message does not correspond to the reconstructed 443 digest-string, then a 438 'Invalid Identity Header' response MUST be 444 returned. 446 Step 4: 448 If the request contains an Identity-Reliance header, the verifier 449 SHOULD verify the signature in the Identity-Reliance header field, 450 following the procedures for generating the hashed reliance-digest- 451 string described in Section 7. The Identity-Reliance header provides 452 important protections for non-INVITE transactions (such as MESSAGE or 453 NOTIFY), but verifiers MAY elect not to verify Identity-Reliance when 454 it protects SDP. If a verifier determines that the signature on the 455 message does not correspond to the reconstructed digest-string, then 456 a 438 'Invalid Identity Header' response SHOULD be returned. 458 Step 5: 460 The verifier MUST must furthermore ensure that the value of the Date 461 header meets local policy for freshness (usually, within sixty 462 seconds) and that it falls within the validity period of the 463 credential used to sign the Identity header. For more on the attacks 464 this prevents, see Section 9.1. 466 5. Credentials 468 5.1. Credential Use by the Authentication Service 470 In order to act as an authentication service, a SIP entity must have 471 access to the private keying material of one or more credentials that 472 cover domain names or telephone numbers. These credentials may 473 represent authority over an entire domain (such as example.com) or 474 potentially a set of domains enumerated by the credential. 475 Similarly, a credential may represent authority over a single 476 telephone number or a range of telephone numbers. The way that the 477 scope of a credential is expressed is specific to the credential 478 mechanism. 480 Authorization of the use of a particular username or telephone number 481 in the user part of the From header field is a matter of local policy 482 for the authentication service, one that depends greatly on the 483 manner in which authentication is performed. For non-telephone 484 number user parts, one policy might be as follows: the username given 485 in the 'username' parameter of the Proxy-Authorization header MUST 486 correspond exactly to the username in the From header field of the 487 SIP message. However, there are many cases in which this is too 488 limiting or inappropriate; a realm might use 'username' parameters in 489 Proxy-Authorization that do not correspond to the user-portion of SIP 490 From headers, or a user might manage multiple accounts in the same 491 administrative domain. In this latter case, a domain might maintain 492 a mapping between the values in the 'username' parameter of Proxy- 493 Authorization and a set of one or more SIP URIs that might 494 legitimately be asserted for that 'username'. For example, the 495 username can correspond to the 'private identity' as defined in Third 496 Generation Partnership Project (3GPP), in which case the From header 497 field can contain any one of the public identities associated with 498 this private identity. In this instance, another policy might be as 499 follows: the URI in the From header field MUST correspond exactly to 500 one of the mapped URIs associated with the 'username' given in the 501 Proxy-Authorization header. This is a suitable approach for 502 telephone numbers in particular. 504 This specification could also be used with credentials that cover a 505 single name or URI, such as alice@example.com or 506 sip:alice@example.com. This would require a modification to 507 authentication service behavior to operate on a whole URI rather than 508 a domain name. Because this is not believed to be a pressing use 509 case, this is deferred to future work, but implementors should note 510 this as a possible future direction. 512 Exceptions to such authentication service policies arise for cases 513 like anonymity; if the AoR asserted in the From header field uses a 514 form like 'sip:anonymous@example.com' (see [RFC3323]), then the 515 'example.com' proxy might authenticate only that the user is a valid 516 user in the domain and insert the signature over the From header 517 field as usual. 519 5.2. Credential Use by the Verification Service 521 In order to act as a verification service, a SIP entity must have a 522 way to acquire and retain credentials for authorities over particular 523 domain names and/or telephone numbers or number ranges. 524 Dereferencing the Identity-Info header (as described in the next 525 section) MUST be supported by all verification service 526 implementations to create a baseline means of credential acquisition. 527 Provided that the credential used to sign a message is not previously 528 known to the verifier, SIP entities SHOULD discover this credential 529 by dereferencing the Identity-Info header, unless they have some more 530 other implementation-specific way of acquiring the needed 531 certificates, such as an offline store of periodically-updated 532 credentials. If the URI in the Identity-Info header cannot be 533 dereferenced, then a 436 'Bad Identity-Info' response MUST be 534 returned. 536 Verification service implementations supporting this specification 537 SHOULD have some means of retaining credentials (in accordance with 538 normal practices for credential lifetimes and revocation) in order to 539 prevent themselves from needlessly downloading the same credential 540 every time a request from the same identity is received. Credentials 541 cached in this manner may be indexed in accordance with local policy: 542 for example, by their scope, or the URI given in the Identity-Info 543 header field value. Further consideration of how to cache 544 credentials is deferred to the credential mechanisms. 546 5.3. Handling Identity-Info URIs 548 An Identity-Info header MUST contain a URI which dereferences to a 549 resource that contains the public key components of the credential 550 used by the authentication service to sign a request. It is 551 essential that a URI in the Identity-Info header be dereferencable by 552 any entity that could plausibly receive the request. For common 553 cases, this means that the URI must be dereferencable by any entity 554 on the public Internet. In constrained deployment environments, a 555 service private to the environment might be used instead. 557 Beyond providing a means of accessing credentials for an identity, 558 the Identity-Info header further serves as a means of differentiating 559 which particular credential was used to sign a request, when there 560 are potentially multiple authorities eligible to sign. For example, 561 imagine a case where a domain implements the authentication service 562 role for a range of telephone and a user agent belonging to Alice has 563 acquired a credential for a single telephone number within that 564 range. Either would be eligible to sign a SIP request for the number 565 in question. Verification services however need a means to 566 differentiate which one performed the signature. The Identity-Info 567 header performs that function. 569 If the optional "canon" parameter is present, it contains the result 570 of the number canonicalization process performed by the 571 authentication service (see Section 6.1.1) on the identity in the 572 From. This value is provided purely informationally as an 573 optimization for the verification service. The verification service 574 MAY compute its own canonicalization of the number and compare this 575 to the value in the "canon" parameter before performing any 576 cryptographic functions in order to ascertain whether or not the two 577 ends agree on the canonical number form. 579 5.4. Credential Systems 581 This document makes no recommendation for the use of any specific 582 credential system. Today, there are two primary credential systems 583 in place for proving ownership of domain names: certificates (e.g., 584 X.509 v3, see [RFC5280]) and the domain name system itself (e.g., 585 DANE, see [RFC6698]). It is envisioned that either could be used in 586 the SIP identity context: an Identity-Info header could for example 587 give an HTTP URL of the form 'application/pkix-cert' pointing to a 588 certificate (following the conventions of [RFC2585]). The Identity- 589 Info headers may use the DNS URL scheme (see [RFC4501]) to designate 590 keys in the DNS. 592 While no comparable public credentials exist for telephone numbers, 593 either approach could be applied to telephone numbers. A credential 594 system based on certificates is given in 595 [I-D.ietf-stir-certificates]. One based on the domain name system is 596 given in [I-D.kaplan-stir-cider]. 598 In order for a credential system to work with this mechanism, its 599 specification must detail: 601 which URIs schemes the credential will use in the Identity-Info 602 header, and any special procedures required to dereference the 603 URIs 605 how the verifier can learn the scope of the credential 607 any special procedures required to extract keying material from 608 the resources designated by the URI 610 any algorithms that would appear in the Identity-Info "alg" 611 parameter other than 'rsa-sha256.' Note that per the IANA 612 Considerations of RFC 4474, new algorithms can only be specified 613 by Standards Action 615 SIP entities cannot reliably predict where SIP requests will 616 terminate. When choosing a credential scheme for deployments of this 617 specification, it is therefore essential that the trust anchor(s) for 618 credentials be widely trusted, or that deployments restrict the use 619 of this mechanism to environments where the reliance on particular 620 trust anchors is assured by business arrangements or similar 621 constraints. 623 Note that credential systems must address key lifecycle management 624 concerns: were a domain to change the credential available at the 625 Identity-Info URI before a verifier evaluates a request signed by an 626 authentication service, this would cause obvious verifier failures. 627 When a rollover occurs, authentication services SHOULD thus provide 628 new Identity-Info URIs for each new credential, and SHOULD continue 629 to make older key acquisition URIs available for a duration longer 630 than the plausible lifetime of a SIP transaction (a minute would most 631 likely suffice). 633 6. Identity Types 635 6.1. Telephone Numbers 637 Since many SIP applications provide a Voice over IP (VoIP) service, 638 telephone numbers are commonly used as identities in SIP deployments. 639 In order for telephone numbers to be used with the mechanism 640 described in this document, authentication services must enroll with 641 an authority that issues credentials for telephone numbers or 642 telephone number ranges, and verification services must trust the 643 authority employed by the authentication service that signs a 644 request. Enrollment procedures and credential management are outside 645 the scope of this document. 647 In the longer term, it is possible that some directory or other 648 discovery mechanism may provide a way to determine which 649 administrative domain is responsible for a telephone number, and this 650 may aid in the signing and verification of SIP identities that 651 contain telephone numbers. This is a subject for future work. 653 In order to work with any such authorities, authentication and 654 verification services must be able to identify when a request should 655 be signed by an authority for a telephone number, and when it should 656 be signed by an authority for a domain. Telephone numbers most 657 commonly appear in SIP header field values in the username portion of 658 a SIP URI (e.g., 'sip:+17005551008@chicago.example.com;user=phone'). 659 The user part of that URI conforms to the syntax of the TEL URI 660 scheme (RFC 3966 [RFC3966]). It is also possible for a TEL URI to 661 appear in the SIP To or From header field outside the context of a 662 SIP or SIPS URI (e.g., 'tel:+17005551008'). In both of these cases, 663 it's clear that the signer must have authority over the telephone 664 number, not the domain name of the SIP URI. It is also possible, 665 however, for requests to contain a URI like 666 'sip:7005551000@chicago.example.com'. It may be non-trivial for a 667 service to ascertain in this case whether the URI contains a 668 telephone number or not. 670 6.1.1. Canonicalization Procedures 672 In order to determine whether or not the user portion of a SIP URI is 673 a telephone number, authentication services and verification services 674 must perform the following canonicalization procedure on any SIP URI 675 they inspect which contains a wholly numeric user part. Note that 676 the same procedures are followed for creating the canonical form of 677 URIs found in both the From and To header field values. 679 First, implementations must assess if the user-portion of the URI 680 constitutes a telephone number. In some environments, numbers 681 will be explicitly labeled by the use of TEL URIs or the 682 'user=phone' parameter, or implicitly by the presence of the '+' 683 indicator at the start of the user-portion. Absent these 684 indications, if there are numbers present in the user-portion, 685 implementations may also detect that the user-portion of the URI 686 contains a telephone number by determining whether or not those 687 numbers would be dialable or routable in the local environment -- 688 bearing in mind that the telephone number may be a valid E.164 689 number, a nationally-specific number, or even a private branch 690 exchange number. 692 Once an implementation has identified a telephone number, it must 693 construct a number string. Implementations MUST drop any leading 694 +'s, any internal dashes, parentheses or other non-numeric 695 characters, excepting only the leading "#" or "*" keys used in 696 some special service numbers (typically, these will appear only in 697 the To header field value). This MUST result in an ASCII string 698 limited to "#", "*" and digits without whitespace or visual 699 separators. 701 Next, an implementation must assess if the number string is a 702 valid, globally-routable number with a leading country code. If 703 not, implementations SHOULD convert the number into E.164 format, 704 adding a country code if necessary; this may involve transforming 705 the number from a dial string (see [RFC3966]), removing any 706 national or international dialing prefixes or performing similar 707 procedures. It is only in the case that an implementation cannot 708 determine how to convert the number to a globally-routable format 709 that this step may be skipped. 711 In some cases, further transformations MAY be made in accordance 712 with specific policies used within the local domain. For example, 713 one domain may only use local number formatting and need to 714 convert all To/From user portions to E.164 by prepending country- 715 code and region code digits; another domain might prefix usernames 716 with trunk-routing codes and need to remove the prefix. 718 The resulting canonical number string will be used as input to the 719 hash calculation during signing and verifying processes. 721 The ABNF of this number string is: 723 tn-spec = [ "#" / "*" ] 1*DIGIT 725 If the result of this procedure forms a complete telephone number, 726 that number is used for the purpose of creating and signing the 727 digest-string by both the authentication service and verification 728 service. Practically, entities that perform the authentication 729 service role will sometimes alter the telephone numbers that appear 730 in the To and From header field values, converting them to this 731 format (though note this is not a function that [RFC3261] permits 732 proxy servers to perform). The authentication service MAY also add 733 the result of the canonicalization process of the From header field 734 value to the "canon" parameter of the Identity-Info header. If the 735 result of the canonicalization of the From header field value does 736 not form a complete telephone number, the authentication service and 737 verification service should treat the entire URI as a SIP URI, and 738 apply a domain signature per the procedures in Section 6.2. 740 6.2. Domain Names 742 When a verifier processes a request containing an Identity-Info 743 header with a domain signature, it must compare the domain portion of 744 the URI in the From header field of the request with the domain name 745 that is the subject of the credential acquired from the Identity-Info 746 header. While it might seem that this should be a straightforward 747 process, it is complicated by two deployment realities. In the first 748 place, credentials have varying ways of describing their subjects, 749 and may indeed have multiple subjects, especially in 'virtual 750 hosting' cases where multiple domains are managed by a single 751 application. Secondly, some SIP services may delegate SIP functions 752 to a subordinate domain and utilize the procedures in RFC 3263 753 [RFC3263] that allow requests for, say, 'example.com' to be routed to 754 'sip.example.com'. As a result, a user with the AoR 755 'sip:jon@example.com' may process requests through a host like 756 'sip.example.com', and it may be that latter host that acts as an 757 authentication service. 759 To meet the second of these problems, a domain that deploys an 760 authentication service on a subordinate host MUST be willing to 761 supply that host with the private keying material associated with a 762 credential whose subject is a domain name that corresponds to the 763 domain portion of the AoRs that the domain distributes to users. 764 Note that this corresponds to the comparable case of routing inbound 765 SIP requests to a domain. When the NAPTR and SRV procedures of RFC 766 3263 are used to direct requests to a domain name other than the 767 domain in the original Request-URI (e.g., for 'sip:jon@example.com', 768 the corresponding SRV records point to the service 769 'sip1.example.org'), the client expects that the certificate passed 770 back in any TLS exchange with that host will correspond exactly with 771 the domain of the original Request-URI, not the domain name of the 772 host. Consequently, in order to make inbound routing to such SIP 773 services work, a domain administrator must similarly be willing to 774 share the domain's private key with the service. This design 775 decision was made to compensate for the insecurity of the DNS, and it 776 makes certain potential approaches to DNS-based 'virtual hosting' 777 unsecurable for SIP in environments where domain administrators are 778 unwilling to share keys with hosting services. 780 A verifier MUST evaluate the correspondence between the user's 781 identity and the signing credential by following the procedures 782 defined in RFC 2818 [RFC2818], Section 3.1. While RFC 2818 [RFC2818] 783 deals with the use of HTTP in TLS and is specific to certificates, 784 the procedures described are applicable to verifying identity if one 785 substitutes the "hostname of the server" in HTTP for the domain 786 portion of the user's identity in the From header field of a SIP 787 request with an Identity header. 789 7. Header Syntax 791 This document specifies three SIP headers: Identity, Identity- 792 Reliance and Identity- Info. Each of these headers can appear only 793 once in a SIP request; Identity-Reliance is OPTIONAL, while Identity 794 and Identity-Info are REQUIRED for securing requests with this 795 specification. The grammar for these three headers is (following the 796 ABNF [RFC4234] in RFC 3261 [RFC3261]): 798 Identity = "Identity" HCOLON signed-identity-digest 799 signed-identity-digest = LDQUOT 32LHEX RDQUOT 801 Identity-Reliance = "Identity-Reliance" HCOLON signed-identity-reliance-digest 802 signed-identity-reliance-digest = LDQUOT 32LHEX RDQUOT 804 Identity-Info = "Identity-Info" HCOLON ident-info 805 *( SEMI ident-info-params ) 806 ident-info = LAQUOT absoluteURI RAQUOT 807 ident-info-params = ident-info-alg / canonical-str / ident-info-extension 808 ident-info-alg = "alg" EQUAL token 809 canonical-str = "canon" EQUAL tn-spec 810 ident-info-extension = generic-param 812 The signed-identity-reliance-digest is a signed hash of a canonical 813 string generated from certain components of a SIP request. Creating 814 this hash and the Identity-Reliance header field to contain it is 815 OPTIONAL, and its usage is a matter of local policy for 816 authentication services. To create the contents of the signed- 817 identity-reliance-digest, the following element of a SIP message MUST 818 be placed in a bit-exact string: 820 The body content of the message with the bits exactly as they are 821 in the message (in the ABNF for SIP, the message-body). This 822 includes all components of multipart message bodies. Note that 823 the message-body does NOT include the CRLF separating the SIP 824 headers from the message-body, but does include everything that 825 follows that CRLF. 827 The signed-identity-digest is a signed hash of a canonical string 828 generated from certain components of a SIP request. To create the 829 contents of the signed-identity-digest, the following elements of a 830 SIP message MUST be placed in a bit-exact string in the order 831 specified here, separated by a vertical line, "|" or %x7C, character: 833 First, the identity. If the user part of the AoR in the From 834 header field of the request contains a telephone number, then the 835 canonicalization of that number goes into the first slot (see 836 Section 6.1.1). Otherwise, the first slot contains the AoR of the 837 UA sending the message as taken from addr-spec of the From header 838 field. 840 Second, the target. If the user part of the AoR in the To header 841 field of the request contains a telephone number, then the 842 canonicalization of that number goes into the second slot (again, 843 see Section 6.1.1). Otherwise, the second slot contains the addr- 844 spec component of the To header field, which is the AoR to which 845 the request is being sent. 847 Third, the request method. 849 Fourth, the Date header field, with exactly one space each for 850 each SP and the weekday and month items case set as shown in the 851 BNF of RFC 3261 [RFC3261]. RFC 3261 specifies that the BNF for 852 weekday and month is a choice amongst a set of tokens. The RFC 853 4234 [RFC4234] rules for the BNF specify that tokens are case 854 sensitive. However, when used to construct the canonical string 855 defined here, the first letter of each week and month MUST be 856 capitalized, and the remaining two letters must be lowercase. 857 This matches the capitalization provided in the definition of each 858 token. All requests that use the Identity mechanism MUST contain 859 a Date header. 861 Fifth, if the request contains an SDP message body, and if that 862 SDP contains one or more "a=fingerprint" attributes, the value(s) 863 of the attributes if they differ. Each attribute value consists 864 of all characters following the colon after "a=fingerprint" 865 including the algorithm description and hexadecimal key 866 representation, any whitespace, carriage returns, and "/" line 867 break indicators. If multiple non-identical "a=fingerprint" 868 attributes appear in an SDP body, then all non-identical 869 attributes values MUST be concatenated, with no separating 870 character, after sorting the values in alphanumeric order. If the 871 SDP body contains no "a=fingerprint" attribute, the fifth element 872 MUST be empty, containing no whitespace, resulting in a "||" in 873 the signed-identity-digest. 875 Sixth, the Identity-Reliance header field value, if there is an 876 Identity-Reliance field in the request. If the message has no 877 body, or no Identity-Reliance header, then the fifth slot will be 878 empty, and the final "|" will not be followed by any additional 879 characters. 881 For more information on the security properties of these headers, and 882 why their inclusion mitigates replay attacks, see Section 9 and 883 [RFC3893]. The precise formulation of this digest-string is, 884 therefore (following the ABNF[RFC4234] in RFC 3261 [RFC3261]): 886 digest-string = ( addr-spec / tn-spec ) "|" ( addr-spec / tn-spec ) "|" 887 Method "|" SIP-date "|" [ sdp-fingerprint ] "|" 888 [ signed-identity-reliance-digest ] 890 sdp-fingerprint = byte-string 891 For the definition of 'tn-spec' see Section 6.1.1. 893 After the digest-string or reliance-digest-string is formed, each 894 MUST be hashed and signed with the certificate of authority over the 895 identity. The hashing and signing algorithm is specified by the 896 'alg' parameter of the Identity-Info header (see below for more 897 information on Identity-Info header parameters). This document 898 defines only one value for the 'alg' parameter: 'rsa-sha256'; further 899 values MUST be defined in a Standards Track RFC, see Section 10.3 for 900 more information. All implementations of this specification MUST 901 support 'rsa-sha256'. When the 'rsa-sha256' algorithm is specified 902 in the 'alg' parameter of Identity-Info, the hash and signature MUST 903 be generated as follows: compute the results of signing this string 904 with sha1WithRSAEncryption as described in RFC 3370 [RFC3370] and 905 base64 encode the results as specified in RFC 3548 [RFC3548]. A 906 2048-bit or longer RSA key MUST be used. The result of the digest- 907 string hash is placed in the Identity header field; the optional 908 reliance-digest-string hash goes in the Identity-Reliance header. 910 The 'absoluteURI' portion of the Identity-Info header MUST contain a 911 URI; see Section 5.3 for more on choosing how to advertise 912 credentials through Identity-Info. 914 8. Privacy Considerations 916 The purpose of this mechanism is to provide a strong identification 917 of the originator of a SIP request, specifically a cryptographic 918 assurance that the URI given in the From header field value can 919 legitimately be claimed by the originator. This URI may contain a 920 variety of personally identifying information, including the name of 921 a human being, their place of work or service provider, and possibly 922 further details. The intrinsic privacy risks associated with that 923 URI are, however, no different from those of baseline SIP. Per the 924 guidance in [RFC6973], implementors should make users aware of the 925 privacy trade-off of providing secure identity. 927 The identity mechanism presented in this document is compatible with 928 the standard SIP practices for privacy described in [RFC3323]. A SIP 929 proxy server can act both as a privacy service and as an 930 authentication service. Since a user agent can provide any From 931 header field value that the authentication service is willing to 932 authorize, there is no reason why private SIP URIs that contain 933 legitimate domains (e.g., sip:anonymous@example.com) cannot be signed 934 by an authentication service. The construction of the Identity 935 header is the same for private URIs as it is for any other sort of 936 URIs. 938 Note, however, that even when using anonymous SIP URIs, an 939 authentication service must possess a certificate corresponding to 940 the host portion of the addr-spec of the From header field of the 941 request; accordingly, using domains like 'anonymous.invalid' will not 942 be possible for privacy services that also act as authentication 943 services. The assurance offered by the usage of anonymous URIs with 944 a valid domain portion is "this is a known user in my domain that I 945 have authenticated, but I am keeping its identity private". The use 946 of the domain 'anonymous.invalid' entails that no corresponding 947 authority for the domain can exist, and as a consequence, 948 authentication service functions for that domain are meaningless. 950 [RFC3325] defines the "id" priv-value token, which is specific to the 951 P-Asserted-Identity header. The sort of assertion provided by the P- 952 Asserted-Identity header is very different from the Identity header 953 presented in this document. It contains additional information about 954 the sender of a message that may go beyond what appears in the From 955 header field; P-Asserted-Identity holds a definitive identity for the 956 sender that is somehow known to a closed network of intermediaries 957 that presumably the network will use this identity for billing or 958 security purposes. The danger of this network-specific information 959 leaking outside of the closed network motivated the "id" priv-value 960 token. The "id" priv-value token has no implications for the 961 Identity header, and privacy services MUST NOT remove the Identity 962 header when a priv-value of "id" appears in a Privacy header. 964 Finally, note that unlike [RFC3325], the mechanism described in this 965 specification adds no information to SIP requests that has privacy 966 implications. 968 9. Security Considerations 970 9.1. Handling of digest-string Elements 972 This document describes a mechanism that provides a signature over 973 the Date header field, and either the whole or part of the To and 974 From header fields of SIP requests, as well as optional protections 975 for the message body. While a signature over the From header field 976 would be sufficient to secure a URI alone, the additional headers 977 provide replay protection and reference integrity necessary to make 978 sure that the Identity header will not be replayed in cut-and-paste 979 attacks. In general, the considerations related to the security of 980 these headers are the same as those given in [RFC3261] for including 981 headers in tunneled 'message/sip' MIME bodies (see Section 23 in 982 particular). The following section details the individual security 983 properties obtained by including each of these header fields within 984 the signature; collectively, this set of header fields provides the 985 necessary properties to prevent impersonation. 987 The From header field indicates the identity of the sender of the 988 message, and the SIP address-of-record URI, or an embedded telephone 989 number, in the From header field is the identity of a SIP user, for 990 the purposes of this document. The To header field provides the 991 identity of the SIP user that this request targets. Providing the To 992 header field in the Identity signature serves two purposes: first, it 993 prevents cut-and-paste attacks in which an Identity header from 994 legitimate request for one user is cut-and-pasted into a request for 995 a different user; second, it preserves the starting URI scheme of the 996 request, which helps prevent downgrade attacks against the use of 997 SIPS. 999 The Date header field provides replay protection, as described in 1000 [RFC3261], Section 23.4.2. Implementations of this specification 1001 MUST NOT deem valid a request with an outdated Date header field (the 1002 RECOMMENDED interval is that the Date header must indicate a time 1003 within 60 seconds of the receipt of a message). The result of this 1004 is that if an Identity header is replayed within the Date interval, 1005 verifiers will recognize that it is invalid; if an Identity header is 1006 replayed after the Date interval, verifiers will recognize that it is 1007 invalid because the Date is stale. 1009 Without the method, an INVITE request could be cut- and-pasted by an 1010 attacker and transformed into a MESSAGE request without changing any 1011 fields covered by the Identity header, and moreover requests within a 1012 transaction (for example, a re-INVITE) could be replayed in 1013 potentially confusing or malicious ways. 1015 RFC4474 originally had protections for the Contact, Call-ID and CSeq. 1016 These are removed from RFC4474bis. The absence of these header 1017 values creates some opportunities for determined attackers to 1018 impersonate based on cut-and-paste attacks; however, the absence of 1019 these headers does not seem impactful to preventing the simple 1020 unauthorized claiming of a From header field value, which is the 1021 primary scope of the current document. 1023 It might seem attractive to provide a signature over some of the 1024 information present in the Via header field value(s). For example, 1025 without a signature over the sent-by field of the topmost Via header, 1026 an attacker could remove that Via header and insert its own in a cut- 1027 and-paste attack, which would cause all responses to the request to 1028 be routed to a host of the attacker's choosing. However, a signature 1029 over the topmost Via header does not prevent attacks of this nature, 1030 since the attacker could leave the topmost Via intact and merely 1031 insert a new Via header field directly after it, which would cause 1032 responses to be routed to the attacker's host "on their way" to the 1033 valid host, which has exactly the same end result. Although it is 1034 possible that an intermediary-based authentication service could 1035 guarantee that no Via hops are inserted between the sending user 1036 agent and the authentication service, it could not prevent an 1037 attacker from adding a Via hop after the authentication service, and 1038 thereby preempting responses. It is necessary for the proper 1039 operation of SIP for subsequent intermediaries to be capable of 1040 inserting such Via header fields, and thus it cannot be prevented. 1041 As such, though it is desirable, securing Via is not possible through 1042 the sort of identity mechanism described in this document; the best 1043 known practice for securing Via is the use of SIPS. 1045 When signing a request that contains a fingerprint of keying material 1046 in SDP for DTLS-SRTP [RFC5763], this mechanism always provides a 1047 signature over that fingerprint. This signature prevents certain 1048 classes of impersonation attacks in which an attacker forwards or 1049 cut-and-pastes a legitimate request: although the target of the 1050 attack may accept the request, the attacker will be unable to 1051 exchange media with the target as they will not possess a key 1052 corresponding to the fingerprint. For example there are some baiting 1053 attacks (where the attacker receives a request from the target and 1054 reoriginates it to a third party) that might not be prevented by only 1055 a signature over the From, To and Date, but could be prevented by 1056 securing a fingerprint for DTLS-SRTP. While this is a different form 1057 of interpretation than is commonly needed for robocalling, ultimately 1058 there is little purpose in establishing the identity of the user that 1059 originated a SIP request if this assurance is not coupled with a 1060 comparable assurance over the contents of the subsequent 1061 communication. This signature also, per [RFC7258], reduces the 1062 potential for passive monitoring attacks against the SIP media. In 1063 environments where DTLS-SRTP is unsupported, however, this mechanism 1064 is not exercised and no protections are provided. 1066 This mechanism also provides an optional full signature over the 1067 bodies of SIP requests. This can help to protect non-INVITE 1068 transactions such as MESSAGE or NOTIFY, as well as INVITEs in those 1069 environments where intermediaries do not change SDP. Note, however, 1070 that this is not perfect end-to-end security. The authentication 1071 service itself, when instantiated at an intermediary, could 1072 conceivably change the body (and SIP headers, for that matter) before 1073 providing a signature. Thus, while this mechanism reduces the chance 1074 that a replayer or man-in-the-middle will modify bodies, it does not 1075 eliminate it entirely. Since it is a foundational assumption of this 1076 mechanism that the users trust their local domain to vouch for their 1077 security, they must also trust the service not to violate the 1078 integrity of their message without good reason. 1080 In the end analysis, the Identity, Identity-Reliance and Identity- 1081 Info headers cannot protect themselves. Any attacker could remove 1082 these headers from a SIP request, and modify the request arbitrarily 1083 afterwards. However, this mechanism is not intended to protect 1084 requests from men-in-the- middle who interfere with SIP messages; it 1085 is intended only to provide a way that the originators of SIP 1086 requests can prove that they are who they claim to be. At best, by 1087 stripping identity information from a request, a man-in-the-middle 1088 could make it impossible to distinguish any illegitimate messages he 1089 would like to send from those messages sent by an authorized user. 1090 However, it requires a considerably greater amount of energy to mount 1091 such an attack than it does to mount trivial impersonations by just 1092 copying someone else's From header field. This mechanism provides a 1093 way that an authorized user can provide a definitive assurance of his 1094 identity that an unauthorized user, an impersonator, cannot. 1096 One additional respect in which the Identity-Info header cannot 1097 protect itself is the 'alg' parameter. The 'alg' parameter is not 1098 included in the digest-string, and accordingly, a man-in-the-middle 1099 might attempt to modify the 'alg' parameter. Once again, it is 1100 important to note that preventing men-in-the-middle is not the 1101 primary impetus for this mechanism. Moreover, changing the 'alg' 1102 would at worst result in some sort of bid-down attack, and at best 1103 cause a failure in the verifier. Note that only one valid 'alg' 1104 parameter is defined in this document and that thus there is 1105 currently no weaker algorithm to which the mechanism can be bid down. 1106 'alg' has been incorporated into this mechanism for forward- 1107 compatibility reasons in case the current algorithm exhibits 1108 weaknesses, and requires swift replacement, in the future. 1110 9.1.1. Protection of the To Header and Retargeting 1112 The mechanism in this document provides a signature over the identity 1113 information in the To header field value of requests. This provides 1114 a means for verifiers to detect replay attacks where a signed request 1115 originally sent to one target is modified and then forwarded by an 1116 attacker to another, unrelated target. Armed with the original value 1117 of the To header field, the recipient of a request may compare it to 1118 their own identity in order to determine whether or not the identity 1119 information in this call might have been replayed. However, any 1120 request may be legitimately retargeted as well, and as a result 1121 legitimate requests may reach a SIP endpoint whose user is not 1122 identified by the URI designated in the To header field value. It is 1123 therefore difficult for any verifier to decide whether or not some 1124 prior retargeting was "legitimate." Retargeting can also cause 1125 confusion when identity information is provided for requests sent in 1126 the backwards in a dialog, as the dialog identifiers may not match 1127 credentials held by the ultimate target of the dialog. For further 1128 information on the problems of response identity see 1129 [I-D.peterson-sipping-retarget]. 1131 Any means for authentication services or verifiers to anticipate 1132 retargeting is outside the scope of this document, and likely to have 1133 equal applicability to response identity as it does to requests in 1134 the backwards direction within a dialog. Consequently, no special 1135 guidance is given for implementers here regarding the 'connected 1136 party' problem (see [RFC4916]); authentication service behavior is 1137 unchanged if retargeting has occurred for a dialog-forming request. 1138 Ultimately, the authentication service provides an Identity header 1139 for requests in the backwards dialog when the user is authorized to 1140 assert the identity given in the From header field, and if they are 1141 not, an Identity header is not provided. And per the threat model of 1142 [RFC7375], resolving problems with 'connected' identity has little 1143 bearing on detecting robocalling or related impersonation attacks. 1145 9.2. Securing the Connection to the Authentication Service 1147 In the absence of user agent-based authentication services, the 1148 assurance provided by this mechanism is strongest when a user agent 1149 forms a direct connection, preferably one secured by TLS, to an 1150 intermediary-based authentication service. The reasons for this are 1151 twofold: 1153 If a user does not receive a certificate from the authentication 1154 service over the TLS connection that corresponds to the expected 1155 domain (especially when the user receives a challenge via a 1156 mechanism such as Digest), then it is possible that a rogue server 1157 is attempting to pose as an authentication service for a domain 1158 that it does not control, possibly in an attempt to collect shared 1159 secrets for that domain. A similar practice could be used for 1160 telephone numbers, though the application of certificates for 1161 telephone numbers to TLS is left as a matter for future study. 1163 Without TLS, the various header field values and the body of the 1164 request will not have integrity protection when the request 1165 arrives at an authentication service. Accordingly, a prior 1166 legitimate or illegitimate intermediary could modify the message 1167 arbitrarily. 1169 Of these two concerns, the first is most material to the intended 1170 scope of this mechanism. This mechanism is intended to prevent 1171 impersonation attacks, not man-in-the-middle attacks; integrity over 1172 the header and bodies is provided by this mechanism only to prevent 1173 replay attacks. However, it is possible that applications relying on 1174 the presence of the Identity header could leverage this integrity 1175 protection, especially body integrity, for services other than replay 1176 protection. 1178 Accordingly, direct TLS connections SHOULD be used between the UAC 1179 and the authentication service whenever possible. The opportunistic 1180 nature of this mechanism, however, makes it very difficult to 1181 constrain UAC behavior, and moreover there will be some deployment 1182 architectures where a direct connection is simply infeasible and the 1183 UAC cannot act as an authentication service itself. Accordingly, 1184 when a direct connection and TLS are not possible, a UAC should use 1185 the SIPS mechanism, Digest 'auth-int' for body integrity, or both 1186 when it can. The ultimate decision to add an Identity header to a 1187 request lies with the authentication service, of course; domain 1188 policy must identify those cases where the UAC's security association 1189 with the authentication service is too weak. 1191 9.3. Authorization and Transitional Strategies 1193 Ultimately, the worth of an assurance provided by an Identity header 1194 is limited by the security practices of the authentication service 1195 that issues the assurance. Relying on an Identity header generated 1196 by a remote administrative domain assumes that the issuing domain 1197 uses recommended administrative practices to authenticate its users. 1198 However, it is possible that some authentication services will 1199 implement policies that effectively make users unaccountable (e.g., 1200 ones that accept unauthenticated registrations from arbitrary users). 1201 The value of an Identity header from such authentication services is 1202 questionable. While there is no magic way for a verifier to 1203 distinguish "good" from "bad" signers by inspecting a SIP request, it 1204 is expected that further work in authorization practices could be 1205 built on top of this identity solution; without such an identity 1206 solution, many promising approaches to authorization policy are 1207 impossible. That much said, it is RECOMMENDED that authentication 1208 services based on proxy servers employ strong authentication 1209 practices. 1211 One cannot expect the Identity and Identity-Info headers to be 1212 supported by every SIP entity overnight. This leaves the verifier in 1213 a compromising position; when it receives a request from a given SIP 1214 user, how can it know whether or not the sender's domain supports 1215 Identity? In the absence of ubiquitous support for identity, some 1216 transitional strategies are necessary. 1218 A verifier could remember when it receives a request from a domain 1219 or telephone number that uses Identity, and in the future, view 1220 messages received from that sources without Identity headers with 1221 skepticism. 1223 A verifier could consult some sort of directory that indications 1224 whether a given caller should have a signed identity. There are a 1225 number of potential ways in which this could be implemented. This 1226 is left as a subject for future work. 1228 In the long term, some sort of identity mechanism, either the one 1229 documented in this specification or a successor, must become 1230 mandatory-to-use for the SIP protocol; that is the only way to 1231 guarantee that this protection can always be expected by verifiers. 1233 Finally, it is worth noting that the presence or absence of the 1234 Identity headers cannot be the sole factor in making an authorization 1235 decision. Permissions might be granted to a message on the basis of 1236 the specific verified Identity or really on any other aspect of a SIP 1237 request. Authorization policies are outside the scope of this 1238 specification, but this specification advises any future 1239 authorization work not to assume that messages with valid Identity 1240 headers are always good. 1242 9.4. Display-Names and Identity 1244 As a matter of interface design, SIP user agents might render the 1245 display-name portion of the From header field of a caller as the 1246 identity of the caller; there is a significant precedent in email 1247 user interfaces for this practice. Securing the display-name 1248 component of the From header field value is outside the scope of this 1249 document, but may be the subject of future work. 1251 10. IANA Considerations 1253 This document relies on the headers and response codes defined in RFC 1254 4474. It also retains the requirements for the specification of new 1255 algorithms or headers related to the mechanisms described in that 1256 document. 1258 10.1. Header Field Names 1260 This document specifies one new SIP header called Identity-Reliance. 1261 Its syntax is given in Section 7. This header is defined by the 1262 following information, which has been added to the header sub- 1263 registry under http://www.iana.org/assignments/sip-parameters 1265 Header Name: Identity-Reliance 1266 Compact Form: N/A 1268 10.2. Identity-Info Parameters 1270 The IANA has already created a registry for Identity-Info header 1271 parameters. This specification defines a new value called "canon" as 1272 defined in Section 5.3. 1274 10.3. Identity-Info Algorithm Parameter Values 1276 The IANA has already created a registry for Identity-Info 'alg' 1277 parameter values. This registry is to be prepopulated with a single 1278 entry for a value called 'rsa-sha256', which describes the algorithm 1279 used to create the signature that appears in the Identity header. 1280 Registry entries must contain the name of the 'alg' parameter value 1281 and the specification in which the value is described. New values 1282 for the 'alg' parameter may be defined only in Standards Track RFCs. 1284 RFC4474 defined the 'rsa-sha1' value for this registry. That value 1285 is hereby deprecated, and should be treated as such. It is not 1286 believed that any implementations are making use of this value. 1288 Future specifications may consider elliptical curves for smaller key 1289 sizes. 1291 11. Acknowledgments 1293 The authors would like to thank Stephen Kent, Brian Rosen, Alex 1294 Bobotek, Paul Kyzviat, Jonathan Lennox, Richard Shockey, Martin 1295 Dolly, Andrew Allen, Hadriel Kaplan, Sanjay Mishra, Anton Baskov, 1296 Pierce Gorman, David Schwartz, Philippe Fouquart, Michael Hamer, 1297 Henning Schulzrinne, and Richard Barnes for their comments. 1299 12. Changes from RFC4474 1301 The following are salient changes from the original RFC 4474: 1303 Generalized the credential mechanism; credential enrollment and 1304 acquisition is now outside the scope of this document 1306 Reduced the scope of the Identity signature to remove CSeq, Call- 1307 ID, Contact, and the message body 1309 Added any DTLS-SRTP fingerprint in SDP as a mandatory element of 1310 the digest-string 1312 Added the Identity-Reliance header 1314 Deprecated 'rsa-sha1' in favor of new baseline signing algorithm 1316 13. References 1318 13.1. Normative References 1320 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1322 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1323 A., Peterson, J., Sparks, R., Handley, M., and E. 1324 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1325 June 2002. 1327 [RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation 1328 Protocol (SIP): Locating SIP Servers", RFC 3263, June 1329 2002. 1331 [RFC3280] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet 1332 X.509 Public Key Infrastructure Certificate and 1333 Certificate Revocation List (CRL) Profile", RFC 3280, 1334 April 2002. 1336 [RFC3370] Housley, R., "Cryptographic Message Syntax (CMS) 1337 Algorithms", RFC 3370, August 2002. 1339 [RFC3966] Schulzrinne, H., "The tel URI for Telephone Numbers", RFC 1340 3966, December 2004. 1342 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1343 Housley, R., and W. Polk, "Internet X.509 Public Key 1344 Infrastructure Certificate and Certificate Revocation List 1345 (CRL) Profile", RFC 5280, May 2008. 1347 13.2. Informative References 1349 [I-D.ietf-stir-certificates] 1350 Peterson, J., "Secure Telephone Identity Credentials: 1351 Certificates", draft-ietf-stir-certificates-00 (work in 1352 progress), October 2014. 1354 [I-D.kaplan-stir-cider] 1355 Kaplan, H., "A proposal for Caller Identity in a DNS-based 1356 Entrusted Registry (CIDER)", draft-kaplan-stir-cider-00 1357 (work in progress), July 2013. 1359 [I-D.peterson-sipping-retarget] 1360 Peterson, J., "Retargeting and Security in SIP: A 1361 Framework and Requirements", draft-peterson-sipping- 1362 retarget-00 (work in progress), February 2005. 1364 [I-D.rosenberg-sip-rfc4474-concerns] 1365 Rosenberg, J., "Concerns around the Applicability of RFC 1366 4474", draft-rosenberg-sip-rfc4474-concerns-00 (work in 1367 progress), February 2008. 1369 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 1370 Infrastructure Operational Protocols: FTP and HTTP", RFC 1371 2585, May 1999. 1373 [RFC3323] Peterson, J., "A Privacy Mechanism for the Session 1374 Initiation Protocol (SIP)", RFC 3323, November 2002. 1376 [RFC3325] Jennings, C., Peterson, J., and M. Watson, "Private 1377 Extensions to the Session Initiation Protocol (SIP) for 1378 Asserted Identity within Trusted Networks", RFC 3325, 1379 November 2002. 1381 [RFC3548] Josefsson, S., "The Base16, Base32, and Base64 Data 1382 Encodings", RFC 3548, July 2003. 1384 [RFC3893] Peterson, J., "Session Initiation Protocol (SIP) 1385 Authenticated Identity Body (AIB) Format", RFC 3893, 1386 September 2004. 1388 [RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1389 Specifications: ABNF", RFC 4234, October 2005. 1391 [RFC4474] Peterson, J. and C. Jennings, "Enhancements for 1392 Authenticated Identity Management in the Session 1393 Initiation Protocol (SIP)", RFC 4474, August 2006. 1395 [RFC4501] Josefsson, S., "Domain Name System Uniform Resource 1396 Identifiers", RFC 4501, May 2006. 1398 [RFC4916] Elwell, J., "Connected Identity in the Session Initiation 1399 Protocol (SIP)", RFC 4916, June 2007. 1401 [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework 1402 for Establishing a Secure Real-time Transport Protocol 1403 (SRTP) Security Context Using Datagram Transport Layer 1404 Security (DTLS)", RFC 5763, May 2010. 1406 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 1407 of Named Entities (DANE) Transport Layer Security (TLS) 1408 Protocol: TLSA", RFC 6698, August 2012. 1410 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1411 Morris, J., Hansen, M., and R. Smith, "Privacy 1412 Considerations for Internet Protocols", RFC 6973, July 1413 2013. 1415 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 1416 Attack", BCP 188, RFC 7258, May 2014. 1418 [RFC7340] Peterson, J., Schulzrinne, H., and H. Tschofenig, "Secure 1419 Telephone Identity Problem Statement and Requirements", 1420 RFC 7340, September 2014. 1422 [RFC7375] Peterson, J., "Secure Telephone Identity Threat Model", 1423 RFC 7375, October 2014. 1425 Authors' Addresses 1427 Jon Peterson 1428 Neustar, Inc. 1429 1800 Sutter St Suite 570 1430 Concord, CA 94520 1431 US 1433 Email: jon.peterson@neustar.biz 1435 Cullen Jennings 1436 Cisco 1437 400 3rd Avenue SW, Suite 350 1438 Calgary, AB T2P 4H2 1439 Canada 1441 Email: fluffy@iii.ca 1443 Eric Rescorla 1444 RTFM, Inc. 1445 2064 Edgewood Drive 1446 Palo Alto, CA 94303 1447 USA 1449 Phone: +1 650 678 2350 1450 Email: ekr@rtfm.com