🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90226

Re: Questions regarding Path entries in a multi-server network.

#90226
From: Julien ÉLIE
Date: Tue, 21 Mar 2023 23:05
149 lines
7875 bytes
Hi Jesse,

>> Meanwhile, if you have any suggestions, here is what I had in mind.
>> A new "pathmatch" parameter in incoming.conf expects a wildmat pattern
>> and has no default value.
>> If the leftmost path identity of an incoming article from a peer matches
>> the pattern value of that parameter (in incoming.conf) when set or, when
>> unset, equals the label of the peer, then a double "!!" will be
>> prepended to the Path header field to show it has been successfully
>> verified.
>> If the leftmost path identity does not match the pattern, when set,
>> "!.MISMATCH." is prepended along with the peer IP, and a notice log is
>> written to say there's a path mismatch (the log is written only once
>> *per connection* from the peer, and will be reported in Usenet daily
>> reports as unknown lines near the beginning of the report).
> 
> This is more or less equivalent to the behavior of Diablo's "alias" parameter
> in dnewsfeeds that accepts wildmat patterns, though it doesn't implement the
> verified !! portion.
> 
>> In all other cases, "!.SEEN." with the peer IP is added, without any
>> notice log.
> 
> Can you explain further what "other cases" this would be applicable to?

It would happen when there is neither "!!" nor "!.MISMATCH." as set by 
the above suggested rules.  INN couldn't check the path identity because 
the pathmatch parameter was not set.

It's the third part of the following excerpt from RFC 5537:

        A relaying or serving agent SHOULD prepend a <path-diagnostic> to
        the Path header field content, where the <path-diagnostic> is
        chosen as follows:

        *  If the expected <path-identity> of the source of the article
           matches the leftmost <path-identity> of the Path header
           field's content, use "!" (<diag-match>), resulting in two
           consecutive "!"s.

        *  If the expected <path-identity> of the source of the article
           does not match, use "!.MISMATCH." followed by the expected
           <path-identity> of the source or its IP address.

        *  If the relaying or serving agent is not willing or able to
           check the <path-identity>, use "!.SEEN." followed by the FQDN,
           IP address, or expected <path-identity> of the source.



>> There's a special case to deal with: articles coming from a local Unix
>> domain socket (like connections to innd by rnews or nnrpd).  I would
>> suggest "!.SEEN.localhost" for them (except of course when the path
>> identity corresponds to nnrpd's "!.POSTED", in which case we do not add
>> a path diagnostic).
>> I don't think "!!" or "!.MISMATCH." is suitable for these articles as
>> the path identity may be different than the real one of the remote peer,
>> and I do not see any way to ensure that (when processing rnews batches
>> coming from an external source, UUCP, etc. we no longer know the source).
> 
> I'd have to really think more about this, but can see where this might get a
> little ugly.

I understand "!.SEEN.localhost" may look ugly for each post from rnews.

When pulling news with pullnews, and transferring them to your server, 
you will also probably want to deactivate path diagnostic for the 
incoming.conf entry matching the pullnews connection, or set pathmatch 
to "*"; otherwise you'll get bunches of "!.MISMATCH."...



>> This proposal permits not generating a "!.MISMATCH." if the admin does
>> not set an explicit "pathmatch" entry for a peer.  It will therefore not
>> surprise him, and won't introduce spurious "!.MISMATCH." in the wild.
> 
> Nothing that I'm aware of rejects based on MISMATCH at this time, so would it
> be so bad to have the behavior on by default as is with Diablo? Might
> encourage more operators to properly tweak their configurations.

Yes, it might encourage a better tweak of configuration of incoming.conf 
(notably for the news admins who use pullnews, rnews, UUCP...).

Nonetheless, nobody has ever required that the label of the peer entry 
corresponds to the expected path identity, the hostname pattern neither. 
  I may have:

peer jesse {
   hostname: "news-out.remote-server.net"
}

whereas the path identity is just "remote-server.net".

Why would a "!.MISMATCH." occur?
Why would we force news admins to configure path verification?

That's why I am unsure we should enforce path verification by default, 
unless an explicit pathmatch parameter is used:

peer jesse {
   hostname: "news-out.remote-server.net"
   pathmatch: "remote-server.net"
}

or the peer label is the leftmost path identity (in which case "!!" will 
be used):

peer remote-server.net {
   hostname: "news-out.remote-server.net"
}


>> I would also suggest a new "pathdiag" parameter, set to true by default,
>> that can be used at global scope and also per peer, to disable the
>> feature.  Maybe a "pathdomainsocketdiag" parameter would also be useful
>> to configure the same thing for local Unix domain sockets (they do not
>> have a peer configuration in incoming.conf).
> 
> Sounds reasonable. If pathdiag is enabled by default and you do not add any
> pathmatch statements to incoming.conf, is the behavior for path
> diagnostic/matching basically the same as it is now?

There wouldn't be any change if we do *not* add "!.SEEN." in these 
cases.  The suggestion here is to add it.

In summary:

When there is a pathmatch parameter, we can either use "!!" or 
"!.MISMATCH.".  When this parameter is not set, we can either use "!!" 
(matching the peer label or the hostname pattern) or "!.SEEN.".

If pathdiag is explicitly set with value "true", we add "!!", 
"!.MISMATCH." or "!.SEEN." depending on how pathmatch is set.

If pathdiag is explicitly set with value "false", we don't add anything.

If pathdiag is not set, we add "!!" when possible... and nothing 
otherwise.  Note that it does not strictly comply with the SHOULD of RFC 
5537 (a path diagnostic SHOULD always be added).

But in case it surprises news admins on upgrade, maybe INN 2.7.2 should 
have pathdiag unset by default; and we set it to true by default only 
for INN 2.8.0?  (I probably once suggested that, and it is why you have 
INN 2.8.0 in mind for path verification!)

-- 
Julien ÉLIE

« Ce sont vos uniones, pas les miens ! » (Astérix)
Technical Details
Message-ID: <tvdd8m$3vup7$2@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
References: <tv8eq9$pqu$1@tncsrv09.home.tnetconsulting.net> <tvaj4t$1vml$1@nnrp.usenet.blueworldhosting.com> <tvak80$10me$1@nnrp.usenet.blueworldhosting.com> <tvam09$3u6i4$2@news.trigofacile.com> <tvangr$2v3p$1@nnrp.usenet.blueworldhosting.com>

Show Full Headers
Complete Article Headers
Message-ID: <tvdd8m$3vup7$2@news.trigofacile.com>
Subject: Re: Questions regarding Path entries in a multi-server network.
Date: Wed, 22 Mar 2023 00:05:58 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <tv8eq9$pqu$1@tncsrv09.home.tnetconsulting.net> <tvaj4t$1vml$1@nnrp.usenet.blueworldhosting.com> <tvak80$10me$1@nnrp.usenet.blueworldhosting.com> <tvam09$3u6i4$2@news.trigofacile.com> <tvangr$2v3p$1@nnrp.usenet.blueworldhosting.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: Groupes francophones par TrigoFACILE
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 21 Mar 2023 23:05:58 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176.143-2-105.abo.bbox.fr:176.143.2.105"; logging-data="4193063"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0
Cancel-Lock: sha1:imZV4RybYA9HlA6nm6g02nr4CmQ= sha256:UwhUs4on0/sBq7o0sizmxGI8z114npSGi1Z9iRIaxnw= sha1:DbOj3rkfRj0maxrG2Jo0xsgQ8mE= sha256:xVb7Ws5QDkGmyPgnHu5wzR/ui0gnacpV+VeKRjKPZEM=
In-Reply-To: <tvangr$2v3p$1@nnrp.usenet.blueworldhosting.com>