🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
8 messages
8 total messages Started by John F. Morse Fri, 01 Sep 2006 16:58
Multiple access authentication
#74166
Author: John F. Morse
Date: Fri, 01 Sep 2006 16:58
76 lines
3410 bytes
Is there a way to set up (readers.conf?) a method to authenticate groups 
of users for multiple access rights, as opposed to restricting access to 
just authorized and anonymous?

For instance:

Users 1-100 have access to the "city.*" "county.*" and "state.*" groups 
(all groups on the server).

Users 101-200 have access to only the "city.*" groups.

Users 201-300 have access to only the "county.*" groups.

Users 301-400 have access to only the "city.*" and "county.*"groups.

Users 401-500 have access to only the "city.*" and "state.*" groups.

Users 501-600 have access to only the "county.*" and "state.*" groups.

Anonymous users have access to only the "state" groups.

In the above example, user numbers represent a list of authorized users, 
of any size, and not a numerical list.

If necessary, the same username/password could appear in more than one 
password list to allow access to multiple group hierarchies.

I was thinking along the lines of several auth stanzas, each having a 
different "password" filename, such as:

auth "city" {
        hosts: "*"
        auth: "/usr/lib/news/bin/auth/passwd/ckpasswd -f 
/var/lib/news/password_city"
        default: "<anonymous>"
}

auth "state" {
        hosts: "*"
        auth: "/usr/lib/news/bin/auth/passwd/ckpasswd -f 
/var/lib/news/password_county"
        default: "<anonymous>"
}

etc.

This would obviously require multiple "password*" files. The access 
stanzas are more difficult for me to grasp. Something along the idea of:

access "city" {
        users: "*"
        read: "city.*,!junk,!control,!control.c*,!control.n*,!control.r*"
        post: 
"city.*,!junk,!control,!control.c*,!control.n*,!control.r*,!local.announce"
}

access "county" {
        users: "*"
        read: "county.*,!junk,!control,!control.c*,!control.n*,!control.r*"
        post: 
"county.*,!junk,!control,!control.c*,!control.n*,!control.r*,!local.announce"
}

etc.

I have a feeling this won't work, and it sure looks overly complicated 
for something that should be as simple as a netmask. ;-)

Could someone please supply an example configuration text for auth and 
access stanzas (if readers.conf is the proper place for this) -- or a 
better idea?

TIA.

-- 
John
Re: Multiple access authentication
#74167
Author: Jeffrey M. Vinocur
Date: Fri, 01 Sep 2006 21:39
78 lines
4161 bytes
In article <UEZJg.6067$mY1.3609@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>Users 1-100 have access to the "city.*" "county.*" and "state.*" groups 
>Users 101-200 have access to only the "city.*" groups.
>Users 201-300 have access to only the "county.*" groups.
>Users 301-400 have access to only the "city.*" and "county.*"groups.
>Users 401-500 have access to only the "city.*" and "state.*" groups.
>Users 501-600 have access to only the "county.*" and "state.*" groups.
>Anonymous users have access to only the "state" groups.

Okay, I see what you want.


>I was thinking along the lines of several auth stanzas, each having a 
>different "password" filename, such as:

This doesn't work, because only one auth block can be applied to
a given connection.  You can have multiple auth: lines in a
single auth block, but doing that with multiple `ckpasswd -f`
lines is really no different from having them all in one big
password file -- you have no way to tell which file the username
was located in, so you can't switch on it.

I believe you have three options:

  1.  If you don't mind keeping the user list in one place and
      the grouping information separate, and you have a
      relatively small number of users, you can just do one
      password file, one auth block, and then a bunch of access
      blocks each one with a users: line listing all of the users
      that should match that access block.  This is quick to set
      up, but perhaps a little tedious to maintain over time,
      since you have to update two different lists to add a new
      user.

  2.  If your needs are simple enough that you can encode the
      grouping information in the username somehow, and don't
      mind exposing that to your users, you can just do one auth
      block and multiple access blocks with wildcards.  Like,
      your users would be bob@all, jimmy@state, mary@state,
      sam@county, and so on.  You could put them all in one
      password file, and then do:

        auth everybody {
          hosts: *
          auth: ckpasswd -f foo
        }

        access state {
          users: *@state
          groups: state.*
        }

        access all {
          users: *@all
          groups: *
        }

        etc

      Of course, you can use whatever you want in the usernames;
      it doesn't need to correspond to the names of the
      hierarchies or the names of the access blocks, and it
      doesn't need to be decipherable by the users.  This is easy
      for you to maintain, but a bit inelegant in that it's
      exposed to the users -- and if you wanted to give one user
      more access rights later, you'd have to change his username
      (and make him update it in his newsreader config).

  3.  The general-purpose solution is probably to use the Perl or
      Python hooks.  But then you'd have to write a little
      code...so hopefully one of the other ideas will help you.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Multiple access authentication
#74169
Author: John F. Morse
Date: Sat, 02 Sep 2006 03:35
158 lines
6955 bytes
Jeffrey M. Vinocur wrote:

>In article <UEZJg.6067$mY1.3609@bgtnsc05-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>  
>
>>Users 1-100 have access to the "city.*" "county.*" and "state.*" groups 
>>Users 101-200 have access to only the "city.*" groups.
>>Users 201-300 have access to only the "county.*" groups.
>>Users 301-400 have access to only the "city.*" and "county.*"groups.
>>Users 401-500 have access to only the "city.*" and "state.*" groups.
>>Users 501-600 have access to only the "county.*" and "state.*" groups.
>>Anonymous users have access to only the "state" groups.
>>    
>>
>
>Okay, I see what you want.
>  
>


It was an attempt to show I need anonymous people to be able to read a 
new "local.info" group so they can obtain information on how to obtain 
authentication via e-mail. I'm considering moving the server back to 
port 119 from a "secret" port where it provided some security before 
authentication was initiated.

Then I wanted the current authenticated users to have total access 
(except control and control.*, plus read-only for the local.info and the 
current local.announce groups).

Finally, any new user who obtains authentication should have access to 
the same groups as the current authenticated users -- except the 
original five newsgroups. I don't think the original posters would want 
their five years worth of whatever read by whomever. IOW, I respect 
their privacy.

I would be the only person able to post in the l.info and l.announce 
groups, and the only person who can cancel messages, should Cleanfeed 
miss some filth (which it does). I have this figured out (I think) with 
innflags: -C in the inn.conf file. If the -C also stops me, I could 
always rm the offending article from the group in the spool, then let 
the nightly expiration fix whatever is needed.


>>I was thinking along the lines of several auth stanzas, each having a 
>>different "password" filename, such as:
>>    
>>
>
>This doesn't work, because only one auth block can be applied to
>a given connection.  You can have multiple auth: lines in a
>single auth block, but doing that with multiple `ckpasswd -f`
>lines is really no different from having them all in one big
>password file -- you have no way to tell which file the username
>was located in, so you can't switch on it.
>  
>


Understood.


>I believe you have three options:
>
>  1.  If you don't mind keeping the user list in one place and
>      the grouping information separate, and you have a
>      relatively small number of users, you can just do one
>      password file, one auth block, and then a bunch of access
>      blocks each one with a users: line listing all of the users
>      that should match that access block.  This is quick to set
>      up, but perhaps a little tedious to maintain over time,
>      since you have to update two different lists to add a new
>      user.
>  
>


This might work, but could end up a lot of work.

A growing password file of inactive people is not as important as a 
growing readers.conf file's access block(s), with their 8191 (8180) 
character limitation on one line only.

If I have many users and a line reaches => 8180 characters (plus 
commas), then could I use multiple users: lines, all within the same 
access block?

If not, could I duplicate the access block, with additional users in the 
users: line(s)?

(I see no info in the man pages for either of these ideas.)


>  2.  If your needs are simple enough that you can encode the
>      grouping information in the username somehow, and don't
>      mind exposing that to your users, you can just do one auth
>      block and multiple access blocks with wildcards.  Like,
>      your users would be bob@all, jimmy@state, mary@state,
>      sam@county, and so on.  You could put them all in one
>      password file, and then do:
>
>        auth everybody {
>          hosts: *
>          auth: ckpasswd -f foo
>        }
>
>        access state {
>          users: *@state
>          groups: state.*
>        }
>
>        access all {
>          users: *@all
>          groups: *
>        }
>
>        etc
>
>      Of course, you can use whatever you want in the usernames;
>      it doesn't need to correspond to the names of the
>      hierarchies or the names of the access blocks, and it
>      doesn't need to be decipherable by the users.  This is easy
>      for you to maintain, but a bit inelegant in that it's
>      exposed to the users -- and if you wanted to give one user
>      more access rights later, you'd have to change his username
>      (and make him update it in his newsreader config).
>  
>


This doesn't sound like something I'd care to mess with, and it isn't 
secure since users can see the usernames.

You know the saying "Locks keep out honest people...." ;-)

Undesirables are usually good pickers of locks.


>  3.  The general-purpose solution is probably to use the Perl or
>      Python hooks.  But then you'd have to write a little
>      code...so hopefully one of the other ideas will help you.
>


A "little" code to you is a nightmare to me. ;-)

I sometimes can barely read Perl, just to get an idea of what is 
supposed to be happening. Today I learned what the MY local expr meant, 
previously thinking it meant "me" (ie referring to "INN" itself, and not 
a peer) when seeing it used in conf files. Now I know one and only one 
thing about Perl.

Maybe a volunteer will step up, or someone hungry for whom I can buy a 
steak dinner?

-- 
John
Re: Multiple access authentication
#74172
Author: Jeffrey M. Vinocur
Date: Sat, 02 Sep 2006 20:30
94 lines
4807 bytes
In article <c_6Kg.27458$5i3.18707@bgtnsc04-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>Jeffrey M. Vinocur wrote:
>
>>Okay, I see what you want.
>
>It was an attempt to show I need anonymous people to be able to read a 
>new "local.info" group so they can obtain information on how to obtain 
>authentication via e-mail.

It would've been better if you'd just said what you wanted in the
first place, btw.


>Then I wanted the current authenticated users to have total access 
>(except control and control.*, plus read-only for the local.info and the 
>current local.announce groups).

Okay, about how many users is this?


>I would be the only person able to post in the l.info and l.announce 
>groups,

I think the best way to do this is to make them moderated, rather
than trying to force it into readers.conf.


>I have this figured out (I think) with innflags: -C in the
>inn.conf file. If the -C also stops me [...]

Yes, no cancel messages will be processed when you use -C, no
matter who they're from.  It's fine to do it that way, but
instead of just deleting the articles from the spool, I'd
recommend using `ctlinnd cancel` (since it will update the
history file, and also just requires the Message-ID rather than
locating the actual file).

The other thing you could do is configure Cleanfeed to drop
cancel messages from anyone besides you.


>>  1.  If you don't mind keeping the user list in one place and
>>      the grouping information separate, and you have a
>>      relatively small number of users, you can just do one
>>      password file, one auth block, and then a bunch of access
>>      blocks each one with a users: line listing all of the users
>>      that should match that access block.
>
>This might work, but could end up a lot of work.
>
>A growing password file of inactive people is not as important as a 
>growing readers.conf file's access block(s), with their 8191 (8180) 
>character limitation on one line only.

Right.  That's why the "small number of users" caveat above.

You can't use multiple users: lines per block or duplicate the
block entirely, as far as I know.  The conf parser does support
the use of \ but taking a quick glance at the source, I don't
being able to backslash-escape newlines helps you in this
situation.

If you're a small amount over, you could certainly change the
appropriate part of options.h and recompile, but that doesn't
help if your list is going to keep going.

Anyway, to get back to what I was alluding to above, if your
(already defined and unchanging) list of -original- users is
small enough to fit in readers.conf, you can do a variation of
what I was describing where you list them, and list yourself, and
then everybody else falls into a wildcard group.  Would that
work?


>>  2.  If your needs are simple enough that you can encode the
>>      grouping information in the username somehow, and don't
>>      mind exposing that to your users, you can just do one auth
>>      block and multiple access blocks with wildcards.  Like,
>>      your users would be bob@all, jimmy@state, mary@state,
>>      sam@county, and so on.
>
>This doesn't sound like something I'd care to mess with, and it isn't 
>secure since users can see the usernames.

It is secure, actually.  The entire username, including the part
at the end, is in the password file, and so the user can only
authenticate using the entire thing.  Simply changing the suffix
and using the same password would result in Access denied.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Multiple access authentication
#74173
Author: John F. Morse
Date: Sat, 02 Sep 2006 23:00
206 lines
8360 bytes
Jeffrey M. Vinocur wrote:

>In article <c_6Kg.27458$5i3.18707@bgtnsc04-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>  
>
>>Jeffrey M. Vinocur wrote:
>>
>>    
>>
>>>Okay, I see what you want.
>>>      
>>>
>>It was an attempt to show I need anonymous people to be able to read a 
>>new "local.info" group so they can obtain information on how to obtain 
>>authentication via e-mail.
>>    
>>
>
>It would've been better if you'd just said what you wanted in the
>first place, btw.
>  
>


It took me a little more thinking to solidify my actual needs into an 
understandable idea. ;-)

My mind was disassembling other programs which use bit flags, masks, 
etc. Sorry.


>>Then I wanted the current authenticated users to have total access 
>>(except control and control.*, plus read-only for the local.info and the 
>>current local.announce groups).
>>    
>>
>
>Okay, about how many users is this?
>  
>


40.


>>I would be the only person able to post in the l.info and l.announce 
>>groups,
>>    
>>
>
>I think the best way to do this is to make them moderated, rather
>than trying to force it into readers.conf.
>  
>


I already did this, at least for l.announce. I just now did a ctlinnd 
newgroup local.info m. creating the l.info group

In the active file I now have:

 ...
local.announce 0000000014 0000000011 m
local.info 0000000000 0000000001 m
local.test 0000000120 0000000110 y
 ...


In the moderators file I added the local.info group, and now have:

 ...
## Added by JFM 200609021650

local.announce:newsmaster@my.net
local.info:newsmaster@my.net

## Public hierarchies with exceptions.
 ...

The "newsmaster" address does not really have an account on my local 
mail server. However it is routed to an existing mail account by the 
server's router. Many "throwaway" accounts are routed to only a few real 
accounts, so I don't need to check but a few mailboxes.


>>I have this figured out (I think) with innflags: -C in the
>>inn.conf file. If the -C also stops me [...]
>>    
>>
>
>Yes, no cancel messages will be processed when you use -C, no
>matter who they're from.  It's fine to do it that way, but
>instead of just deleting the articles from the spool, I'd
>recommend using `ctlinnd cancel` (since it will update the
>history file, and also just requires the Message-ID rather than
>locating the actual file).
>
>The other thing you could do is configure Cleanfeed to drop
>cancel messages from anyone besides you.
>  
>


I'll need to examine this and see if I can figure it out and make the 
changes. I was working on Cleanfeed but got sidetracked with Suck. I 
couldn't understand how to compile/install it, so I wound up throwing 
the duty onto the RumorMill server on a PowerMac 7600, and streaming the 
news into INN.

Then I had to install and configure BIND so I could shut down QuickDNS 
Pro on a PowerMac 8500. I had to move ntpd and Fetchmail from one Debian 
box to another. And I had to take care of my sick wife for a couple of 
weeks. Now whatever I did learn has evaporated. <sigh>

At nearly 62, I am beginning to wonder if I can still learn like I did 
30 years ago, when I taught myself assembly, BASIC, Pascal, Fortran, 
etc. My eyesight is outta sight, and I think my brain has stiffened due 
to age, but I know if I don't keep trying, it will slowly harden up and 
be useless. I have notes everywhere, but finding them sometimes is a 
challenge.

Getting Suck going is a priority, so I can kill RumorMill and the 
PowerMac 7600. Fine-tuning Cleanfeed is also on my list. Then I'll move 
on to Sendmail, so I can kill the remaining server, SIMS (MTA), on the 
PowerMac 8500. These Macs are over ten years old and have been running 
24/7 for nearly ten years. I can't afford to replace them with new Macs, 
when I can run Linux applications on garage sale boxes. ;-)


>>> 1.  If you don't mind keeping the user list in one place and
>>>     the grouping information separate, and you have a
>>>     relatively small number of users, you can just do one
>>>     password file, one auth block, and then a bunch of access
>>>     blocks each one with a users: line listing all of the users
>>>     that should match that access block.
>>>      
>>>
>>This might work, but could end up a lot of work.
>>
>>A growing password file of inactive people is not as important as a 
>>growing readers.conf file's access block(s), with their 8191 (8180) 
>>character limitation on one line only.
>>    
>>
>
>Right.  That's why the "small number of users" caveat above.
>
>You can't use multiple users: lines per block or duplicate the
>block entirely, as far as I know.  The conf parser does support
>the use of \ but taking a quick glance at the source, I don't
>being able to backslash-escape newlines helps you in this
>situation.
>
>If you're a small amount over, you could certainly change the
>appropriate part of options.h and recompile, but that doesn't
>help if your list is going to keep going.
>
>Anyway, to get back to what I was alluding to above, if your
>(already defined and unchanging) list of -original- users is
>small enough to fit in readers.conf, you can do a variation of
>what I was describing where you list them, and list yourself, and
>then everybody else falls into a wildcard group.  Would that
>work?
>  
>


I think it would work. If all 40 won't fit, I could probably drop a few 
of them, like the lurkers who have never posted. Or better, move them 
into the new users classification. Then the list of still-active 
old-timers would be around half the size, and would be manageable, if 
ever needed to be. There should never be a need for any additions.


>>> 2.  If your needs are simple enough that you can encode the
>>>     grouping information in the username somehow, and don't
>>>     mind exposing that to your users, you can just do one auth
>>>     block and multiple access blocks with wildcards.  Like,
>>>     your users would be bob@all, jimmy@state, mary@state,
>>>     sam@county, and so on.
>>>      
>>>
>>This doesn't sound like something I'd care to mess with, and it isn't 
>>secure since users can see the usernames.
>>    
>>
>
>It is secure, actually.  The entire username, including the part
>at the end, is in the password file, and so the user can only
>authenticate using the entire thing.  Simply changing the suffix
>and using the same password would result in Access denied.
>


I see what you mean. I had thought someone would only need to see the 
name in the From: field to forge access, but I forgot about the password 
would still be required.

I don't want to change the user's names though. They are their real 
names, or they chose them and probably have reasons for those handles.

Thanks for the ideas, Jeff. I do appreciate your help very much.

-- 
John
Re: Multiple access authentication
#74171
Author: Jeffrey M. Vinocur
Date: Sun, 03 Sep 2006 00:20
111 lines
4924 bytes
In article <j2oKg.11946$mY1.3564@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>Jeffrey M. Vinocur wrote:
>
>>In article <c_6Kg.27458$5i3.18707@bgtnsc04-news.ops.worldnet.att.net>,
>>John F. Morse <xanadu.bbs@invalid.net> wrote:
>>  
>>>Jeffrey M. Vinocur wrote:
>>>    
>>Okay, about how many users is this?
>
>40.

Oh, you can probably fit that.  If not, you can bump the
hardcoded limit up a little bit without too much trouble.


>local.announce 0000000014 0000000011 m
>local.info 0000000000 0000000001 m
>local.test 0000000120 0000000110 y

Exactly.


>local.announce:newsmaster@my.net
>local.info:newsmaster@my.net

You actually could just do local.*, I believe.  The file will be
ignored for the unmoderated groups.


>The "newsmaster" address does not really have an account on my local 
>mail server. However it is routed to an existing mail account by the 
>server's router. Many "throwaway" accounts are routed to only a few real 
>accounts, so I don't need to check but a few mailboxes.

That's fine -- it's only there as a backup anyway; you just
configure your newsreader to add the Approved header when you
want to post to those groups (and make sure you're in a special
access block in readers.conf with "access: RPA"), and you'll
never see email to those groups.  Well, unless one of your users
tries to post there.


>I'll need to examine this and see if I can figure it out and make the 
>changes. I was working on Cleanfeed but got sidetracked with Suck.

For the sake of avoid needless work, I'd leave the -C for now,
use `ctlinnd cancel` when you need it, and come back to this
issue if you find it's happening enough that you'd like a more
fine-grained control over who can send cancel messages.


>At nearly 62, I am beginning to wonder if I can still learn like I did 
>30 years ago, 

You're doing pretty well so far!

We get people in here trying to learn how to use INN all the
time, and I think half of them give up after the first day.


>>You can't use multiple users: lines per block or duplicate the
>>block entirely, as far as I know.

Wait!  I completely take this back!

I got confused with the previous conversation about whether you
could have multiple auth blocks using different password files.

You -absolutely- can split a long list of users: across multiple
access blocks.  Just put them right next to each other, and make
them identical other than the users: line, and it will do exactly
what you want.  That's much easier than recompiling, if you bump
into the size limit.


>I see what you mean. I had thought someone would only need to see the 
>name in the From: field to forge access, but I forgot about the password 
>would still be required.
>
>I don't want to change the user's names though. They are their real 
>names, or they chose them and probably have reasons for those handles.

Oh sure, that's definitely an inelegant solution.  I just wanted
to offer it since it would be very easy to implement.

And honestly, you could be pretty subtle about it -- leave all
the existing people exactly as they are (with no "@" sign at
all), and start giving out new addresses that simply all have the
domain name of your server at the end.  I do something very
similar, actually:

    access "nonlitech" {
        users: "*"
        newsgroups: ...
    }

    access "litech" {
        users: "*@litech.org"
        newsgroups: ...
    }

and so I can segregate which groups are visible to people that
have @litech.org on the end of their usernames from everybody
else.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Multiple access authentication
#74177
Author: John F. Morse
Date: Mon, 04 Sep 2006 00:09
56 lines
3024 bytes
Jeffrey M. Vinocur wrote:

>And honestly, you could be pretty subtle about it -- leave all
>the existing people exactly as they are (with no "@" sign at
>all), and start giving out new addresses that simply all have the
>domain name of your server at the end.  I do something very
>similar, actually:
>
>    access "nonlitech" {
>        users: "*"
>        newsgroups: ...
>    }
>
>    access "litech" {
>        users: "*@litech.org"
>        newsgroups: ...
>    }
>
>and so I can segregate which groups are visible to people that
>have @litech.org on the end of their usernames from everybody
>else.
>

Understood.

This brings up another question:

I have the following access stanza in readers.conf (it is the bottom, or 
last entry):

access "public" {
        users: "<anonymous>"
        read: 
"local.*,!brisbee,!computers,!petchat,!raucouscaucus,!soapbox,!control.ch*,!control.n*,!control.r*"
        post: 
"local.*,!brisbee,!computers,!petchat,!raucouscaucus,!soapbox,!control.ch*,!control.n*,!control.r*"
}

Since the "read:" and "post:" lines are identical, I probably should 
have originally used "newsgroups:" instead. Also, the control groups 
could have been "control.*" for the same result. Furthermore, since 
"control.cancel" (or "control.c*") was overlooked, it wasn't "blocked," 
per se, but neither was it authorized; read on....]

Anyway, could this be simplified to:

access "public" {
        users: "<anonymous>"
        read: "local.info"
}

To keep the unauthenticated from doing anything other than reading that 
one local.info group?

-- 
John
Re: Multiple access authentication
#74180
Author: Jeffrey M. Vinocur
Date: Mon, 04 Sep 2006 14:53
19 lines
1587 bytes
In article <f9KKg.16715$mY1.1143@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>Anyway, could this be simplified to:
>
>access "public" {
>        users: "<anonymous>"
>        read: "local.info"
>}
>
>To keep the unauthenticated from doing anything other than reading that 
>one local.info group?

Yup!


-- 
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