🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #72428

Re: Authentication advice

#72428
From: Jeffrey M. Vinocur
Date: Sun, 09 Oct 2005 01:55
196 lines
9173 bytes
In article <hOI1f.391338$5N3.11756@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>Jeffrey M. Vinocur wrote:
>
>>In article <4k31f.378909$5N3.296970@bgtnsc05-news.ops.worldnet.att.net>,
>>John F. Morse <xanadu.bbs@invalid.net> wrote:
>>  
>>
>It's not complex and not necessarily confusing. It's just there is not 
>quite enough information available to easily find what is needed. Once 
>it is found, then it is easier to find it again later -- usually. ;-)

Right...and some of that is because the documentation is unclear,
and some because manpages aren't a great for all forms of
documentation, but I think a lot of is just that INN has a
complicated architecture and complicated documentation to go with
it.  I don't think writing step-by-step guides for every possible
configuration anybody might want is a feasible way to improve it,
though (but see below).

Also, some of it is because the documentation hasn't been
overhauled lately.  I did a pass over it several years ago trying
to clarify the worst of the unclear parts, but even at the time I
wasn't aiming for ideal.

BTW, if you (or anyone else) want to submit patches to any part
of the documentation, even if they aren't the parts that I
personally would have worked on first, we'd probably love to have
them.


>Maybe there are too many "placeholders" for something a user must 
>provide, with no examples for a real-world configuration.

Okay, your observation that we sometimes use angle-brackets in
the actual syntax but sometimes use them as placeholders is a
really good one.  That's definitely unclear and should be
clarified.


>I'd love to see more #examples/explanations and #lines if necessary.

I think more full-fledged working examples would be wonderful.
Right now we've got essentially a single well-commented example
for each file and that's it.

What do you think about putting this in the INN source tree (say
in contrib/samples/*) vs having it up on the web?


>     default: "<localhost>"
>
>On the last line, just what does "<localhost>" mean? Is it the literal 
>word "localhost" or something else (regarding the L.T. and G.T. marks)?

Ah.  Good question.  In readers.conf identity strings, we use the
angle brackets as a convention to create special values that
wouldn't ever accidentally conflict with usernames.  So the
example you quoted assigns an identity of "<localhost>"
(including the angle brackets but not including the quotes).  The
point being, if you just used "localhost" and somebody one day
created a user in your password file whose username happened to
be "localhost" then they'd conflict and cause some subtle bug.

In the newsfeeds file, we distinguish special feed names with
exclamation points (!) to keep them from conflicting with
anything that could ever appear in a Path: header as an actual
site name.  But that convention is no good in readers.conf,
because the readers.conf usernames get used in wildmat patterns
like "*,!foo" and so some other punctuation is required.


>------------------------------------------------------------------------
>
>A user identity, as established by an auth group, looks like an e-mail 
>address; in other words, it's in the form
>       "<username>@<domain>" (or sometimes just "<username>" if no 
>domain is specified.
>
>       An auth group definition looks like:
>
>           auth <name> {
>               hosts: <host-wildmat>
>               auth: <auth-program>
>               res: <res-program>
>               default: <defuser>
>               default-domain: <defdomain>
>               # ...possibly other settings
>           }
>
>
>       The <name> is used as a label for the group and is only for 
>documentation purposes.  (If your syslog configuration records the 
>"news.debug" facility, the <name> will appear in the debugging output of 
>nnrpd.  Examining that output can be very helpful in understanding why 
>your configuration doesn't do what you expect it to.)
>
>------------------------------------------------------------------------
>
>So, this tells me I could use any identifying word? They show the "<" 
>and ">" around the ID, and Russ' "INN 2.4 Documentation" doesn't. 
>Possibly this is confusion. ;-)

I don't understand what difference you see between the manpage
and the online documentation, honestly.

In the example above, the angle brackets are all placeholders.

Keep in mind that the initial/example configuration files
installed by INN are all functional.  So if you don't see any
angle brackets in them, they definitely aren't required.


>Just what does INN define the characters "<" and ">" as?

They aren't special characters from INN's point of view per se.
Some places in the documentation they are used as place holders,
and some places we use them, by convention, as a way to divide up
a namespace into parts that can't possibly conflict.


>Are they the values I should provide, like "brisbee"? Do they
>need to match anywhere, like a label and a target?

The documentation should tell you the answer to this in a
specific case.  Some things need to match (like feed names in the
newsfeeds file and in innfeed.conf), and some don't, and there's
no way to know except reading the documentation.


>Another thing that confuses me is readers.conf scanning downward through 
>the file, then back upward until it finds a match.
>
>It seems odd why it doesn't just use the first match it finds? Or why 
>doesn't it just start at the bottom, if the downward scan is apparently 
>not used? (Notice my use of the word "apparently" here.) ;-)

I'm not sure what exactly you're confused about here.
Conceptually, the options are first match or last match; in this
case last match makes sense from a usability point of view (as in
many other parts of INN).

The actual implementation details shouldn't concern you at all,
if that's what you're thinking about.  There are several ways to
implement a find-the-last-match feature, but regardless the
user-visible semantics are the same.  (It is, of course,
impossible to "just start at the bottom" for a text-based config
file like that until it's been read once in the usual way and
parsed into some internal data structure.)


>I cannot remember reading anything about the order in a horizontal line. 
>I "presume" left to right. (More below.)

It's implied by the use of "wildmat" throughout the readers.conf
documentation.  You should read the uwildmat(3) manpage.


>Xanadu is part of an e-mail address on several mail servers, but I don't 
>use it as a Linux or INN user name. I will plug in my real username, if 
>it is secure from outsiders (i.e. access from the LAN only, or 
>authenticated by a password)?

There's no magic here...

The users: line in a readers.conf access block is matched against
the identity assigned by the auth blocks.  In the file I posted,
the only way to be assigned an identity of "xanadu" is for that
call to ckpasswd to validate "xanadu" as a user in the password
file you created.


>Theory question: So readers.conf reads the "!control.*" but does not act 
>on it before finishing the line, and taking the last command (i.e. it 
>reads left to right)? I changed both appearances, and it and it seems to 
>work this way.

Yes, see uwildmat(3) as mentioned above.


>Speaking of control.cancel, can this operation be shut off or ignored on 
>a server, so messages are not able to be canceled, say for archival or 
>historical purposes?

You're looking for the -C flag described in innd(8).  (Since you
don't run innd directly, you have to supply its flags via the
"innflags" line in inn.conf.)

You also could use the `archive` utility supplied with INN (see
the corresponding manpage) to write an archival copy out to disk;
cancels are never applied to an archive created that way.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <di9taq$18d$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.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news.litech.org!not-for-mail
References: <2b9f5$4335ae05$4097152a$18719@EVERESTKC.NET> <4k31f.378909$5N3.296970@bgtnsc05-news.ops.worldnet.att.net> <di692n$4th$2@puck.litech.org> <hOI1f.391338$5N3.11756@bgtnsc05-news.ops.worldnet.att.net>

Show Full Headers
Complete Article Headers
Message-ID: <di9taq$18d$1@puck.litech.org>
Subject: Re: Authentication advice
Date: Sun, 09 Oct 2005 01:55:38 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <2b9f5$4335ae05$4097152a$18719@EVERESTKC.NET> <4k31f.378909$5N3.296970@bgtnsc05-news.ops.worldnet.att.net> <di692n$4th$2@puck.litech.org> <hOI1f.391338$5N3.11756@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.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 196
Sender: jeff@litech.org
NNTP-Posting-Host: puck.litech.org
X-Trace: puck.litech.org 1128822938 1293 66.218.0.75 (9 Oct 2005 01:55:38 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Sun, 9 Oct 2005 01:55:38 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)