🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #51067

Re: Setting up Readers.conf

#51067
From: Russ Allbery
Date: Wed, 07 Mar 2001 23:18
78 lines
3978 bytes
Rebecca Ore <rebecca@ogoense.net> writes:

> I was able to add one outside reader who had no problem posting to a
> test group, but on adding additional outside readers using the same
> pattern, I found those readers couldn't get the list of groups from my
> server.

> I added key: <authgroup>.  One of the earlier setups still works from a
> different domain name, but I haven't tested individual users again.

Normally you don't need to use key.  Generally, key is only necessary or
useful when you assign the same user identity to multiple users but still
need to distinguish between them somehow.  It's usually easier to just
avoid ever assigning one user identity to more than one person.

> I'm trying something like this:

> auth "username" {
>         hosts: "*.domain.com, *.domain.net "
>         default: "<user>"
>         key: <username>
>         default-domain: "domain.com, *domain.net"
> }

That isn't how default-domain works; default-domain is the domain that's
appended to the assigned user identity if that assigned identity doesn't
contain an @ sign.  In this case, I think that results in a user identity
of literally "<user>@domain.com, *domain.net", which is a little odd.

I think what you want here is:

auth "username" {
    hosts: "*.domain.com, *.domain.net"
    default: "username@domain.com"
}

with no default-domain or key, and then, if you don't assign that same
full identity to any other user, an access group like:

access "username" {
    users: "username@domain.com"
    newsgroups: "net.*"
    access: "Read Post"
}

should do what you want.  As long as the hosts keys of the auth groups are
non-overlapping and you generate a different user identity string for each
user, you can just keep adding more auth and access groups, one per user,
for each additional user that you're authenticating via incoming address
like this.

> I'll eventually modify this to include authentication by username and
> password, but want to get this particularly part right first as I
> understand that adding user name/password authentication will be just a
> configuration line pointing to the database, and I'll still need to have
> what each user can read and post to configured, too.

When you add password authentication, the difference will be that your
auth stanza will look like:

auth "username" {
    hosts: "*.domain.com, *.domain.net"
    auth: "ckpasswd -f /path/to/password/file"
    default-domain: "domain.com"
}

This is where you want to use default-domain, since ckpasswd just returns
the bare username that they authenticated as and you want to add on the
domain to make sure that that user identity is unique and therefore maps
to one and only one access group (if I understand the intended structure
correctly).

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

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <yl7l21cgnk.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!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail
References: <m3u255gyk3.fsf@pyrophore.ogoense.net>

Show Full Headers
Complete Article Headers
Message-ID: <yl7l21cgnk.fsf@windlord.stanford.edu>
Subject: Re: Setting up Readers.conf
Date: Wed, 07 Mar 2001 23:18:07 +0000
From: Russ Allbery <rra@stanford.edu>
References: <m3u255gyk3.fsf@pyrophore.ogoense.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.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 77
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 984007088 24008 171.64.13.23 (7 Mar 2001 23:18:08 GMT)
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)