Thread View: news.software.nntp
11 messages
11 total messages
Started by Flibsy
Sun, 13 Jan 2013 01:12
innd saslauthd auth
Author: Flibsy
Date: Sun, 13 Jan 2013 01:12
Date: Sun, 13 Jan 2013 01:12
12 lines
1327 bytes
1327 bytes
Hi folks, I have INND running on my FreeBSD server with some local groups, but without authentication. I'd like to authenticate users using saslauthd (used to authenticate users for mail) but I do not know how to configure that in the auth: specification in readers.conf. So I would really appreciate some help. -- Flibsy
Re: innd saslauthd auth
Author: Julien ÉLIE
Date: Sun, 13 Jan 2013 19:11
Date: Sun, 13 Jan 2013 19:11
55 lines
3042 bytes
3042 bytes
Hi Flibsy, > I'd like to authenticate users using saslauthd (used to authenticate users > for mail) but I do not know how to configure that in the auth: > specification in readers.conf. For SASL authentication, INN currently (at least for 2.5.x versions) does not use auth blocks. When AUTHINFO SASL is used, the user name returned after a successful authentication is directly used when matching access blocks. So basically, you just have to properly configure your saslauthd daemon, and it should be OK. Another point: INN must have been configured for SASL support. If you "telnet your.news.server 119", have a look at the "AUTHINFO USER SASL" line in response to the CAPABILITIES command (after maybe a MODE READER command): 20:06 news@trigo ~% telnet localhost 119 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. 200 news.trigofacile.com InterNetNews server INN 2.6.0 (20120528 prerelease) ready (transit mode) MODE READER 200 news.trigofacile.com InterNetNews NNRP server INN 2.6.0 (20120528 prerelease) ready (posting ok) CAPABILITIES 101 Capability list: VERSION 2 IMPLEMENTATION INN 2.6.0 (20120528 prerelease) AUTHINFO USER SASL HDR IHAVE LIST ACTIVE ACTIVE.TIMES COUNTS DISTRIB.PATS DISTRIBUTIONS HEADERS MODERATORS MOTD NEWSGROUPS OVERVIEW.FMT SUBSCRIPTIONS OVER POST READER SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5 STARTTLS .. QUIT 205 Bye! Connection closed by foreign host. Knowing that fact, is SASL auth now working on your server? -- Julien ÉLIE « Ex nihilo nihil. » (Perse)
Re: innd saslauthd auth
Author: Flibsy
Date: Mon, 14 Jan 2013 08:30
Date: Mon, 14 Jan 2013 08:30
86 lines
3893 bytes
3893 bytes
On 13-1-2013 20:11, Julien ÉLIE wrote: Hi, thanks for your re! > Flibsy: >> I'd like to authenticate users using saslauthd (used to authenticate users >> for mail) but I do not know how to configure that in the auth: >> specification in readers.conf. > > For SASL authentication, INN currently (at least for 2.5.x versions) > does not use auth blocks. > When AUTHINFO SASL is used, the user name returned after a successful > authentication is directly used when matching access blocks. When you say 'AUTHINFO SASL is used', are you referring to a setting somewhere in INN? Or do you mean the client issuing the command? When I look into the client's debug log, I see no AUTHINFO SASL, just AUTHINFO USER. > > So basically, you just have to properly configure your saslauthd daemon, > and it should be OK. Hm. My SASLAUTHD runs ok for Courier imap/pop3 and POSTFIX with courier-authlib/authdaemond employing userdb: 9428 ?? IsJ 0:00.07 /usr/local/sbin/saslauthd -a rimap -O localhost -r > Another point: INN must have been configured for SASL support. > If you "telnet your.news.server 119", have a look at the > "AUTHINFO USER SASL" line in response to the CAPABILITIES command (after > maybe a MODE READER command): > > 20:06 news@trigo ~% telnet localhost 119 > Trying 127.0.0.1... > Connected to localhost.localdomain. > Escape character is '^]'. > 200 news.trigofacile.com InterNetNews server INN 2.6.0 (20120528 prerelease) ready (transit mode) > MODE READER > 200 news.trigofacile.com InterNetNews NNRP server INN 2.6.0 (20120528 prerelease) ready (posting ok) > CAPABILITIES > 101 Capability list: > VERSION 2 > IMPLEMENTATION INN 2.6.0 (20120528 prerelease) > AUTHINFO USER SASL > HDR > IHAVE > LIST ACTIVE ACTIVE.TIMES COUNTS DISTRIB.PATS DISTRIBUTIONS HEADERS MODERATORS MOTD NEWSGROUPS OVERVIEW.FMT SUBSCRIPTIONS > OVER > POST > READER > SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5 > STARTTLS My server's results show include the SASL specs: 200 nltaal.nl InterNetNews NNRP server INN 2.5.2 ready (posting ok) CAPABILITIES 101 Capability list: VERSION 2 IMPLEMENTATION INN 2.5.2 AUTHINFO USER SASL HDR LIST ACTIVE ACTIVE.TIMES DISTRIB.PATS HEADERS NEWSGROUPS OVERVIEW.FMT NEWNEWS OVER POST READER SASL SCRAM-SHA-1 GSSAPI GSS-SPNEGO DIGEST-MD5 OTP CRAM-MD5 NTLM PLAIN LOGIN > > Knowing that fact, is SASL auth now working on your server? Well, as I said, for POSTFIX SMTP and Courier IMAP and POP3 it's working fine, but not for INN NNRP and NNTP. Is this output ok? 200 nltaal.nl InterNetNews NNRP server INN 2.5.2 ready (posting ok) AUTHINFO SASL rimap 503 no mechanism available -- Flibsy
Re: innd saslauthd auth
Author: Flibsy
Date: Mon, 14 Jan 2013 08:48
Date: Mon, 14 Jan 2013 08:48
114 lines
4853 bytes
4853 bytes
On 14-1-2013 9:30, Flibsy wrote: > On 13-1-2013 20:11, Julien ÉLIE wrote: > > Hi, thanks for your re! > >> Flibsy: >>> I'd like to authenticate users using saslauthd (used to authenticate >>> users >>> for mail) but I do not know how to configure that in the auth: >>> specification in readers.conf. >> >> For SASL authentication, INN currently (at least for 2.5.x versions) >> does not use auth blocks. >> When AUTHINFO SASL is used, the user name returned after a successful >> authentication is directly used when matching access blocks. > > When you say 'AUTHINFO SASL is used', are you referring to a setting > somewhere in INN? Or do you mean the client issuing the command? When I > look into the client's debug log, I see no AUTHINFO SASL, just AUTHINFO > USER. > >> >> So basically, you just have to properly configure your saslauthd daemon, >> and it should be OK. > > Hm. My SASLAUTHD runs ok for Courier imap/pop3 and POSTFIX with > courier-authlib/authdaemond employing userdb: > > 9428 ?? IsJ 0:00.07 /usr/local/sbin/saslauthd -a rimap -O > localhost -r > >> Another point: INN must have been configured for SASL support. >> If you "telnet your.news.server 119", have a look at the >> "AUTHINFO USER SASL" line in response to the CAPABILITIES command (after >> maybe a MODE READER command): >> >> 20:06 news@trigo ~% telnet localhost 119 >> Trying 127.0.0.1... >> Connected to localhost.localdomain. >> Escape character is '^]'. >> 200 news.trigofacile.com InterNetNews server INN 2.6.0 (20120528 >> prerelease) ready (transit mode) >> MODE READER >> 200 news.trigofacile.com InterNetNews NNRP server INN 2.6.0 (20120528 >> prerelease) ready (posting ok) >> CAPABILITIES >> 101 Capability list: >> VERSION 2 >> IMPLEMENTATION INN 2.6.0 (20120528 prerelease) >> AUTHINFO USER SASL >> HDR >> IHAVE >> LIST ACTIVE ACTIVE.TIMES COUNTS DISTRIB.PATS DISTRIBUTIONS HEADERS >> MODERATORS MOTD NEWSGROUPS OVERVIEW.FMT SUBSCRIPTIONS >> OVER >> POST >> READER >> SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5 >> STARTTLS > > My server's results show include the SASL specs: > > 200 nltaal.nl InterNetNews NNRP server INN 2.5.2 ready (posting ok) > CAPABILITIES > 101 Capability list: > VERSION 2 > IMPLEMENTATION INN 2.5.2 > AUTHINFO USER SASL > HDR > LIST ACTIVE ACTIVE.TIMES DISTRIB.PATS HEADERS NEWSGROUPS OVERVIEW.FMT > NEWNEWS > OVER > POST > READER > SASL SCRAM-SHA-1 GSSAPI GSS-SPNEGO DIGEST-MD5 OTP CRAM-MD5 NTLM PLAIN LOGIN > >> >> Knowing that fact, is SASL auth now working on your server? > > Well, as I said, for POSTFIX SMTP and Courier IMAP and POP3 it's working > fine, but not for INN NNRP and NNTP. > > Is this output ok? > > 200 nltaal.nl InterNetNews NNRP server INN 2.5.2 ready (posting ok) > AUTHINFO SASL rimap > 503 no mechanism available Can anything be concluded from this: From the debug.log, resulting from a failed session: Jan 14 09:31:23 herelder nnrpd[26774]: Reading access from /usr/local/news/etc/readers.conf Jan 14 09:31:23 herelder nnrpd[26774]: Auth strategy 'localhost' does not match client. Removing. Jan 14 09:31:23 herelder nnrpd[26774]: herelder.xs4all.nl res <anyone>@anyhost Jan 14 09:31:23 herelder nnrpd[26774]: herelder.xs4all.nl match_user <anyone>@anyhost <anyone>@anyhost Jan 14 09:31:24 herelder last message repeated 7 times Jan 14 09:31:24 herelder nnrpd[26774]: DIGEST-MD5 common mech free The clients debug log shows: GROUP ->480 Authentication required ... AUTHINFO USER ... ->381 Enter password AUTHINFO PASS ... ->481 Authentication failed -- Flibsy
Re: innd saslauthd auth
Author: Jeffrey M. Vinocur
Date: Mon, 14 Jan 2013 10:03
Date: Mon, 14 Jan 2013 10:03
46 lines
2830 bytes
2830 bytes
In article <50f3c1ee$0$6052$e4fe514c@dreader36.news.xs4all.nl>, Flibsy <flibsy@nltaal.nl> wrote: >On 13-1-2013 20:11, Julien ÉLIE wrote: > >Hi, thanks for your re! > >> Flibsy: >>> I'd like to authenticate users using saslauthd (used to authenticate users >>> for mail) but I do not know how to configure that in the auth: >>> specification in readers.conf. >> >> For SASL authentication, INN currently (at least for 2.5.x versions) >> does not use auth blocks. >> When AUTHINFO SASL is used, the user name returned after a successful >> authentication is directly used when matching access blocks. > >When you say 'AUTHINFO SASL is used', are you referring to a setting >somewhere in INN? Or do you mean the client issuing the command? When I >look into the client's debug log, I see no AUTHINFO SASL, just AUTHINFO >USER. I think this is your problem. The SASL support in INN/nnrpd is for clients that know how to use AUTHINFO SASL. Julien was trying to help you through this. However, if you want to use SASL as the backend to authenticate clients using AUTHINFO USER, I think you have to approach it differently. Do you have PAM on your system? Probably the easiest thing is to use INN's "ckpasswd" in readers.conf, which will call out to PAM, and then configure your PAM to check nnrpd requests against SASL. >Is this output ok? > >200 nltaal.nl InterNetNews NNRP server INN 2.5.2 ready (posting ok) >AUTHINFO SASL rimap >503 no mechanism available That's a little strange, but irrelevant if you don't have a client that can use AUTHINFO SASL, so let's set it aside for now. -- Jeffrey M. Vinocur jeff@litech.org
Re: innd saslauthd auth
Author: Flibsy
Date: Mon, 14 Jan 2013 10:49
Date: Mon, 14 Jan 2013 10:49
60 lines
3597 bytes
3597 bytes
On 14-1-2013 11:03, Jeffrey M. Vinocur wrote: > In article <50f3c1ee$0$6052$e4fe514c@dreader36.news.xs4all.nl>, > Flibsy <flibsy@nltaal.nl> wrote: >> On 13-1-2013 20:11, Julien ÉLIE wrote: >> >> Hi, thanks for your re! >> >>> Flibsy: >>>> I'd like to authenticate users using saslauthd (used to authenticate users >>>> for mail) but I do not know how to configure that in the auth: >>>> specification in readers.conf. >>> >>> For SASL authentication, INN currently (at least for 2.5.x versions) >>> does not use auth blocks. >>> When AUTHINFO SASL is used, the user name returned after a successful >>> authentication is directly used when matching access blocks. >> >> When you say 'AUTHINFO SASL is used', are you referring to a setting >> somewhere in INN? Or do you mean the client issuing the command? When I >> look into the client's debug log, I see no AUTHINFO SASL, just AUTHINFO >> USER. > > I think this is your problem. The SASL support in INN/nnrpd is > for clients that know how to use AUTHINFO SASL. Julien was > trying to help you through this. Aha. Well, as the news agents used are quite diverse, that means the AUTHINFO SASL route is completely useless. > However, if you want to use SASL as the backend to authenticate > clients using AUTHINFO USER, I think you have to approach it > differently. Do you have PAM on your system? Probably the > easiest thing is to use INN's "ckpasswd" in readers.conf, which > will call out to PAM, and then configure your PAM to check nnrpd > requests against SASL. Yes, PAM is there all right, so that should be possible. I will go there then. >> Is this output ok? >> >> 200 nltaal.nl InterNetNews NNRP server INN 2.5.2 ready (posting ok) >> AUTHINFO SASL rimap >> 503 no mechanism available > > That's a little strange, but irrelevant if you don't have a > client that can use AUTHINFO SASL, so let's set it aside for now. I tried other mechanisms too, but same result. But indeed it doesn't matter now. It seems strange to me though, I wouldn't have thought the client would have anything to do with the strategy the server uses to authenticate the user/password. Thanks for your clarification and suggestions, I will off course let you know the results. -- Flibsy
Re: innd saslauthd auth
Author: Russ Allbery
Date: Mon, 14 Jan 2013 17:05
Date: Mon, 14 Jan 2013 17:05
25 lines
2455 bytes
2455 bytes
Flibsy <flibsy@nltaal.nl> writes:
> It seems strange to me though, I wouldn't have thought the client would
> have anything to do with the strategy the server uses to authenticate
> the user/password.
It's because SASL is a thing that's implemented by its own library and,
when the client and server are using SASL, the application never needs to
know how the user is authenticating. It just hands all the details off to
the SASL library, which does its thing.
When not using SASL, the application has to know how to do the
authentication, and currently INN doesn't know how to use saslauthd. (But
does know how to hand a SASL exchange off to Cyrus SASL, which in turn
does use saslauthd if that exchange happens to involve passwords.)
There is probably some way for INN to use saslauthd directly from
ckpasswd, but I'm not sure if it's worth the effort when I believe there
are already PAM modules to do that and INN can already speak PAM.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: innd saslauthd auth
Author: Julien ÉLIE
Date: Mon, 14 Jan 2013 18:01
Date: Mon, 14 Jan 2013 18:01
25 lines
2160 bytes
2160 bytes
Hi Flibsy,
> Is this output ok?
>
> 200 nltaal.nl InterNetNews NNRP server INN 2.5.2 ready (posting ok)
> AUTHINFO SASL rimap 503 no mechanism available
Yep, this output is OK.
The syntax is:
AUTHINFO SASL mechanism [initial-response]
so for instance:
[Client] AUTHINFO SASL PLAIN AHRlc3QAMTIzNA==
[Server] 281 Authentication accepted
"rimap" is not a mechanism, whence the 503 response code you received.
Known mechanisms are the ones your server sends in response to
CAPABILITIES: SCRAM-SHA-1 GSSAPI GSS-SPNEGO DIGEST-MD5 OTP CRAM-MD5
NTLM PLAIN LOGIN.
--
Julien ÉLIE
« Ex nihilo nihil. » (Perse)
Re: innd saslauthd auth
Author: Flibsy
Date: Mon, 14 Jan 2013 18:33
Date: Mon, 14 Jan 2013 18:33
28 lines
2710 bytes
2710 bytes
Russ Allbery <rra@stanford.edu> wrote: > Flibsy <flibsy@nltaal.nl> writes: > >> It seems strange to me though, I wouldn't have thought the client would >> have anything to do with the strategy the server uses to authenticate >> the user/password. > > It's because SASL is a thing that's implemented by its own library and, > when the client and server are using SASL, the application never needs to > know how the user is authenticating. It just hands all the details off to > the SASL library, which does its thing. > > When not using SASL, the application has to know how to do the > authentication, and currently INN doesn't know how to use saslauthd. (But > does know how to hand a SASL exchange off to Cyrus SASL, which in turn > does use saslauthd if that exchange happens to involve passwords.) Ah of course, it's beyond the user/password harnas. > There is probably some way for INN to use saslauthd directly from > ckpasswd, but I'm not sure if it's worth the effort when I believe there > are already PAM modules to do that and INN can already speak PAM. I found a pam_sasl on the Internet, but maybe I'll make a little script to convert userdb to a passwd like file, and have ckpasswd use that for auth. -- Flibsy
Re: innd saslauthd auth
Author: Flibsy
Date: Mon, 14 Jan 2013 18:33
Date: Mon, 14 Jan 2013 18:33
27 lines
2027 bytes
2027 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote: > Hi Flibsy, > >> Is this output ok? >> >> 200 nltaal.nl InterNetNews NNRP server INN 2.5.2 ready (posting ok) >> AUTHINFO SASL rimap 503 no mechanism available > > Yep, this output is OK. > The syntax is: > AUTHINFO SASL mechanism [initial-response] > > so for instance: > [Client] AUTHINFO SASL PLAIN AHRlc3QAMTIzNA== > [Server] 281 Authentication accepted > > > "rimap" is not a mechanism, whence the 503 response code you received. > Known mechanisms are the ones your server sends in response to > CAPABILITIES: SCRAM-SHA-1 GSSAPI GSS-SPNEGO DIGEST-MD5 OTP CRAM-MD5 NTLM PLAIN LOGIN. Yes, it all makes sense now, thanks to your and Russ's explanations. I expect I'll get it working soon. -- Flibsy
Re: innd saslauthd auth
Author: Flibsy
Date: Tue, 15 Jan 2013 16:31
Date: Tue, 15 Jan 2013 16:31
32 lines
2434 bytes
2434 bytes
On 13-1-2013 2:12, Flibsy wrote: > Hi folks, > > I have INND running on my FreeBSD server with some local groups, but > without authentication. > I'd like to authenticate users using saslauthd (used to authenticate users > for mail) but I do not know how to configure that in the auth: > specification in readers.conf. > > So I would really appreciate some help. Ok, thanks to you guys I've got it basically working. As SASL is not the way to go when you can't control the capabilities of the news clients, I turned to implementing the auth: "ckpasswd -f /path/to/passwordfile" method for authenticating. This sh script (very basic) creates the passwordfile from the courier userdb, so all virtual mail accounts can authenticate with the news server: > #! /bin/sh > sed 's/\([^[:blank:]]*\).*systempw=\([^|]*\).*/\1:\2/' /usr/local/etc/userdb >/usr/local/news/etc/newspasswd.new > rm /usr/local/news/etc/newspasswd.old > mv /usr/local/news/etc/newspasswd /usr/local/news/etc/newspasswd.old > mv /usr/local/news/etc/newspasswd.new /usr/local/news/etc/newspasswd It works like a charm, couldn't have done it without you, thanks! -- Flibsy
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