Article View: news.software.nntp
Article #74167Re: Multiple access authentication
From: Jeffrey M. Vinocur
Date: Fri, 01 Sep 2006 21:39
Date: Fri, 01 Sep 2006 21:39
78 lines
4161 bytes
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
Technical Details
Message-ID:
<eda9ah$gkj$1@puck.litech.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!statler.nntpserver.com!news.glorb.com!news.litech.org!not-for-mailReferences:
<UEZJg.6067$mY1.3609@bgtnsc05-news.ops.worldnet.att.net>Show Full Headers
Complete Article Headers
Message-ID: <eda9ah$gkj$1@puck.litech.org> Subject: Re: Multiple access authentication Date: Fri, 01 Sep 2006 21:39:29 +0000 From: jeff@litech.org (Jeffrey M. Vinocur) References: <UEZJg.6067$mY1.3609@bgtnsc05-news.ops.worldnet.att.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!statler.nntpserver.com!news.glorb.com!news.litech.org!not-for-mail Newsgroups: news.software.nntp Organization: Litech Systems Design Lines: 78 Sender: jeff@litech.org NNTP-Posting-Host: puck.litech.org X-Trace: puck.litech.org 1157146769 17043 66.218.0.75 (1 Sep 2006 21:39:29 GMT) X-Complaints-To: usenet@litech.org NNTP-Posting-Date: Fri, 1 Sep 2006 21:39:29 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: jeff@litech.org (Jeffrey M. Vinocur)