🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #86927

Re: help please - readers.conf setup + authentication via port 563

#86927
From: Julien ÉLIE
Date: Sun, 30 Aug 2015 13:50
123 lines
5595 bytes
Hi Paul,

>> Is there a special reason for using port 563?
>> I mean:  do you need a secure session (whatever the port) or do you need
>> a secure session via port 563 only?
>
> Well, no, other than the fact the documentation for nnrpd seemed to
> suggest that if I wanted to offer TLS then I should set it up on TCP port
> 563. I was unaware I could offer it on port 119 as well??

How your suggestion of improvement could be taken into account?
Maybe in the "TLS SUPPORT" section of the documentation for nnrpd?

Currently:
"Most news clients currently do not use the STARTTLS command, however, 
and instead expect to connect to a separate port (563) and start a TLS 
negotiation immediately."

Suggestion:
"There are two common ways for a news client to negotiate a TLS 
connection:  either via the use of the STARTTLS command on the usual 
NNTP port (119) or via the now discouraged way (per RFC 4642) to 
immediately negotiate an encrypted session upon connection on a 
dedicated port (usually 563).  As most news clients currently do not use 
the STARTTLS command, and instead expect to connect to a separate port 
(563) and start a TLS negotiation immediately, it is still useful to 
provide a legacy way for these news clients to encrypt the NNTP session."



> Curious, the TLS Support section of the nnrpd docs do not make this clear.

Well, not necessarily "curious" but just not up-to-date or not clear 
enough :)

Suggestions of improvement are welcome on all our documentation, so 
please do not hesitate to share your comments!



> So the full like should like the following ..
>
> nntps stream tcp nowait news /usr/lib/news/bin/nnrpd -c /etc/news/readers-
> ssl.conf -S
>
> Is that correct?

Hmm...  Sound also like there is a typo in the nnrpd documentation 
because "nnrpd" appears twice in the line!
That line looks right to me.  Do you confirm it works fine for you?  (no 
need to add a call to the "tcpd" wrapper before nnrpd?  does it work for 
both tcp4 and tcp6?)

I for one do not use inetd.conf but an init.d script that runs nnrpd in 
daemon mode.



>> auth "users-ssl" {
>>       hosts: "*"
>>       auth: "ckpasswd -f /home/news/etc/users-ssl"
>> }
>>
>> access "users-ssl" {
>>       newsgroups: "*"
>>       access: RPAN
>> }
>
> Thank you for the above, can this also be used for non TLS logins?

Yes, though the name "users-ssl" is not the best for that!



> I mean even if you had a filename with user:password in it and the
> password had been encrypted by using something like htpassword would a
> user be able to login using plain unencrypted port 119?

Yes he would be able to authenticate.



> By adding a line like auth: "ckpasswd -f /home/news/etc/users-ssl" into an
> auth group that didn't have "require_ssl: true" enabled?

Also.
Anyway, that behaviour depends on the implementation of the news client 
software.  You can't forbid a client to try to authenticate on an 
unencrypted connection...  A well-behaved news client could warn that he 
did not manage to negotiate a TLS connection and maybe ask whether it 
should try to authenticate anyway.



> Also do you know if the use of quotation marks is needed when setting a
> key? so is it key: "keyname" or is key: keyname ok to do?

If there is no space in the string, it is OK not to use quotation marks.



>> If you do not want to use ckpasswd, you can of course use other kinds of
>> authentication (via perl_auth or python_auth for instance).  The
>> passwords will have to be somewhere anyway (file or database) unless you
>> wish to use SASL mechanisms like OPENID20 but I doubt all your users
>> will be able to easily authenticate against your news server!
>
> It's all beyond me how to set something like this up but it seems like if
> I want a user to be able to login and create their own account and
> password I would have to set something like this up?

Not necessarily.  You could also automatically add a new "user:pass" or 
"user:pass:comment" line at the end of your users file fater the 
creation of an account.

-- 
Julien ÉLIE

« Utiliser vi n'est pas un péché, c'est une punition. Car souvenez-
   vous que vi-vi-vi est l'éditeur de la Bête. » (Stallman, Church of
   Emacs)

Technical Details
Message-ID: <mrv1na$89u$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
References: <mrrhtp$ekm$3@news.bbs.geek.nz> <mrsin1$gmg$1@news.trigofacile.com> <mrtm20$nog$1@news.bbs.geek.nz>

Show Full Headers
Complete Article Headers
Message-ID: <mrv1na$89u$1@news.trigofacile.com>
Subject: Re: help please - readers.conf setup + authentication via port 563
Date: Sun, 30 Aug 2015 15:50:34 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <mrrhtp$ekm$3@news.bbs.geek.nz> <mrsin1$gmg$1@news.trigofacile.com> <mrtm20$nog$1@news.bbs.geek.nz>
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
Organization: TrigoFACILE -- http://www.trigofacile.com/
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 30 Aug 2015 13:50:34 +0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="aaubervilliers-651-1-145-42.w86-212.abo.wanadoo.fr:86.212.128.42";
 logging-data="8510"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0)
 Gecko/20100101 Thunderbird/38.2.0
In-Reply-To: <mrtm20$nog$1@news.bbs.geek.nz>
X-Received-Body-CRC: 350628057
X-Received-Bytes: 5559