🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87689

SNI (RFC8143) (was: New draft for Cancel-Lock)

#87689
From: Michael Bäuerle
Date: Mon, 03 Apr 2017 11:16
124 lines
6490 bytes
Julien ÉLIE wrote:
> Michael Bäuerle wrote:
> > 
> > BTW: flnews now supports SNI as mandated by your NNTP/TLS draft
> > (RFC8143-to-be, Section 3.3):
> > <http://micha.freeshell.org/tmp/2017-03-20_flnews_TLS_SNI.png>
> 
> Oh, that's wonderful!  Thanks for having added support for SNI to flnews.

It was easier than expected because no "#ifdef" stuff was required.
The OpenSSL API for 'SSL_set_tlsext_host_name()' seems to be
undocumented, but worked from OpenSSL 1.0.0 (the oldest version
supported by flnews) up to the current OpenSSL 1.1.0.

> As for INN, it is still in the to-do list...  (RFC 4642 was already 
> mentioning SNI as a "SHOULD".)
>   https://inn.eyrie.org/trac/ticket/92

In a german test group there was the question how INN would behave
in the future when an old newsreader try to connect via TLS without SNI.
I have written that you should answer that question, but that I don't
expect some different behaviour for servers with a single name (and
only one certificate chain).

Or is there a reason to not simply ignore the missing SNI extension in
such cases?

> Incidentally, did you also implement the best current practice to try 
> STARTTLS even though not advertised?  (Section 3.4 to prevent SSL 
> stripping)

flnews doesn't support STARTTLS. I have removed it from the ToDo list
because Strict TLS is now the recommended way (I think the number of
servers that provide only STARTTLS is very small and not worth the
work).

For Strict TLS as currently implemented:
Because the user must explicitly configure the use of encryption (and
specify the service name or port for NNTPS), an accidential downgrade
to plaintext is not possible.
If the user configure no encryption by mistake, plain text client-
to-server authentication is automatically disabled.

> And warnings listed in Section 3.6?

Point 1:
See above.

Point 2:
Currently TLSv1.0 is the oldest supported version (required for backward
compatibility). The version and cipher suite are logged, so the user can
check what version is used. Example:
| 
| flnews: TLS: Using protocol: TLSv1.2 with cipher suite DHE-RSA-AES256-GCM-SHA384

Currently TLSv1.0 is considered "good enough" by flnews and no warning
is created for it.

Point 3:
Currently only plain text client-to-server authentication is supported
(and only if TLS is available).

Point 4:
The server certificate chain is checked:
| 
| flnews: TLS: Signature algorithm for key exchange: RSA-SHA512
| flnews: TLS: DH parameter size: 1024 bit
| flnews: TLS: Warning: DH parameters should be at least 3072 bit
| flnews: TLS: Certificate level 0 (Server) in chain:
| flnews: TLS:    RSA key modulus size: 2048 bit
| flnews: TLS:    Warning: RSA key modulus should be at least 3072 bit
| flnews: TLS:    Key fingerprint is SHA256:/InplDY2MR82nVE8jErYdVpBXlBYEGarMN4s1ncvQdQ=
| flnews: TLS:    +-----------------+
| flnews: TLS:    |         o ..+E  |
| flnews: TLS:    |        . o .o+  |
| flnews: TLS:    |         . ..  . |
| flnews: TLS:    |       .  .. o   |
| flnews: TLS:    |        S + o    |
| flnews: TLS:    |         X +     |
| flnews: TLS:    |        X +      |
| flnews: TLS:    |       = o       |
| flnews: TLS:    |        .        |
| flnews: TLS:    +-----------------+
| flnews: TLS:    Signature algorithm: RSA-SHA256
| flnews: TLS: Certificate level 1 in chain:
| flnews: TLS:    RSA key modulus size: 2048 bit
| flnews: TLS:    Warning: RSA key modulus should be at least 3072 bit
| flnews: TLS:    Signature algorithm: RSA-SHA256
| flnews: TLS: Certificate level 2 in chain:
| flnews: TLS:    RSA key modulus size: 2048 bit
| flnews: TLS:    Warning: RSA key modulus should be at least 3072 bit
| flnews: TLS:    Signature algorithm: RSA-SHA256
| flnews: TLS: Certificate level 3 (Root) in chain:
| flnews: TLS:    RSA key modulus size: 2048 bit
| flnews: TLS:    Warning: RSA key modulus should be at least 3072 bit
| flnews: TLS:    Self signature is not used
| flnews: TLS: Server certificate:
| flnews: TLS:    Subject Alternative Name: individual.de (doesn't match hostname)
| flnews: TLS:    Subject Alternative Name: news.individual.de (matches hostname)
| flnews: TLS: Server certificate verification successful (revocation checks were skipped)

The warning thresholds above are "128 Bit symmetric equivalent"
(3072 Bit for RSA and DH).

CRL based revocation checks are implemented too (EXPERIMENTAL), but
do not work well in real world for some servers. Sometimes the "CRL
distribution point" entries are missing in the certificates and/or the
download servers are very slow.

Point 5:
This is honored by allowing the user to configure "strong" or "weak"
encryption mode. In "strong" mode only cipher suites with forward-
secrecy are negotiated (and no weak algorithms like RC4). The "weak"
mode offers "TLS_RSA_WITH_RC4_128_MD5" as required by RFC4642.

Point 6:
This is currently not implemented. But if the servers public key
changes, at least the fingerprint and randomart image as quoted
above will change.

Points 7/8:
Not relevant because flnews has no support for STARTTLS.

Technical Details
Message-ID: <AABY4i8RItIAABFl.A1.flnews@WStation5.stz-e.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <AABYvbRwKe8AABT3.A1.flnews@WStation5.stz-e.de> <o9pvj1$8t4$1@news.trigofacile.com> <AABY2VtaEvAAAAlu.A1.flnews@WStation5.stz-e.de> <obo8jp$pml$1@news.trigofacile.com> <AABY3+a8UgUAAFne.A1.flnews@WStation4.micha.freeshell.org> <obrkgp$i7d$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <AABY4i8RItIAABFl.A1.flnews@WStation5.stz-e.de>
Subject: SNI (RFC8143) (was: New draft for Cancel-Lock)
Date: Mon, 3 Apr 2017 13:16:33 +0200
From: Michael Bäuerle <michael.baeuerle@stz-e.de>
References: <AABYvbRwKe8AABT3.A1.flnews@WStation5.stz-e.de> <o9pvj1$8t4$1@news.trigofacile.com> <AABY2VtaEvAAAAlu.A1.flnews@WStation5.stz-e.de> <obo8jp$pml$1@news.trigofacile.com> <AABY3+a8UgUAAFne.A1.flnews@WStation4.micha.freeshell.org> <obrkgp$i7d$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Lines: 122
Reply-To: Michael Bäuerle <michael.baeuerle@gmx.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net W3h/q8c4enUXzIO+aQriswvRoKERlbanBqBftQBcg/l/mtZpLi
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:ZRehbTEOyk/2X+afMpiz7wgEjBs= sha1:qg1BQgDqZni8oXOw+xNr2xj6jAk=
Injection-Date: Mon, 3 Apr 2017 11:16:33 -0000
User-Agent: flnews/0.15pre12 (for NetBSD)
X-Received-Bytes: 6302
X-Received-Body-CRC: 289648238