Article View: news.software.nntp
Article #89882Re: Proposal specifications for MAXARTNUM
From: Richard Kettlewell
Date: Thu, 22 Dec 2022 12:57
Date: Thu, 22 Dec 2022 12:57
173 lines
9211 bytes
9211 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes: > Hi Richard, > >>> It is RECOMMENDED that server implementations permit configuring the >>> maximum article number implicitly set at the start of an NNTP session, >>> whose default MUST be 2,147,483,647 when version 2 of NNTP is >>> advertised in CAPABILITIES (Section 3.3.2 of [RFC3977]). The default >>> value MAY be different in future versions of NNTP. This implicit >>> maximum article number MAY be global to the news server or >>> configurable at a finer level. For instance, the maximum article >>> number could be implicitly set to 18,446,744,073,709,551,615 (2^64-1) >>> for certain users either at the start of the NNTP session or after the >>> use of a mechanism identifying them (e.g. authentication with >>> AUTHINFO). Configuring a value greater than this default value SHOULD >>> be done only for users known to run a news client capable of handling >>> article numbers up to that configured value. >> This paragraph seems to add scope for incompatibility between >> servers >> and clients without any clear benefit. > > I propose that paragraph because there's a need not to break existing > implementations capable of handling 64-bit article numbers (both > servers and clients). > If a server implements MAXARTNUM, a client which still has not would > suddenly be no longer able to participate in newsgroups where he > previously could! > > So here's the need I wish to deal with. In the same way MAXARTNUM is > designed not to break existing legacy 32-bit implementations, it > shouldn't break existing 64-bit implementations which went ahead and > are using large article numbers. > I came up with that idea formulated in the above paragraph. Note that > a server that only implements a global parameter for the initial > maximum article number (set to 2^31-1) is compliant! > > Do you happen to have another better solution for that need? I do see the problem. One answer is to say that those servers are out of spec and can continue being out of spec, including the MAXARTNUM spec. Given the speed of development and deployment in Usenet that’s probably what will happen for a while anyway l-) but it’s not a very satisfactory answer. Anyway, I think we shouldn’t impose unnecessary requirements (the RECOMMENDED) on other servers. My suggestion therefore would be something like: A server implementation MAY configure a maximum article number for a connection based on other techniques, for example client fingerprinting, per-user configuration or server configuration. Configuring a value greater than the default of 2147483647 SHOULD be done only for clients known to be capable of handling article numbers up to that configured maximum article number. >>> A server supporting the MAXARTNUM command as defined in this document >>> will advertise the "MAXARTNUM" capability label in response to the >>> CAPABILITIES command (Section 5.2 of [RFC3977]). However, this >>> capability MUST NOT be advertised once the MAXARTNUM command has >>> successfully been executed. >> Why not? Seems like an entirely unnecessary restriction on the >> server. > > The problem I see in going on advertising MAXARTNUM is CAPABILITIES is > that it may be confusing. > The server could advertise "MAXARTNUM N" whereas a value different > than N has been negotiated. IMO that isn’t very likely, but the inconsistency could be explicitly forbidden if it’s a concern. > And usually, after the use of commands like AUTHINFO, COMPRESS, > STARTTLS which change something in the connection, they are no longer > advertised in CAPABILITIES. > > Do you see a drawback in no longer advertising it either? My suggestion would be to forbid the server from changing its MAXARTNUM advertisement in CAPABILITIES. For example: A server that does not advertize MAXARTNUM in one CAPABILITIES response MUST NOT then advertizing it in a subsequent CAPABILITIES response in the same session without an intervening successful MODE READER. A server that advertizes MAXARTNUM in one CAPABILITIES response MUST NOT remove it, or advertize a different maximum article number, in a subsequent CAPABILITIES response in the same session without an intervening successful MODE READER. > Nonetheless, your remark about such large article numbers makes me > think about something I overlooked... > > From RFC 3977: > > Command lines MUST NOT exceed > 512 octets, which includes the terminating CRLF pair. The arguments > MUST NOT exceed 497 octets. A server MAY relax these limits for > commands defined in an extension. > > The initial line of the response MUST NOT exceed > 512 octets, which includes the response code and the terminating CRLF > pair; an extension MAY specify a greater maximum for commands that it > defines, but not for any other command. > > So there is a problem for instance with "OVER N-M" where N and M are > compounded of 497 digits. > And also in existing responses, as we may have a large article number > followed by a Message-ID up to 250 characters itself! > And even in GROUP responses, there may be 3 large article numbers > followed by a newsgroup name. (Is there an upper bound for the length > of a newsgroup name? I do not manage to find it in RFC 3977 or 5536.) > > Something should definitively be said about that in the MAXARTNUM > extension... > > Should we then restrict the maximum length of article numbers to a > precise number, given these requirements? > For version 2 of NNTP, we may for instance take 40 bytes, which is > enough for 2^128 articles. And just say a future version may relax > the current limits in the length of command lines and initial response > lines. > > Do you see any other idea to deal with that issue? Article numbers of 2^63 aren’t realistic. Even at a thousand articles per second it would take hundreds of millions of years to reach such a large article number. For 128-bit article numbers we’re talking 10^27 years. So I don’t think we need to worry about these very large numbers. They’re not happening. >>> Additionally, the client MUST NOT issue a MODE READER command after a >>> successful negotiation of the mutual maximum article number with the >>> MAXARTNUM command, and a server MUST NOT advertise the MODE-READER >>> capability. >> The former I can see, but why forbid advertizing MODE-READER after >> MAXARTNUM has been negotiated? > > When MODE-READER is advertised, we're in the case of a mode-switching > news server. The same way AUTHINFO, COMPRESS, or STARTTLS forbid > advertizing MODE-READER after a successful use of the command, > MAXARTNUM also has to. Negotiated states are not shared between > transit and reading facilities of mode-switching news servers. Fair enough. >>> A server MUST NOT return the MAXARTNUM capability label in response to >>> a CAPABILITIES command received after a successful use of the >>> MAXARTNUM command, and a server MUST reply with a 502 response code if >>> a syntactically valid MAXARTNUM command is received after an already >>> successful use of this command. >> Why? > > From previous discussions, it seemed weird that a news client used > MAXARTNUM twice (or more) with a possible different article number > asked. That's the reason of that paragraph. It doesn’t seem likely in practice (why would a client bother?) and it wouldn’t be hard for a server to cope with it (mostly it would just be updating a field in the session state, after all). However if seems plausible that a server might not cope well with the maximum being adjusted more than once, we could permit servers to reject second and subsequent MAXARTNUM commands: Once a MAXARTNUM command has succeeded, a server MAY reply 502 to all subsequent MAXARTNUM commands. -- https://www.greenend.org.uk/rjk/
Technical Details
Message-ID:
<wwvr0wr38b7.fsf@LkoBDZeT.terraraq.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<tnqm14$35bas$1@news.trigofacile.com> <wwvwn6lggvf.fsf@LkoBDZeT.terraraq.uk> <tnvor4$38u1h$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <wwvr0wr38b7.fsf@LkoBDZeT.terraraq.uk>
Subject: Re: Proposal specifications for MAXARTNUM
Date: Thu, 22 Dec 2022 12:57:16 +0000
From: Richard Kettlewell <invalid@invalid.invalid>
References: <tnqm14$35bas$1@news.trigofacile.com> <wwvwn6lggvf.fsf@LkoBDZeT.terraraq.uk> <tnvor4$38u1h$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: terraraq NNTP server
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: mantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6"; logging-data="2676"; mail-complaints-to="usenet@mantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:McbTjN2JPZqzPzs0M+YDSVqINro=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^ F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha +r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
Lines: 172