🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #48809

Re: Authenticating with perl hooks

#48809
From: Tim Pennick
Date: Thu, 19 Oct 2000 00:00
44 lines
3275 bytes
On 18 Oct 2000 11:01:51 -0700, Russ Allbery <rra@stanford.edu> wrote:
>Tim Pennick <tpennick@extra.axion.bt.co.uk> writes:
>
>> Using the amended example supplied in
>> ..../news/bin/filter/nnrpd_auth.pl, I assumed that my nnrp.access file
>> should carry the 'broadbrush' access restrictions.  If a user tries to
>> gain access to a group to which this file doesn't give them access, I
>> assumed that nnrp would issue a "Needs Authorisation" to the client,
>> which would then reply with an authinfo, which as I understand it,
>> supplies the user/password information.  This is then pased to a new
>> call to 'authenticate', with the type attribute set to 'authenticate"
>> rather than 'connect'.  This would then query the users.cdb file in the
>> case of the example I'm using.
>
>Yes.  That's the way that it should work.  LIST commands won't return the
>"needs authorization" replies, though.  The protocol is kind of icky in
>that area.
>
>If you exclude groups in nnrp.access, I don't believe that the client will
>get any sort of useful "authentication required" message if they try to
>access those groups; instead, the groups will just appear to not exist at
>all.  I'm a lot more familiar with how this works in INN 2.3 than in INN
>2.2, so I'm not sure how much help I can be in this area.  I think this is
>a lot more straightforward to do with INN 2.3, so if upgrading is an
>option, you may want to consider that.

Sorry Russ, I AM using 2.3.  Maybe its the references to nnrp.access that
threw you of the scent.  This is the file that the example nnrpd_auth.pl file
uses, and so I have re-instated it, as (if I understand correctly),
readers.conf is disabled when you switch on NNRP_PERLAUTH in inn.conf.  Maybe
the docs aren't up-to-date, but the way I understand things is that:

Whatever happens within the 'authenticate' function, (assuming perl
authentication is switched on and readers.conf is therefore ignored) if the
authenticate function responds with "200 1 1 * 0" to a call which passed the
'connect' rather than 'authenticate' type attribute, the client should have
full access to the groups carried by the server.  I can't get this bit working
as no groups are visible at all.

Regards,

Tim Pennick

Technical Details
Message-ID: <slrn8uu2r6.405.tpennick@extra.axion.bt.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <slrn8uouuj.5vv.tpennick@extra.axion.bt.co.uk> <yl1yxfxtym.fsf@windlord.stanford.edu> <slrn8uriqb.5to.tpennick@extra.axion.bt.co.uk> <ylem1em3jk.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8uu2r6.405.tpennick@extra.axion.bt.co.uk>
Subject: Re: Authenticating with perl hooks
Date: Thu, 19 Oct 2000 00:00:00 +0000
From: tpennick@extra.axion.bt.co.uk (Tim Pennick)
References: <slrn8uouuj.5vv.tpennick@extra.axion.bt.co.uk> <yl1yxfxtym.fsf@windlord.stanford.edu> <slrn8uriqb.5to.tpennick@extra.axion.bt.co.uk> <ylem1em3jk.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 683416480
X-Complaints-To: postmaster@axion.bt.co.uk
X-Trace: pheidippides.axion.bt.co.uk 971967293 21026 132.146.88.22 (19 Oct 2000 14:54:53 GMT)
Organization: BT Adastral Park, Martlesham Heath, Ipswich, UK
User-Agent: slrn/0.9.6.3 (SunOS)
Reply-To: Tim Pennick <tpennick@axion.bt.co.uk>
NNTP-Posting-Date: 19 Oct 2000 14:54:53 GMT
Newsgroups: news.software.nntp