Thread View: news.software.nntp
7 messages
7 total messages
Started by Daniel Weber
Mon, 11 Jan 2010 18:34
NNRPD authentication issue
Author: Daniel Weber
Date: Mon, 11 Jan 2010 18:34
Date: Mon, 11 Jan 2010 18:34
61 lines
2994 bytes
2994 bytes
Hi,
I am running Debian lenny's prebuilt INN 2.4.5 and have a little issue
with NNTPD and authentication:
- Without authentication, the users shall be able to access a small
number of groups in read-only mode.
- With authentication, the users shall be able to access all groups on
the server with posting.
The (stripped down) readers.conf for this configuration can be found below.
Some of the users have told me, that the are not allowed to post,
allthough they have configured username and password in their usenet
clients.
It seems, that their clients only ask for or apply username and
password, when NNRPD replies with a 480 to a command, but NNRPD replies
with a 440 when an unauthenticated user wants to post a message...
Is there a possibility to change the setup in readers.conf and make
NNRPD reply with 480?
Thanks in advance,
Daniel
readers.conf
------------
auth "localhost" {
hosts: "localhost, 127.0.0.1, stdin"
default: "<localhost>"
}
access "localhost" {
users: "<localhost>"
newsgroups: "*"
access: RPA
}
auth "service" {
key: "service"
hosts: "0.0.0.0/0, ::/0"
auth: "ckpasswd.pl"
default: "anonymous"
default-domain: "service"
}
access "tota-nutzer" {
key: "service"
users: "*@service"
newsgroups: "*"
access: RPA
}
access "tota-anonymous" {
key: "service"
users: "anonymous@service"
newsgroups: "service.*"
access: R
}
Re: NNRPD authentication issue
Author: Ray Banana
Date: Mon, 11 Jan 2010 18:57
Date: Mon, 11 Jan 2010 18:57
25 lines
2584 bytes
2584 bytes
Thus spake Daniel Weber <usenet@daniel-weber.eu> > - Without authentication, the users shall be able to access a small > number of groups in read-only mode. > - With authentication, the users shall be able to access all groups on > the server with posting. [...] > It seems, that their clients only ask for or apply username and > password, when NNRPD replies with a 480 to a command, but NNRPD replies > with a 440 when an unauthenticated user wants to post a message... > Is there a possibility to change the setup in readers.conf and make > NNRPD reply with 480? No.I've been struggling with this problem for years. When the greeter is sent to the client, nnrpd has no way to know in advance what groups the user will access later on. That's why most news clients have an option to *always* send their authentication data. I have compiled a list of news clients with their respective settings: http://www.eternal-september.org/index.php?language=en&showpage=faq#Login-No-Auth -- Time flies like an arrow, fruit flies like a Banana. http://www.eternal-september.org
Re: NNRPD authentication issue
Author: Daniel Weber
Date: Mon, 11 Jan 2010 19:15
Date: Mon, 11 Jan 2010 19:15
15 lines
2010 bytes
2010 bytes
Ray Banana schrieb: > No.I've been struggling with this problem for years. When the greeter is > sent to the client, nnrpd has no way to know in advance what groups the > user will access later on. I am not talking about the 200/201 greeting at the beginning. Lets assume, a clients connects to the server. He will receive a 201 greating with (no posting), reads some of the public groups and then might want to post a message. NNRPD responds to post with 440 instead of 480, allthough the latter would make the usenet client apply username and password. Bye, Daniel
Re: NNRPD authentication issue
Author: Julien ÉLIE
Date: Mon, 11 Jan 2010 20:43
Date: Mon, 11 Jan 2010 20:43
66 lines
3920 bytes
3920 bytes
Hi Daniel,
> Lets assume, a clients connects to the server. He will receive a 201
> greating with (no posting), reads some of the public groups and then
> might want to post a message. NNRPD responds to post with 440 instead of
> 480, allthough the latter would make the usenet client apply username
> and password.
Please note that if the user receives 201, then 440 is the right answer.
(I have not checked whether INN 2.4.5 sends 201 in your case -- if it sends
201, then it is a bug, and it has been fixed in INN 2.5.0, which now sends
the appropriate 200 greeting code.)
Anyway, the issue you report is real. Thanks for your catch!
It is an historic bug in INN that even though 200 is reported, POST
can lead to 440 even though the user could have posted, had he
authenticated itself.
I somehow missed that part and only fixed IHAVE when reviewing INN
for RFC 4643.
I understand what happened: I only checked the first return in every
function (doing authentication) and missed the fact that CMDpost()
consisted of both POST and IHAVE, handled separately.
It seems to be the only impacted NNTP command. Now fixed in INN 2.5.2.
I think I will also make other changes to homogenize commands so that
they return 501 (syntax error) before 480 (authentication needed).
A few commands do that. But not all of them.
> Is there a possibility to change the setup in readers.conf and make
> NNRPD reply with 480?
Unfortunately, it is not that easy. The problem comes from the source
code and you would have to recompile INN.
Here is a patch for the 2.5 branch:
--- commands.c (révision 8877)
+++ commands.c (copie de travail)
@@ -616,7 +616,9 @@
}
if (!ihave && !PERMcanpost) {
syslog(L_NOTICE, "%s noperm post without permission", Client.host);
- Reply("%d Posting not allowed\r\n", NNTP_FAIL_POST_AUTH);
+ Reply("%d Posting not allowed\r\n",
+ PERMcanauthenticate && PERMcanpostgreeting ?
+ NNTP_FAIL_AUTH_NEEDED : NNTP_FAIL_POST_AUTH);
return;
}
I'm sorry to say that it cannot be easily backported to the 2.4 branch.
Of course it can, but it would require to patch much more the code so
as to add the variables PERMcanauthenticate and PERMcanpostgreeting
that are not defined in the 2.4 branch... They were added to fully
comply with RFC 3977.
--
Julien ÉLIE
« Cela n'a rien de remarquable. Il suffit d'appuyer
sur la bonne touche au bon moment et l'instrument
joue tout seul. » (J.-S. Bach)
Re: NNRPD authentication issue
Author: Daniel Weber
Date: Mon, 11 Jan 2010 20:49
Date: Mon, 11 Jan 2010 20:49
18 lines
2175 bytes
2175 bytes
Hi Julien, Julien ÉLIE wrote: > It seems to be the only impacted NNTP command. Now fixed in INN 2.5.2. Great, thank you. > I'm sorry to say that it cannot be easily backported to the 2.4 branch. > Of course it can, but it would require to patch much more the code so > as to add the variables PERMcanauthenticate and PERMcanpostgreeting > that are not defined in the 2.4 branch... They were added to fully > comply with RFC 3977. Maybe I should take the chance and switch to a self compiled INN. I'll try it when there is some spare time. Bye, Daniel
Re: NNRPD authentication issue
Author: Julien ÉLIE
Date: Mon, 11 Jan 2010 20:52
Date: Mon, 11 Jan 2010 20:52
50 lines
2745 bytes
2745 bytes
Hi Daniel, > Some of the users have told me, that the are not allowed to post, > allthough they have configured username and password in their usenet > clients. It is one of the things RFC 3977 deals with. And news clients should upgrade to use the CAPABILITIES command. 200 news.trigofacile.com InterNetNews NNRP server INN 2.6.0 (20091229 prerelease) ready (no posting) CAPABILITIES 101 Capability list: VERSION 2 IMPLEMENTATION INN 2.6.0 (20091229 prerelease) AUTHINFO USER SASL HDR LIST ACTIVE ACTIVE.TIMES DISTRIB.PATS HEADERS NEWSGROUPS OVERVIEW.FMT NEWNEWS OVER READER SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5 STARTTLS .. Clients would have known posting was not allowed at that time and wouldn't have attempted to do that. After having authenticated themselves (AUTHINFO USER SASL is advertised), the POST capability (and also IHAVE in my testing case) is advertised: CAPABILITIES 101 Capability list: VERSION 2 IMPLEMENTATION INN 2.6.0 (20091229 prerelease) HDR IHAVE LIST ACTIVE ACTIVE.TIMES DISTRIB.PATS HEADERS NEWSGROUPS OVERVIEW.FMT NEWNEWS OVER POST READER SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5 .. -- Julien ÉLIE « Cela n'a rien de remarquable. Il suffit d'appuyer sur la bonne touche au bon moment et l'instrument joue tout seul. » (J.-S. Bach)
Re: NNRPD authentication issue
Author: John F. Morse
Date: Tue, 12 Jan 2010 03:21
Date: Tue, 12 Jan 2010 03:21
80 lines
4226 bytes
4226 bytes
Julien ÉLIE wrote:
> Hi Daniel,
>
>> Lets assume, a clients connects to the server. He will receive a 201
>> greating with (no posting), reads some of the public groups and then
>> might want to post a message. NNRPD responds to post with 440 instead of
>> 480, allthough the latter would make the usenet client apply username
>> and password.
>
> Please note that if the user receives 201, then 440 is the right answer.
> (I have not checked whether INN 2.4.5 sends 201 in your case -- if it
> sends
> 201, then it is a bug, and it has been fixed in INN 2.5.0, which now
> sends
> the appropriate 200 greeting code.)
>
> Anyway, the issue you report is real. Thanks for your catch!
> It is an historic bug in INN that even though 200 is reported, POST
> can lead to 440 even though the user could have posted, had he
> authenticated itself.
>
> I somehow missed that part and only fixed IHAVE when reviewing INN
> for RFC 4643.
> I understand what happened: I only checked the first return in every
> function (doing authentication) and missed the fact that CMDpost()
> consisted of both POST and IHAVE, handled separately.
>
> It seems to be the only impacted NNTP command. Now fixed in INN 2.5.2.
>
> I think I will also make other changes to homogenize commands so that
> they return 501 (syntax error) before 480 (authentication needed).
> A few commands do that. But not all of them.
>
>
>> Is there a possibility to change the setup in readers.conf and make
>> NNRPD reply with 480?
>
> Unfortunately, it is not that easy. The problem comes from the source
> code and you would have to recompile INN.
>
> Here is a patch for the 2.5 branch:
>
> --- commands.c (révision 8877)
> +++ commands.c (copie de travail)
> @@ -616,7 +616,9 @@
> }
> if (!ihave && !PERMcanpost) {
> syslog(L_NOTICE, "%s noperm post without permission",
> Client.host);
> - Reply("%d Posting not allowed\r\n", NNTP_FAIL_POST_AUTH);
> + Reply("%d Posting not allowed\r\n",
> + PERMcanauthenticate && PERMcanpostgreeting ?
> + NNTP_FAIL_AUTH_NEEDED : NNTP_FAIL_POST_AUTH);
> return;
> }
>
>
> I'm sorry to say that it cannot be easily backported to the 2.4 branch.
> Of course it can, but it would require to patch much more the code so
> as to add the variables PERMcanauthenticate and PERMcanpostgreeting
> that are not defined in the 2.4 branch... They were added to fully
> comply with RFC 3977.
>
Hi, Julien.
I had this issue with a user who used MicroPlanet Gravity. They could
eventually post but had to do some fancy footwork first.
IIRC, it failed to send mode reader, but it's been a couple of years
since I investigated this anomaly.
I don't have Gravity, but you might want to specifically verify that
Gravity will work after the patch.
--
John
When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
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