RFC 8143
Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)
RFC 8143: Using TLS with NNTP π
Okay bestie, so this is RFC 8143, titled "Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)" π . It came out in April 2017 from the Internet Engineering Task Force (IETF), it's written by J. Elie, and it's a Standards Track document, so it's the real deal π₯. It updates RFC 4642. The ISSN is 2070-1721 β¨.
Abstract π¦
So this doc gives recommendations for making NNTP (Network News Transfer Protocol) more secure when it's using TLS (Transport Layer Security) π. It basically glows up how NNTP uses TLS so it matches TLS best current practices π. It also updates RFC 4642 π«Ά.
Status of This Memo π
This is an Internet Standards Track document πΈ.
It's a product of the Internet Engineering Task Force (IETF), and it has the consensus of the IETF community. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG) β¨. If you want more on Internet Standards, check out Section 2 of RFC 7841 π§.
Info about the current status, any errata, and how to give feedback is at http://www.rfc-editor.org/info/rfc8143 π.
Copyright Notice Β©
Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved π.
This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they were on the date it was published π. Read these carefully, because they explain your rights and restrictions for this doc π. Code Components pulled out of this document have to include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions. They also come without warranty, as described in the Simplified BSD License π.
Table of Contents π§
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Conventions Used in This Document . . . . . . . . . . . . 3
2. Updates/Changes to RFC 4642 . . . . . . . . . . . . . . . . . 3
3. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 4
3.1. Compression . . . . . . . . . . . . . . . . . . . . . . . 4
3.2. Protocol Versions and Security Preferences . . . . . . . 4
3.3. Server Name Indication . . . . . . . . . . . . . . . . . 5
3.4. Prevention of SSL Stripping . . . . . . . . . . . . . . . 5
3.5. Authenticated Connections . . . . . . . . . . . . . . . . 5
3.6. Human Factors . . . . . . . . . . . . . . . . . . . . . . 6
4. Security Considerations . . . . . . . . . . . . . . . . . . . 7
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 7
6.1. Normative References . . . . . . . . . . . . . . . . . . 7
6.2. Informative References . . . . . . . . . . . . . . . . . 9
Appendix A. Detailed Changes to RFC 4642 . . . . . . . . . . . . 11
A.1. Related to TLS-Level Compression . . . . . . . . . . . . 11
A.2. Related to Implicit TLS . . . . . . . . . . . . . . . . . 11
A.3. Related to RC4 Cipher Suites . . . . . . . . . . . . . . 12
A.4. Related to Server Name Indication . . . . . . . . . . . . 12
A.5. Related to Certificate Verification . . . . . . . . . . . 12
A.6. Related to Other Obsolete Wording . . . . . . . . . . . . 13
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 13
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction β¨
Okay so NNTP [RFC3977] has been vibing with TLS [RFC5246] (and its older sibling, SSL) since at least the year 2000 π°οΈ. [RFC4642] is the doc that officially formalized TLS in NNTP, and it dropped some implementation tips at the same time π. But the threat landscape on the Internet today is a whole different beast, so this doc comes in with stronger recommendations about that use πͺ.
In particular, this doc updates [RFC4642] by saying that NNTP implementations and deployments MUST follow the best current practices documented in [BCP195]. Right now that's RFC 7525 ("Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)") π. This brings in stronger guidance on SSL/TLS protocol versions, fallback to lower versions, TLS negotiation, TLS-level compression, TLS session resumption, cipher suites, public key lengths, forward secrecy, hostname validation, certificate verification, and other stuff about using TLS with NNTP π«Ά.
1.1. Conventions Used in This Document π
Any term that isn't defined here has the same meaning it has in [RFC4642] or the NNTP core spec [RFC3977] π.
When this doc says "implicit TLS", it means TLS negotiation starts right away when you connect, on a separate port π.
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 RFC 2119 [BCP14] π§ .
2. Updates/Changes to RFC 4642 π
This doc updates [RFC4642] in the following ways π :
- NNTP implementations and deployments SHOULD disable TLS-level compression (Section 3.3 of RFC 7525 [BCP195]), so they stop using TLS to provide data compression. That goes against the Abstract and Section 2.2.2 of [RFC4642] π ββοΈ.
- NNTP implementations and deployments SHOULD prefer implicit TLS, which means they use strict TLS configuration (Section 3.2 of RFC 7525 [BCP195]). In other words, they SHOULD use a port dedicated to NNTP over TLS and start the TLS negotiation right away when you connect. That's different from upgrading an unencrypted connection to TLS with the
STARTTLScommand, which Section 1 of [RFC4642] was encouraging π. Implicit TLS is the preferred way to use TLS with NNTP, for the same reasons Appendix A of [MUA-STS] gives, just transposed to NNTP π§. (Fun fact: [MUA-STS] and [RFC4642] have one author in common π.) - NNTP implementations and deployments MUST NOT negotiate RC4 cipher suites ([RFC7465]). This goes against Section 5 of [RFC4642], which required them to implement the
TLS_RSA_WITH_RC4_128_MD5cipher suite so that any two NNTP-compliant implementations could be configured to interoperate. This doc removes that requirement, so NNTP client and server implementations follow the recommendations in Sections 4.2 and 4.2.1 of RFC 7525 [BCP195] instead π«. The mandatory-to-implement cipher suite or suites depend on the TLS protocol version. For instance, when TLS 1.2 is used, theTLS_RSA_WITH_AES_128_CBC_SHAcipher suite MUST be implemented (Section 9 of [RFC5246]) π₯. - All NNTP clients, and any NNTP server that is known by multiple names, MUST support the Server Name Indication (SNI) extension defined in Section 3 of [RFC6066], in conformance with Section 3.6 of RFC 7525 [BCP195] π. It was only a "SHOULD" in Section 2.2.2 of [RFC4642] π.
- NNTP implementations and deployments MUST follow the rules and guidelines defined in [RFC6125] and [RFC5280] for hostname validation and certificate verification π. So part of Section 5 of [RFC4642] gets rationalized in favor of following those two docs π.
Appendix A of this doc gives the detailed changes to the wording of [RFC4642] π.
3. Recommendations π
The best current practices in [BCP195] apply here. So NNTP implementations and deployments that comply with this doc are REQUIRED to comply with [BCP195] as well π«Ά.
Instead of repeating those recommendations here, this doc mostly gives supplementary info about securely implementing and deploying NNTP tech β¨.
3.1. Compression π«§
NNTP supports the COMPRESS command, defined in Section 2.2 of [RFC8054], for compressing data between an NNTP client and server ποΈ. This NNTP extension might have slightly stronger security properties than TLS-level compression [RFC3749]. That's because NNTP compression can be turned on after authentication finishes, which lowers the chances that authentication credentials get leaked through something like a Compression Ratio Info-leak Made Easy (CRIME) attack, as described in Section 2.6 of [CRIME] π. Even so, this doc neither encourages nor discourages using the NNTP COMPRESS extension π€·ββοΈ.
3.2. Protocol Versions and Security Preferences π§
News server implementations of NNTP are encouraged to support options that let admins configure 1) the minimum TLS protocol version to accept and 2) which cipher suites, signature algorithms, or groups (like elliptic curves) to use for incoming connections π‘οΈ. Other options can naturally be supported too. The goal is to let news server admins strengthen security quickly and easily if they need to, like by rejecting cipher suites that local policy considers unsafe πͺ.
News clients may also support similar options, either configurable by the user or enforced by the news reader π°.
3.3. Server Name Indication πΈ
The TLS extension for Server Name Indication (SNI), defined in Section 3 of [RFC6066], MUST be implemented by all news clients. It also MUST be implemented by any news server that is known by multiple names. Without it, a server with several hostnames can't present the right certificate to the client π₯Ί.
3.4. Prevention of SSL Stripping π¨
To help prevent SSL Stripping attacks (Section 2.1 of [RFC7457]), NNTP implementations and deployments MUST follow the recommendations in Section 3.2 of RFC 7525 [BCP195] π. Notably, if implicit TLS isn't used, news clients SHOULD attempt to negotiate TLS even when the server doesn't advertise the STARTTLS capability label in response to the CAPABILITIES command (Section 2.1 of [RFC4642]) πβ¨.
3.5. Authenticated Connections β¨
okay so [RFC4642] already has recommendations and requirements for checking certificates, whether you're checking the client's identity or the server's. Those requirements get strengthened by Appendix A.5 of this document πͺ
Wherever possible, it is best to prefer certificate-based authentication (along with Simple Authentication and Security Layer (SASL) [RFC4422]), and ensure that:
- Clients authenticate servers. π
- Servers authenticate clients. π«Ά
- Servers authenticate other peer servers. π
This document does not mandate certificate-based authentication, although such authentication is strongly preferred π As mentioned in Section 2.2.2 of [RFC4642], the AUTHINFO SASL command (Section 2.4 of [RFC4643]) with the EXTERNAL mechanism (Appendix A of [RFC4422]) MAY be used to authenticate a client once its TLS credentials have been successfully exchanged. β¨
Given the pervasiveness of eavesdropping [RFC7258], even an encrypted but unauthenticated connection might be better than an unencrypted connection π¦ (this is similar to the "better-than-nothing security" approach for IPsec [RFC5386], and in accordance with opportunistic security principles [RFC7435]). Encrypted but unauthenticated connections include connections negotiated using anonymous Diffie-Hellman mechanisms or using self-signed certificates, among others. πΈ
Note: when an NNTP server receives a Netnews article, it MAY add a <diag-match> (Section 3.1.5 of [RFC5536]), which appears as "!!" in the Path header field of that article, to indicate that it verified the identity of the client or peer server. π This document encourages the construction of such Path header fields, as described in Section 3.2.1 of [RFC5537]. π
3.6. Human Factors π§
NNTP clients SHOULD provide ways for end users (and NNTP servers SHOULD provide ways for administrators) to complete at least the following tasks, bestie:
- Determine if a given incoming or outgoing connection is encrypted using a security layer (either using TLS or an SASL mechanism that negotiates a security layer). π
- Be warned if the version of TLS used for encryption of a given stream is not secure enough. β οΈ
- If authenticated encryption is used, determine how the connection was authenticated or verified. π΅οΈββοΈ
- Be warned if the certificate offered by an NNTP server cannot be verified. π
- Be warned if the cipher suite used to encrypt a connection is not secure enough. π
- Be warned if the certificate changes for a given server. π¨
- When a security layer is not already in place, be warned if a given server stops advertising the STARTTLS capability label in response to the CAPABILITIES command (Section 2.1 of [RFC4642]), whereas it advertised the STARTTLS capability label during any previous connection within a (possibly configurable) time frame. (Otherwise, a human might not see the warning the first time, and the warning would disappear immediately after that.) π₯²
- Be warned if a failure response to the STARTTLS command is received from the server, whereas the STARTTLS capability label was advertised. π
Note that the last two tasks cannot occur when implicit TLS is used, and that the penultimate task helps prevent an attack known as "SSL Stripping" (Section 2.1 of [RFC7457]). π‘οΈ
4. Security Considerations π¨
Beyond the security considerations already described in [RFC4642], [RFC6125], and [BCP195], the following caveat is worth mentioning when not using implicit TLS: NNTP servers need to ensure that they are not vulnerable to the STARTTLS command injection vulnerability (Section 2.2 of [RFC7457]). Though this command MUST NOT be pipelined, an attacker could pipeline it. Therefore, NNTP servers MUST discard any NNTP command received between the use of STARTTLS and the end of TLS negotiation. π± This part is seriously important, so please don't skip it, periodt. π
5. IANA Considerations π
This document does not change the formal definition of the STARTTLS extension (Section 6 of [RFC4642]). Nonetheless, as implementations of the STARTTLS extension should follow this document, IANA has added reference to this document to the existing STARTTLS label in the "NNTP Capability Labels" registry contained in the "Network News Transfer Protocol (NNTP) Parameters" registry:
+----------+--------------------------+--------------------+
| Label | Meaning | Reference |
+----------+--------------------------+--------------------+
| STARTTLS | Transport layer security | [RFC4642][RFC8143] |
+----------+--------------------------+--------------------+
6. References π
6.1. Normative References π
- [BCP14] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997,
<http://www.rfc-editor.org/info/bcp14>. - [BCP195] Sheffer, Y., Holz, R., and P. Saint-Andre, "Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)", BCP 195, RFC 7525, May 2015,
<https://www.rfc-editor.org/info/bcp195>. - [RFC3977] Feather, C., "Network News Transfer Protocol (NNTP)", RFC 3977, DOI 10.17487/RFC3977, October 2006,
<http://www.rfc-editor.org/info/rfc3977>. - [RFC4422] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple Authentication and Security Layer (SASL)", RFC 4422, DOI 10.17487/RFC4422, June 2006,
<http://www.rfc-editor.org/info/rfc4422>. - [RFC4642] Murchison, K., Vinocur, J., and C. Newman, "Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP)", RFC 4642, DOI 10.17487/RFC4642, October 2006,
<http://www.rfc-editor.org/info/rfc4642>. - [RFC4643] Vinocur, J. and K. Murchison, "Network News Transfer Protocol (NNTP) Extension for Authentication", RFC 4643, DOI 10.17487/RFC4643, October 2006,
<http://www.rfc-editor.org/info/rfc4643>. - [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008,
<http://www.rfc-editor.org/info/rfc5246>. - [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008,
<http://www.rfc-editor.org/info/rfc5280>. - [RFC5536] Murchison, K., Ed., Lindsey, C., and D. Kohn, "Netnews Article Format", RFC 5536, DOI 10.17487/RFC5536, November 2009,
<http://www.rfc-editor.org/info/rfc5536>. - [RFC5537] Allbery, R., Ed. and C. Lindsey, "Netnews Architecture and Protocols", RFC 5537, DOI 10.17487/RFC5537, November 2009,
<http://www.rfc-editor.org/info/rfc5537>. - [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) Extensions: Extension Definitions", RFC 6066, DOI 10.17487/RFC6066, January 2011,
<http://www.rfc-editor.org/info/rfc6066>. - [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 2011,
<http://www.rfc-editor.org/info/rfc6125>.
6.2. Informative References π
- [CRIME] Rizzo, J. and T. Duong, "The CRIME Attack", Ekoparty Security Conference, 2012.
- [MUA-STS] Moore, K. and C. Newman, "Mail User Agent Strict Transport Security (MUA-STS)", Work in Progress, draft-ietf-uta-email-deep-06, March 2017.
- [PKI-CERT] Housley, R., Ford, W., Polk, T., and D. Solo, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3280, DOI 10.17487/RFC3280, April 2002,
<http://www.rfc-editor.org/info/rfc3280>. - [RFC3749] Hollenbeck, S., "Transport Layer Security Protocol Compression Methods", RFC 3749, DOI 10.17487/RFC3749, May 2004,
<http://www.rfc-editor.org/info/rfc3749>. - [RFC4301] Kent, S. and K. Seo, "Security Architecture for the Internet Protocol", RFC 4301, DOI 10.17487/RFC4301, December 2005,
<http://www.rfc-editor.org/info/rfc4301>. - [RFC5386] Williams, N. and M. Richardson, "Better-Than-Nothing Security: An Unauthenticated Mode of IPsec", RFC 5386, DOI 10.17487/RFC5386, November 2008,
<http://www.rfc-editor.org/info/rfc5386>. - [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 2014,
<http://www.rfc-editor.org/info/rfc7258>. - [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection Most of the Time", RFC 7435, DOI 10.17487/RFC7435, December 2014,
<http://www.rfc-editor.org/info/rfc7435>. - [RFC7457] Sheffer, Y., Holz, R., and P. Saint-Andre, "Summarizing Known Attacks on Transport Layer Security (TLS) and Datagram TLS (DTLS)", RFC 7457, DOI 10.17487/RFC7457, February 2015,
<http://www.rfc-editor.org/info/rfc7457>. - [RFC7465] Popov, A., "Prohibiting RC4 Cipher Suites", RFC 7465, DOI 10.17487/RFC7465, February 2015,
<http://www.rfc-editor.org/info/rfc7465>. - [RFC7590] Saint-Andre, P. and T. Alkemade, "Use of Transport Layer Security (TLS) in the Extensible Messaging and Presence Protocol (XMPP)", RFC 7590, DOI 10.17487/RFC7590, June 2015,
<http://www.rfc-editor.org/info/rfc7590>. - [RFC8054] Murchison, K. and J. Elie, "Network News Transfer Protocol (NNTP) Extension for Compression", RFC 8054, DOI 10.17487/RFC8054, January 2017,
<http://www.rfc-editor.org/info/rfc8054>.
Appendix A. Detailed Changes to RFC 4642 π
This section lists the detailed changes that this document applies to [RFC4642]. π
A.1. Related to TLS-Level Compression π§
The second sentence in the Abstract in [RFC4642] is replaced with the following text:
The primary goal is to provide encryption for single-link
confidentiality purposes, but data integrity, and (optional)
certificate-based peer entity authentication are also possible.
The second sentence of the first paragraph in Section 2.2.2 of [RFC4642] is replaced with the following text:
The STARTTLS command is usually used to initiate session security,
although it can also be used for client and/or server certificate
authentication.
A.2. Related to Implicit TLS π¦
okay so the third and fourth paragraphs in Section 1 of [RFC4642] get swapped out for new text, and honestly it's giving clarity π
Port 563 is reserved for NNTP over TLS and it's registered in the IANA Service Name and Transport Protocol Port Number Registry for exactly that. NNTP implementations on port 563 start TLS the second the connection opens, and only then do they move on to the first steps of an NNTP session. This immediate TLS handshake on its own port (called "implicit TLS" in this doc) is the preferred way to use TLS with NNTP π
If a host wants separate servers for transit and reading clients (Section 3.4.1 of [NNTP]), port 563 SHOULD be used for implicit TLS with the reading server. The transit server should use an unused port of its choice, and that port is NOT 433 π (sorry, I mean the port SHOULD be different than TCP port 433). Clients need to be clearly told which ports are implicit TLS, and they need to know that no plaintext gets sent before the TLS session is negotiated π₯
Some existing setups upgrade from plain to TLS mid-session on the old well-known ports 119 or 433. This spec formalizes the STARTTLS command for that. BUT, as I said above, implementations SHOULD use implicit TLS on a separate port β¨
Note: a common alternative for protecting NNTP exchanges with transit servers that don't implement TLS is IPsec with encryption [RFC4301].
Because of all that, an extra informative reference to [RFC4301] gets added to Section 7.2 of [RFC4642] π§
A.3. Related to RC4 Cipher Suites πΈ
The third paragraph in Section 5 of [RFC4642] is removed, so the RC4 stuff is gone. That means NNTP doesn't require implementing any cipher suites beyond what TLS prescribes (Section 9 of [RFC5246]) and Sections 4.2 and 4.2.1 of RFC 7525 [BCP195] π
A.4. Related to Server Name Indication π¦
The last two sentences of the seventh paragraph in Section 2.2.2 of [RFC4642] are deleted. Section 3.6 of RFC 7525 [BCP195] applies instead π
A.5. Related to Certificate Verification π
Okay, this is the big one. The text between "During the TLS negotiation" and "identity bindings)." in Section 5 of [RFC4642] gets replaced with new text, and it's super important:
During TLS negotiation, the client MUST verify the server's identity so man-in-the-middle attacks don't happen π The client MUST follow the rules and guidelines in [RFC6125]. The reference identifier MUST be the server hostname the client used to open the connection, and that hostname also has to show up in the TLS "server_name" extension [RFC6066]. There's one NNTP-specific wrinkle: DNS names in server certificates MAY contain the wildcard character "*" as the complete leftmost label in the identifier π
If the match fails, the client MUST follow the recommendations in Section 6.6 of [RFC6125] about certificate pinning and fallback π
Beyond checking server identity, clients also MUST apply the procedures in [RFC5280] for general certificate validation, like certificate integrity, signing, and path validation π
Because of this, extra normative references to [RFC5280] (which replaces [PKI-CERT], since it obsoletes it), [RFC6066], and [RFC6125] get added to Section 7.1 of [RFC4642] β¨
A.6. Related to Other Obsolete Wording π§Ή
The first two sentences of the seventh paragraph in Section 2.2.2 of [RFC4642] get deleted. There's no special requirement for NNTP about TLS Client Hello messages, so Section 7.4.1.2 and Appendix E of [RFC5246] apply π«Ά
Acknowledgments π
This document really leans on ideas from [RFC7590] by Peter Saint-Andre and Thijs Alkemade, and a big chunk of its text was borrowed from that spec π
The author would like to thank these lovely people for their ideas and support: Stephane Bortzmeyer, Ben Campbell, Viktor Dukhovni, Stephen Farrell, Sabahattin Gucukoglu, Richard Kettlewell, Jouni Korhonen, Mirja Kuehlewind, David Eric Mandelberg, Matija Nalis, Chris Newman, and Peter Saint-Andre π₯°
Special thanks to Michael Baeuerle for shepherding this document, and to the Responsible Area Director, Alexey Melnikov, for sponsoring it. They both made its quality way better π
Author's Address π¦
Julien Elie 10 allee Clovis Noisy-le-Grand 93160 France
Email: julien@trigofacile.com URI: http://www.trigofacile.com/
π¦ where this page comes from
- ietf: rfc8143 2017-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms