🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #48793

Re: Authenticating with perl hooks

#48793
From: Russ Allbery
Date: Wed, 18 Oct 2000 00:00
38 lines
2677 bytes
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.

What you want to do is create the situation where if the user attempts to
either read or post, they'll get an "authentication required" response,
right?  Does it work to respond in authenticate saying that neither
posting nor reading is allowed but returning 200 as the response code?

(Hm... I see that the Perl auth hook documentation says that you can
return 480 in response to a connection.  I'm not sure that's a valid thing
to do in the protocol.)

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

Technical Details
Message-ID: <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
References: <slrn8uouuj.5vv.tpennick@extra.axion.bt.co.uk> <yl1yxfxtym.fsf@windlord.stanford.edu> <slrn8uriqb.5to.tpennick@extra.axion.bt.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <ylem1em3jk.fsf@windlord.stanford.edu>
Subject: Re: Authenticating with perl hooks
Date: Wed, 18 Oct 2000 00:00:00 +0000
From: Russ Allbery <rra@stanford.edu>
References: <slrn8uouuj.5vv.tpennick@extra.axion.bt.co.uk> <yl1yxfxtym.fsf@windlord.stanford.edu> <slrn8uriqb.5to.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
X-Deja-AN: 682986637
Content-Type: text/plain; charset=us-ascii
Organization: The Eyrie
Mime-Version: 1.0
User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)
Newsgroups: news.software.nntp