RFC 8760: The Session Initiation Protocol (SIP) Digest Access Authentication Scheme
- R. Shekh-Yusef
Abstract
This document updates RFC 3261 by modifying the Digest Access Authentication scheme used by the Session Initiation Protocol (SIP) to add support for more secure digest algorithms, e.g., SHA-256 and SHA-512/256, to replace the obsolete MD5 algorithm.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.¶
1. Introduction
The Session Initiation Protocol [RFC3261] uses the same mechanism
as the Hypertext Transfer Protocol (HTTP) does for authenticating
users. This mechanism is called "Digest Access Authentication"
The default hash algorithm for Digest Access Authentication is MD5. However, it has been demonstrated that the MD5 algorithm is not collision resistant and is now considered a bad choice for a hash function (see [RFC6151]).¶
The HTTP Digest Access Authentication document [RFC7616] obsoletes [RFC2617] and adds stronger algorithms that can be used with the Digest Access Authentication scheme and establishes a registry for these algorithms, known as the "Hash Algorithms for HTTP Digest Authentication" IANA registry, so that algorithms can be added in the future.¶
This document updates the Digest Access Authentication scheme used by SIP to support the algorithms listed in the "Hash Algorithms for HTTP Digest Authentication" IANA registry defined by [RFC7616].¶
1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
2. Updates to the SIP Digest Access Authentication Scheme
This section describes the modifications to the operation of the Digest mechanism as specified in [RFC3261] in order to support the algorithms defined in the "Hash Algorithms for HTTP Digest Authentication" IANA registry described in [RFC7616].¶
It replaces the reference used in [RFC3261] for Digest Access Authentication,
substituting [RFC7616] for the obsolete [RFC2617], and describes
the modifications to the usage of the Digest mechanism in [RFC3261]
resulting from that reference update. It adds support for the SHA-256 and SHA-512/256 algorithms [SHA2].
It adds required support for the "qop" parameter. It provides additional User Agent Client (UAC)
and User Agent Server (UAS) procedures regarding usage of multiple SIP Authorization,
WWW
2.1. Hash Algorithms
The Digest Access Authentication scheme has an "algorithm" parameter that specifies the algorithm to be used to compute the digest of the response. The "Hash Algorithms for HTTP Digest Authentication" IANA registry specifies the algorithms that correspond to 'algorithm' values.¶
[RFC3261] specifies only one algorithm, MD5, which is used by default. This document extends [RFC3261] to allow use of any algorithm listed in the "Hash Algorithms for HTTP Digest Authentication" IANA registry.¶
A UAS prioritizes which algorithm to use based on its policy, which is specified in Section 2.3 and parallels the process used in HTTP specified by [RFC7616].¶
2.2. Representation of Digest Values
The size of the digest depends on the algorithm used. The bits in
the digest are converted from the most significant to the least
significant bit, four bits at a time, to the ASCII representation as
follows. Each set of four bits is represented by its familiar hexadecimal
notation from the characters 0123456789abcde
2.3. UAS Behavior
When a UAS receives a request from a UAC, and an acceptable
Authorization header field is not received, the UAS can challenge the
originator to provide credentials by rejecting the request with a
401/407 status code with the WWW
If the UAS challenges the originator using multiple WWW
2.4. UAC Behavior
When the UAC receives a response with multiple WWW
When the UAC receives a 401 response with multiple WWW
If the UAC cannot respond to any of the challenges in the response, then it SHOULD abandon attempts to send the request unless a local policy dictates otherwise, e.g., the policy might indicate the use of non-Digest mechanisms. For example, if the UAC does not have credentials or has stale credentials for any of the realms, the UAC will abandon the request.¶
2.5. Forking
Section 22.3 of [RFC3261] discusses the operation of the proxy-to-user authentication, which describes the operation of the proxy when it forks a request. This section clarifies that operation.¶
If a request is forked, various proxy servers and/or UAs may wish to
challenge the UAC. In this case, the forking proxy server is
responsible for aggregating these challenges into a single response.
Each WWW
When the forking proxy places multiple WWW
2.6. HTTP Digest Authentication Scheme Modifications
This section describes the modifications and clarifications required to apply the HTTP Digest Access Authentication scheme to SIP. The SIP scheme usage is similar to that for HTTP. For completeness, the bullets specified below are mostly copied from Section 22.4 of [RFC3261]; the only semantic changes are specified in bullets 1, 7, and 8 below.¶
SIP clients and servers MUST NOT accept or request Basic authentication.¶
The rules for Digest Access Authentication follow those defined in HTTP, with "HTTP/1.1" [RFC7616] replaced by "SIP/2.0" in addition to the following differences:¶
The usage of the Authentication
2.7. ABNF for SIP
This document updates the ABNF [RFC5234] for SIP as follows.¶
It extends the request-digest as follows to allow for different digest sizes:¶
The number of hex digits is implied by the length of the value of the algorithm used, with a minimum size of 32. A parameter with an empty value (empty string) is allowed when the UAC has not yet received a challenge.¶
It extends the algorithm parameter as follows to allow any algorithm in the registry to be used:¶
3. Security Considerations
This specification adds new secure algorithms to be used with the Digest mechanism to authenticate users. The obsolete MD5 algorithm remains only for backward compatibility with [RFC2617], but its use is NOT RECOMMENDED.¶
This opens the system to the potential for a downgrade attack by an on-path attacker. The most effective way of dealing with this type of attack is to either validate the client and challenge it accordingly or remove the support for backward compatibility by not supporting MD5.¶
See Section 5 of [RFC7616] for a detailed security discussion of the Digest Access Authentication scheme.¶
4. IANA Considerations
[RFC7616] defines an IANA registry named "Hash Algorithms for HTTP Digest Authentication" to simplify the introduction of new algorithms in the future. This document specifies that algorithms defined in that registry may be used in SIP digest authentication.¶
This document has no actions for IANA.¶
5. References
5.1. Normative References
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC3261]
-
Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, DOI 10
.17487 , , <https:///RFC3261 www >..rfc -editor .org /info /rfc3261 - [RFC7234]
-
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", RFC 7234, DOI 10
.17487 , , <https:///RFC7234 www >..rfc -editor .org /info /rfc7234 - [RFC7616]
-
Shekh-Yusef, R., Ed., Ahrens, D., and S. Bremer, "HTTP Digest Access Authentication", RFC 7616, DOI 10
.17487 , , <https:///RFC7616 www >..rfc -editor .org /info /rfc7616 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [SHA2]
-
National Institute of Standards and Technology, "Secure Hash Standard (SHS)", DOI 10
.6028 , FIPS 180-4, , <https:///NIST .FIPS .180 -4 doi >..org /10 .6028 /NIST .FIPS .180 -4
5.2. Informative References
- [RFC2617]
-
Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, "HTTP Authentication: Basic and Digest Access Authentication", RFC 2617, DOI 10
.17487 , , <https:///RFC2617 www >..rfc -editor .org /info /rfc2617 - [RFC5234]
-
Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10
.17487 , , <https:///RFC5234 www >..rfc -editor .org /info /rfc5234 - [RFC6151]
-
Turner, S. and L. Chen, "Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms", RFC 6151, DOI 10
.17487 , , <https:///RFC6151 www >..rfc -editor .org /info /rfc6151
Acknowledgments
The author would like to thank the following individuals for their careful review, comments, and suggestions: Paul Kyzivat, Olle Johansson, Dale Worley, Michael Procter, Inaki Baz Castillo, Tolga Asveren, Christer Holmberg, Brian Rosen, Jean Mahoney, Adam Roach, Barry Leiba, Roni Even, Eric Vyncke, Benjamin Kaduk, Alissa Cooper, Roman Danyliw, Alexey Melnikov, and Maxim Sobolev.¶