🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by themf Mon, 13 Jun 2005 15:25
NNTP authentication question (continued)
#71856
Author: themf
Date: Mon, 13 Jun 2005 15:25
20 lines
2084 bytes
Hello again,
Sorry for the delay, but I was ill the last couple of days and couldn't
get to the Internet - just didn't feel like LOOKING at a computer
screen, but anyway, I've figured out what's happening, yes I did manage
to get a bit of what Pan was sending :)

What happens is - Pan sends a AUTHINFO USER and PASS, which results in
the first 381 and 281, at which point innd says the "posting OK" bit,
and then does a MODE READER, whereupon the server requires
authentication again (says so), and Pan does, indeed, do -ANOTHER-
AUTHINFO USER and PASS, which is successfully using the Unix usernames
and passwords (going through if it's correct or 502-ing if its not).
It looks like my Innd is set up to allow everyone in, except if they
are a newsreader, whereupon it'll require authentication (seems a bit
topsy-turvy to me, I thought you required authentication *to* post),
but anyway, what do I do to rectify this?


Thanks very much.
Re: NNTP authentication question (continued)
#71857
Author: Russ Allbery
Date: Mon, 13 Jun 2005 15:54
42 lines
3188 bytes
themf <themf@graffiti.net> writes:

> What happens is - Pan sends a AUTHINFO USER and PASS, which results in
> the first 381 and 281, at which point innd says the "posting OK" bit,
> and then does a MODE READER, whereupon the server requires
> authentication again (says so), and Pan does, indeed, do -ANOTHER-
> AUTHINFO USER and PASS, which is successfully using the Unix usernames
> and passwords (going through if it's correct or 502-ing if its not).

Ah, okay, semi-bug in Pan.  (Well, not that it's really Pan's fault, as
this part of NNTP is badly documented -- the new standard will clear this
up.)

If you're going to do MODE READER, it should be done as the very first
command of the session, before any authentication, since if MODE READER is
actually needed and successful, it will discard your authentication.

There was (is?) unfortunately a bug in Diablo that led people to think it
should be done in some other order, but this has always been the case with
INN and INN is the only implementation that actually requires MODE READER
in some circumstances.  If you get an authentication required response to
MODE READER, you can just ignore it and continue since no implementation
that actually requires that command will ever send such a response.

> It looks like my Innd is set up to allow everyone in, except if they are
> a newsreader, whereupon it'll require authentication (seems a bit
> topsy-turvy to me, I thought you required authentication *to* post), but
> anyway, what do I do to rectify this?

Narrow down your incoming.conf configuration to only those hosts that
should actually be peers.  Anyone connecting who's not listed in
incoming.conf will get handed off to nnrpd immediately and won't need to
send MODE READER.

Even better, run transit news and reader connections on separate ports,
but that requires more setup.

-- 
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.
Re: NNTP authentication question (continued)
#71860
Author: themf
Date: Tue, 14 Jun 2005 15:42
46 lines
3039 bytes

Russ Allbery wrote:

> If you're going to do MODE READER, it should be done as the very first
> command of the session, before any authentication, since if MODE READER is
> actually needed and successful, it will discard your authentication.

Sorry, I don't understand this  - MODE READER is to specify to Innd
that you're a newsreader, yes? Why would that not need or "discard" any
authentication?
It's *if* you're a newsreader that auth is wanted, like I said.......?


> There was (is?) unfortunately a bug in Diablo that led people to think it

What is Diablo?

> should be done in some other order, but this has always been the case with
> INN and INN is the only implementation that actually requires MODE READER
> in some circumstances.  If you get an authentication required response to
> MODE READER, you can just ignore it and continue since no implementation
> that actually requires that command will ever send such a response.
>

Um, I'm confused....... - I *WANT* there to be authentication if a
newsreader connects, using the Unix usernames, the point of this whole
thread.....? I just want it to happen from the beginning, instead of
the first 381 and 281.
What do I do?
(and of course, I can't control how Pan behaves, or any other reader
like Outlook Express that my clients can be using, they're just
production software already out there.......?)


>
> Narrow down your incoming.conf configuration to only those hosts that
> should actually be peers.  Anyone connecting who's not listed in
> incoming.conf will get handed off to nnrpd immediately and won't need to
> send MODE READER.

There are no peers. The only people connecting to my server will be
newsreaders.

So what do I do?
Re: NNTP authentication question (continued)
#71861
Author: Russ Allbery
Date: Tue, 14 Jun 2005 18:55
74 lines
4274 bytes
themf <themf@graffiti.net> writes:
> Russ Allbery wrote:

>> If you're going to do MODE READER, it should be done as the very first
>> command of the session, before any authentication, since if MODE READER
>> is actually needed and successful, it will discard your authentication.

> Sorry, I don't understand this - MODE READER is to specify to Innd that
> you're a newsreader, yes?

Right.

> Why would that not need or "discard" any authentication?

Because if you authenticate before sending MODE READER, you're
authenticating to a completely different program than the program you'll
be talking to after sending MODE READER, and the authentication
information doesn't carry over.  First the client should send MODE READER,
*then* it should send the authentication.  (I realize that you can't
change the client behavior; see below.)

>> There was (is?) unfortunately a bug in Diablo that led people to think

> What is Diablo?

It's another news server implementation that doesn't actually do anything
(important) when sent MODE READER, but which unfortunately had MODE READER
in the set of commands that required authentication for a while.

>> If you get an authentication required response to MODE READER, you can
>> just ignore it and continue since no implementation that actually
>> requires that command will ever send such a response.

> Um, I'm confused....... - I *WANT* there to be authentication if a
> newsreader connects, using the Unix usernames, the point of this whole
> thread.....?

I understand.  Your news reader should first send MODE READER, ignoring
the server response, and then send authentication.  Right now, it's
authenticating first and then sending MODE READER, which doesn't work.
This isn't something you can fix unless you're the author of Pan; the only
thing you can do is make it so that MODE READER isn't required at all.

> I just want it to happen from the beginning, instead of the first 381
> and 281.

381 and 281 *is* the authentication process.

> (and of course, I can't control how Pan behaves, or any other reader
> like Outlook Express that my clients can be using, they're just
> production software already out there.......?)

I understand.

>> Narrow down your incoming.conf configuration to only those hosts that
>> should actually be peers.  Anyone connecting who's not listed in
>> incoming.conf will get handed off to nnrpd immediately and won't need
>> to send MODE READER.

> There are no peers. The only people connecting to my server will be
> newsreaders.

Then make sure that no host other than localhost has permissions in
incoming.conf.  I assume that the reader connections aren't coming from
localhost?

Basically, these symptoms probably mean that the permissions granted in
your incoming.conf configuration file are too broad.

-- 
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.
Re: NNTP authentication question (continued)
#71892
Author: themf
Date: Fri, 17 Jun 2005 13:00
13 lines
1684 bytes

Russ Allbery wrote:

> Then make sure that no host other than localhost has permissions in
> incoming.conf.  I assume that the reader connections aren't coming from
> localhost?

Yes, I might well decide to read the news on my computer - how else am
*I* supposed to read it?

What do I do?
Re: NNTP authentication question (continued)
#71880
Author: Russ Allbery
Date: Fri, 17 Jun 2005 17:47
34 lines
2459 bytes
themf <themf@graffiti.net> writes:
> Russ Allbery wrote:

>> Then make sure that no host other than localhost has permissions in
>> incoming.conf.  I assume that the reader connections aren't coming from
>> localhost?

> Yes, I might well decide to read the news on my computer - how else am
> *I* supposed to read it?

You connect to your public hostname rather than to localhost.

> What do I do?

Well, as I see it, you have three options:

 * Restrict access to your transit server so that reader connections
   aren't mistaken for transit connections.

 * Run the transit server on port 433 instead of 119 by changing port in
   inn.conf and then run nnrpd separately via inetd or the like.  Then
   configure any software that's feeding the server to use port 433
   instead.

 * Get a news reader that isn't broken and does MODE READER and
   authentication in the right order.

I guess a fourth option would be to use a different news server than INN.

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