🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #62968

Re: [attn client authors] Multiple AUTHINFOs per session

#62968
From: Curt Welch
Date: Wed, 08 Jan 2003 18:46
78 lines
5306 bytes
Russ Allbery <rra@stanford.edu> wrote:
> Curt Welch <curt@kcwc.com> writes:
>
> > My server happens to allow switching the user multiple times in a
> > session.  The user doesn't switch when the AUTHINFO USER command
> > happens, so you can send the AUTHINFO USER, then go back to doing
> > normal newsrading stuff, and send the AUTHINFO PASS at any time later.
> > If you get the pass right, it switches, if you get it wrong, it
> > disconnects. You can send multiple AUTHINFO USER commands as well with
> > no effect. The arg is just stored away and remebered for later use when
> > the AUTHINFO PASS command happens.
>
> Do you happen to know whether anyone actually uses this capability?

I have no idea.  I would doubt that any real clients make use of it, but
I've never tried to check to be sure.  I've never seen a newsreader that
would allow you to enter multiple user names and passwords for the same
server and I can't think of any reason for doing so.  I've only used it
when using telnet for debugging reasons.

> We're trying to figure out how to handle this.  Requiring the server be
> able to handle it looks like a bad idea.

It's easy to support if the code is built into the server, but if you try
to structure your server so a front end application authenticates and then
passes the connection to the real server (and the server it gets passed to
might be different based on the authtentication) it could be close to
impossible to support.  I don't see a need for allowing it so it seems fine
to me to tell clients they must not try to authenticate twice on the same
connection.

> Other options are saying that
> you can't do this (in which case, the server is still free to handle it
> if the client sends it anyway, of course, but the client's not supposed
> to), advertising as an extension whether you can do it or not, or not
> advertising and making the client just try and returning an error code if
> they can't reauthenticate.
>
> My personal inclination at the moment is to say that the results of
> sending multiple AUTHINFO in the same session is undefined, meaning that
> the server is free to reject it or to accept it but that the client can't
> rely on it and should just open a new session if it wants to do this
> portably, but running a close second would be just advertising an
> extension saying whether or not you can do it.

It's tricky because if a lot of servers allow it some client might start
using it and then problems happen when they use a server which doesn't
allow it.  You get into those "the RFC says my server is right", vs "but
every other server works with this application so you need to fix your
server" arguments.

I think it might be better to decide one way or the other which it should
do and force everyone to do the same thing instead of leaving it mostly
"undefined".

The entire NNTP authentication system has always struck me as bizarre and
bac-asward to start with.  It should have been set up as a "front-door"
system in the first place.  A server which requires authentication should
return a code (like 480) in the banner which tells the client it must
authenticate before it can do anything and then return 500 codes for any
commands not yet valid if they try to use them before authenticating.  And
once authenticated, it should not be allowed to reauthenticate on the same
connection.  Connections are not so expensive that you need to re-use them
like that.  It's not like a dial-up connection where the client may only
have one modem to work with and a hang-up and re-connect will take many
seconds.

The whole concept of having to try to do something real (like a group
command) to try and find out if the server wants you to authenticate is
just plain wrong.

But trying to fix something like this which was done wrong to start with is
not always so easy...

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20030108134614.601$kR@newsreader.com>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.stealth.net!news.stealth.net!newshosting.com!news-xfer1.atl.newshosting.com!feed2.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <avdbi3$mhk$2@puck.litech.org> <avduo3.16s.1@Heiko.Studt.dialin.t-online.de> <ylbs2s944d.fsf@windlord.stanford.edu> <20030107233154.829$xY@newsreader.com> <ylk7hggpko.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <20030108134614.601$kR@newsreader.com>
Subject: Re: [attn client authors] Multiple AUTHINFOs per session
Date: Wed, 08 Jan 2003 18:46:14 +0000
From: curt@kcwc.com (Curt Welch)
References: <avdbi3$mhk$2@puck.litech.org> <avduo3.16s.1@Heiko.Studt.dialin.t-online.de> <ylbs2s944d.fsf@windlord.stanford.edu> <20030107233154.829$xY@newsreader.com> <ylk7hggpko.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.stealth.net!news.stealth.net!newshosting.com!news-xfer1.atl.newshosting.com!feed2.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com 9BosB_X03N4DZLvedjGIwNJX1K7OzKNVV@5g_mrfEO_N+i
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
  %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 77