Article View: news.software.nn
Article #11409ATTN: John; NNTP Protocol discussion (was Re: Replace Google Groups with ?)
From: Aaron W. Hsu
Date: Mon, 06 Aug 2012 18:56
Date: Mon, 06 Aug 2012 18:56
124 lines
7260 bytes
7260 bytes
Hey John: Thanks for this discussion. I hope we can stick with it as it is generating a lot of useful information and it's improving NN as well. Firstly, I want to address the protocol discussion that we are having, which I have included below in snipped fashion. I think we are disagreeing about what the correct protocol responses for servers should be. I am using the RFC 3977 document from here as a reference: https://tools.ietf.org/html/rfc3977 You have a server configured to allow read-only, unauthenticated access. You have a limited set of groups that you want to allow read access to, above and beyond the basic restriction that the users who are unauthenticated cannot post. You are doing two things that affect NN: first, you send different listings for unauthenticated and authenticated users; second, you always send the 200 code as the initial greeting. Let's consider the first (different listings). If, instead of giving a different groups listing to unauthenticated users, you gave the same group listing in both cases, you could still limit read and write access to specific groups, because an attempt to read the group would result in an access denied message. NN user's would see the groups, but would authenticate when trying to get to one that was restricted. (Incidently, I am addressing the groups access in absence of a complete listing in a separate message.) In the RFC, I get this information from section 3.2.1: The server MUST respond to any command with the appropriate one of the following generic responses if it represents the situation. [...] If the client is not authorized to use the specified facility when the server is in its current state, then the appropriate one of the following response codes MUST be used. [...] 480: The client must authenticate itself to the server (that is, it must provide information as to the identity of the client) before the facility can be used on this connection. This code will prompt NN to ask for authentication, which will happen when it tries to access your restricted groups. Now, the second issue is the initial greeting. Here is section 5.1.1 from the RFC: Responses [1] 200 Service available, posting allowed 201 Service available, posting prohibited 400 Service temporarily unavailable [2] 502 Service permanently unavailable [2] [1] These are the only valid response codes for the initial greeting; the server MUST not return any other generic response code. Notably, 201 is the code to send when you are not allowing posting on the server, but you sill want to give access. The way I am reading the RFC, your server should send 201 as its initial greeting, as the client is initially unauthenticated and thus has not posting priveleges. Now, at that point, NN will see the 201, and try an authentication to see if it can get a 200 code instead by authenticating. "John F. Morse" <john@example.invalid> writes: >200 server ready - posting allowed. Sent by the server upon initiation >of the session, if the client is allowed to post messages. >In the case of a read-only newsgroup, the client is not allowed to post, >but that is beyond the initial connect stage. Attempts to post will be >blocked when the article post command is given. Perhaps one of these?: >440 posting not allowed. POST command issued when posting is not allowed. >502 access restriction or permission denied. Permission denied; sent if >the client has not properly authenticated but the server requires it. [...] >I think your problem is you believe "posting" comes before "reading" -- >or in this case "accessing." >Nobody can post if they can't get there in the first place. If they can >get there, but posting in that group is prohibited (a "read-only" >group), then there is no 201 issued. >201 server ready - no posting allowed. Sent by the server upon >initiation of the session, if the client is not allowed to post messages. >Getting in the "posting door" requires authentication, as well as access >into a group that allows posting or is moderated. If you can't get in >the door, then the server has no idea who you are, nor if you are >allowed to post. >It does allow you to read any group that is assigned anonymous access >privileges though. Since you are connected as an anonymous reader, you >remain that until the connection is terminated. >The initial 200 code is all NN knows, so it will not authenticate. It >must be forced with a command option so the user can use it when needed >for those servers that do require authentication. >Again, you and I see the problem is NN won't ask for authentication if a >server has issued the 200 response code. >The reason the 200 is sent by INN (probably other NNTP/NNRP servers >also) is there are one or more newsgroups available for unauthenticated >connections. This is how I provide anyone access to a limited number of >groups (actually only one) so they can obtain some information on how to >apply for an account. [...] >I know what you are saying. My server gives the 200 because it allows >non-authenticated readers -- to one group only -- and that group is >read-only, so they cannot post. The initial 200 connect response is not >repeated after connection. -- Aaron W. Hsu | arcfide@sacrideo.us | http://www.sacrideo.us Programming is just another word for the lost art of thinking.
Technical Details
Message-ID:
<D_mdnR8f6ZXpjr3NnZ2dnUVZ_tednZ2d@giganews.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<c6e80c2a-e732-4f7c-8071-48c2d284a81a@googlegroups.com> <1aydncHF-7-KR4fNnZ2dnUVZ_u-dnZ2d@giganews.com> <jvet6k$n0i$1@n102.xanadu-bbs.net> <4fSdndK4LcY5vYHNnZ2dnUVZ_h2dnZ2d@giganews.com> <jvhorp$ekl$1@n102.xanadu-bbs.net> <CpOdnbBHrtmv6oDNnZ2dnUVZ_iydnZ2d@giganews.com> <jvktrf$8g2$1@n102.xanadu-bbs.net> <xYGdndRdjYlVv4PNnZ2dnUVZ_hydnZ2d@giganews.com> <jvom7t$7dc$1@n102.xanadu-bbs.net>Show Full Headers
Complete Article Headers
Message-ID: <D_mdnR8f6ZXpjr3NnZ2dnUVZ_tednZ2d@giganews.com> Subject: ATTN: John; NNTP Protocol discussion (was Re: Replace Google Groups with ?) Date: Mon, 06 Aug 2012 13:56:52 -0500 From: Aaron W. Hsu <arcfide@sacrideo.us> References: <c6e80c2a-e732-4f7c-8071-48c2d284a81a@googlegroups.com> <1aydncHF-7-KR4fNnZ2dnUVZ_u-dnZ2d@giganews.com> <jvet6k$n0i$1@n102.xanadu-bbs.net> <4fSdndK4LcY5vYHNnZ2dnUVZ_h2dnZ2d@giganews.com> <jvhorp$ekl$1@n102.xanadu-bbs.net> <CpOdnbBHrtmv6oDNnZ2dnUVZ_iydnZ2d@giganews.com> <jvktrf$8g2$1@n102.xanadu-bbs.net> <xYGdndRdjYlVv4PNnZ2dnUVZ_hydnZ2d@giganews.com> <jvom7t$7dc$1@n102.xanadu-bbs.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 06 Aug 2012 13:56:52 -0500 Newsgroups: news.software.nn User-Agent: nn/6.7.3 Lines: 124 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-suOCqi/eIXKz39TO+SLR7zFre87p6rr6PMFiKXNMjEj/aLOZ+YKX70kajrzp0isGnOFv8ByARs4QRNS!20A4+eEUhDGTjVByMsFlAHnwSK7uwQSJy6sMz7rtd1lLOuTv6x9Nv8CYJmvnjyuU2H+6EIZBvA== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 6948