🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
8 messages
8 total messages Started by Daniel Fri, 03 Jan 2003 20:53
nnrpd_auth hooks and "A"pproved header access
#62727
Author: Daniel
Date: Fri, 03 Jan 2003 20:53
26 lines
1498 bytes
Inn 2.3.3, standalone news server, using nnrpd_auth.py (not
readers.conf).

Is there an equivalent to "access: A" in readers.conf using the
nnrpd_auth.py hook?  inews is returning: "Can't send article to the
server: 441 You are not allowed to approve postings."  I even tried
temporarily adding a

auth "everyone" {
    hosts: "*"
    default: "<everyone>"
}

access "everyone" {
    users: "<everyone>"
    newsgroups: "*"
    access: RPA
}

to readers.conf, but that didn't help either.  I read through the
python/perl hook documentation, but only saw stuff about allow/deny
read/post, not approve.

Thanks for any help,
~ Daniel
Re: nnrpd_auth hooks and "A"pproved header access
#62726
Author: Jeffrey M. Vinocur
Date: Fri, 03 Jan 2003 21:05
44 lines
2710 bytes
In article <1d4cf4c3.0301031253.34e8d3b5@posting.google.com>,
Daniel <backwardthinker@juno.com> wrote:
>Inn 2.3.3, standalone news server, using nnrpd_auth.py (not
>readers.conf).
>
>Is there an equivalent to "access: A" in readers.conf using the
>nnrpd_auth.py hook?

Sadly, I don't think so.  Two thoughts, though:

- In CURRENT (which will be released as 2.4 soon), there is
  support for this in the Perl hook, using the perl_access
  parameter (which allows the Perl hook to dynamically generate
  an access block that can contain any field a regular access
  block does).

  Similar functionality for Python is in the works, but I
  understand is behind a bit of a roadblock at the moment.

- Are you sure you need to use the Python hook?  Would writing a
  readers.conf authenticator *in* Python suffice for your needs?
  (The benefits of the Perl/Python hooks that come to mind are
  that they can easily maintain state between users for things
  like limiting simultaneous connection by one user, and permit
  dynamic generation of the list of groups to be accessed.  If
  you're only verifying usernames/passwords in some fashion, you
  can probably work just fine with a standalone authenticator.  I
  have some documentation on the interface if this sounds useful.)
  

>I even tried temporarily adding [...] to readers.conf

Right, in 2.3 you have to use the hooks *instead* of
readers.conf.  We're moving towards being able to use them
simultaneously (this is the perl_access stuff I discussed above).

Of course, if you just want to allow all your users to be able to
approve posts, you could patch the source easily enough.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: nnrpd_auth hooks and "A"pproved header access
#62790
Author: Daniel
Date: Sun, 05 Jan 2003 00:23
38 lines
2710 bytes
> - In CURRENT (which will be released as 2.4 soon), there is
>   support for this in the Perl hook, using the perl_access
>   parameter (which allows the Perl hook to dynamically generate
>   an access block that can contain any field a regular access
>   block does).
> 
>   Similar functionality for Python is in the works, but I
>   understand is behind a bit of a roadblock at the moment.

Understandable, more developers probably work with perl.

> - Are you sure you need to use the Python hook?  Would writing a
>   readers.conf authenticator *in* Python suffice for your needs?
>   (The benefits of the Perl/Python hooks that come to mind are
>   that they can easily maintain state between users for things
>   like limiting simultaneous connection by one user, and permit
>   dynamic generation of the list of groups to be accessed.  If
>   you're only verifying usernames/passwords in some fashion, you
>   can probably work just fine with a standalone authenticator.  I
>   have some documentation on the interface if this sounds useful.)

This sounds interesting, but I think I need the hook.  nnrpd_auth.py
was enforcing some ACLish like rules, with users and priveledges
varying from group to group.  So my guess is, the authenticator alone
won't cut it.

> Of course, if you just want to allow all your users to be able to
> approve posts, you could patch the source easily enough.

Only a process using inews on the host should be allowed to approve
posts, but it sounds like since I need the hook, I'll have to change
the default access block to allow approving.  Unless you can see some
way around that?  I don't think I have any other choice at this point,
though, until 2.4.

Thanks a lot for your help,
~ Daniel
Re: nnrpd_auth hooks and "A"pproved header access
#62800
Author: Jeffrey M. Vinocur
Date: Sun, 05 Jan 2003 03:24
56 lines
3285 bytes
In article <1d4cf4c3.0301041623.6d8534e6@posting.google.com>,
Daniel <backwardthinker@juno.com> wrote:
> 
>>   Similar functionality for Python is in the works, but I
>>   understand is behind a bit of a roadblock at the moment.
>
>Understandable, more developers probably work with perl.

Well, it's not even that.  Erik (who did the nifty Perl stuff
recently) also did the same for Python, but there's something odd
going on when support for both is compiled in.  So until we track
that down, the Python improvements are on hold.


>> - Are you sure you need to use the Python hook? [...]
>
>This sounds interesting, but I think I need the hook.  nnrpd_auth.py
>was enforcing some ACLish like rules, with users and priveledges
>varying from group to group.  So my guess is, the authenticator alone
>won't cut it.

Yup, I'd say you're right.  (A lot of people started using the
Perl hook pre-2.3, when it was the only way to do any remotely
complex authentication.  With the introduction of readers.conf,
I'm not sure people realize that that is no longer the case.  So
I wanted to be sure.)


>> Of course, if you just want to allow all your users to be able to
>> approve posts, you could patch the source easily enough.
>
>Only a process using inews on the host should be allowed to approve
>posts, but it sounds like since I need the hook, I'll have to change
>the default access block to allow approving.  Unless you can see some
>way around that?

Ho hum.  I can think of different places you could hack at it,
but I'm not sure it's worth the trouble.  Note that up through
2.3.2, all users were always allowed to approve posts.  So unless
you actually anticipate abuse, it's probably no big deal.  (Note
that most GUI newsreaders make it pretty hard to add Approved
headers in the first place.)


>I don't think I have any other choice at this point,
>though, until 2.4.

Are you happy switching to the Perl hook?  What you can download
as a nightly snapshot at the moment is quite similar to what will
become 2.4, and so you might consider working with that.  (Many
people do run versions from the CURRENT tree.)

-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: nnrpd_auth hooks and "A"pproved header access
#62841
Author: Daniel
Date: Mon, 06 Jan 2003 12:28
19 lines
1722 bytes
jeff@litech.org (Jeffrey M. Vinocur) wrote in message news:<av88gr$vbm$2@puck.litech.org>...
> Note that up through
> 2.3.2, all users were always allowed to approve posts.  So unless
> you actually anticipate abuse, it's probably no big deal.
 
Yeah, I was glad to see the change was made.  I'll be fine without it,
though.

> Are you happy switching to the Perl hook?  What you can download
> as a nightly snapshot at the moment is quite similar to what will
> become 2.4, and so you might consider working with that.  (Many
> people do run versions from the CURRENT tree.)

Sticking with python and allowing the headers is the best route for me
to take right now.

Thanks,
~ Daniel
Re: nnrpd_auth hooks and "A"pproved header access
#62846
Author: Jeffrey M. Vinocur
Date: Mon, 06 Jan 2003 18:30
15 lines
1616 bytes
In article <1d4cf4c3.0301060428.967f1aa@posting.google.com>,
Daniel <backwardthinker@juno.com> wrote:
>
>Sticking with python and allowing the headers is the best route for me
>to take right now.

By the way, if you have nnrpdauthsender on, it would be really
easy to write a Perl or Python posting hook that rejects articles
containing Approved headers unless the Sender is a certain value.
(Or you could filter on NNTP-Posting-Host, I think.)

-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: nnrpd_auth hooks and "A"pproved header access
#62850
Author: Daniel
Date: Mon, 06 Jan 2003 19:56
15 lines
1727 bytes
jeff@litech.org (Jeffrey M. Vinocur) wrote in message news:<av88gr$vbm$2@puck.litech.org>...
> >> Of course, if you just want to allow all your users to be able to
> >> approve posts, you could patch the source easily enough.

I should have asked this... seems there should be a command-line arg
or option in inn.conf to restore the daemon's old behaviour of
accepting approved posts by default.  I didn't see anything in the man
pages for innd or inn.conf, or in the documentation within the
configuration file itself.  Is readers.conf or a recompile the only
way with inn-2.3.3 (or later versions), barring the perl hook in
CURRENT?

Thank you,
Daniel
Re: nnrpd_auth hooks and "A"pproved header access
#62862
Author: Jeffrey M. Vinocur
Date: Tue, 07 Jan 2003 01:57
40 lines
2435 bytes
In article <1d4cf4c3.0301061156.329b787b@posting.google.com>,
Daniel <backwardthinker@juno.com> wrote:
>jeff@litech.org (Jeffrey M. Vinocur) wrote in message
>news:<av88gr$vbm$2@puck.litech.org>...
>> >> Of course, if you just want to allow all your users to be able to
>> >> approve posts, you could patch the source easily enough.
>
>I should have asked this... seems there should be a command-line arg

Eek!


>or option in inn.conf to restore the daemon's old behaviour of
>accepting approved posts by default.

This is probably true, I suspect no one thought of it at the
time.  I doubt it will get changed in 2.3.x at this point,
but see below.


>Is readers.conf or a recompile the only way with inn-2.3.3 (or
>later versions), barring the perl hook in CURRENT?

I think so.

However, we're currently discussing eliminating access: entirely
in favor of a bunch of boolean parameters, say "allownewnews",
"allowihave", "allowapproved", and "allowlocalposting" (the R and
P functionality is provided by read: and post:).  And I would
certainly see the benefit of making the defaults for all of those
set in inn.conf -- anyone object?

That would probably be done before the (Real Soon Now) INN 2.4
release, which may suffice.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads