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