View previous topic :: View next topic |
Author |
Message |
cantao Apprentice
Joined: 07 Jan 2004 Posts: 166
|
Posted: Sun Aug 02, 2009 2:45 pm Post subject: Clarification of Cyrus-SASL, OpenLDAP and PAM |
|
|
Hi Friends,
After reading and Googling a lot, I'm still kind of lost here (perhaps age coming? ).
I want to centralize services -- mostly authentication and hosts -- using OpenLDAP. I did that once a long time ago (OpenLDAP 2.1) half blinded, but now I want to do it properly, better yet if I actually *know* what I'm doing.
So, I need some clarifications:
1. How Cyrus-SASL, OpenLDAP and PAM relate? I know I can make OpenLDAP PAM-aware with pam_ldap and nss_ldap, but my readings make me think that I can use OpenLDAP straight with Cyrus-SASL.
2. What is the difference among ldaps://, TLS and Cyrus-SASL? How they correlate? What is "better" (note the quotes)?
3. Is Cyrus-SASL *really* necessary, or can I live happily *and* secure just with OpenLDAP and PAM?
4. How in the hell do I setup the cn=Manager account with the new slapd.d directory configuration format??? (OpenLDAP >= 2.3).
Any info that helps me sort out this mess will be greatly appreciated!
Thanks a lot, Cantão! |
|
Back to top |
|
|
aceFruchtsaft Guru
Joined: 16 May 2004 Posts: 438 Location: Vienna, Austria
|
Posted: Sun Aug 02, 2009 3:40 pm Post subject: |
|
|
I've never understood where SASL fits in either. There does not seem to be decent documentation which describes the bigger picture, at least I did not find one some time ago.
However, as far as I see it you don't need SASL for most things anyway. PAM is an authentication framework with is supported by almost everything on Linux, so if you authenticate via PAM -> pam_ldap -> openldap you probably don't need SASL. I don't know if anything has changed with openldap 2.4 as I am still running openldap 2.3.x on both of my servers.
BTW, I'd rather say that pam_ldap and nss_ldap make PAM and the NSS openldap-aware, not the other way round.
Regarding the difference between ldaps:// and TLS: You run ldaps on a separate port (636 IIRC) and this supports only SSL-encrypted communication. That is the "old way" of doing things. With TLS, you can use the standard port (389) for both encrypted and unencrypted connections. If a client supports TLS, it will initiated an encrypted connection on port 389, so this is more flexible. |
|
Back to top |
|
|
cantao Apprentice
Joined: 07 Jan 2004 Posts: 166
|
Posted: Sun Aug 02, 2009 11:39 pm Post subject: |
|
|
Hi aceFruchtsaft!
Thanks for your prompt response!
Yes, I guess the greatest problem is the big picture. I know PAM talks to OpenLDAP through pam_ldap, but also knows that Cyrus-SASL and OpenLDAP talk to each other. On the other hand, Cyrus-SASL *also* talks to PAM. Cyrus-SASL can use its own database, or use OpenLDAP. Eveybody talks to everybody in every possible way. In the end, I am completely unable to know how the information flows from "login + password" to full authentication.
Talking about "old ways" of doing things, do you have any good documentation (ok, perhaps not so good, but understandable) on the new "cn=config" paradigm? Slapd.conf probably will be deprecated, so it is good to have a clean and correct start.
Thanks a lot, Cantão! |
|
Back to top |
|
|
aceFruchtsaft Guru
Joined: 16 May 2004 Posts: 438 Location: Vienna, Austria
|
Posted: Mon Aug 03, 2009 6:09 am Post subject: |
|
|
cantao wrote: | Yes, I guess the greatest problem is the big picture. I know PAM talks to OpenLDAP through pam_ldap, but also knows that Cyrus-SASL and OpenLDAP talk to each other. On the other hand, Cyrus-SASL *also* talks to PAM. Cyrus-SASL can use its own database, or use OpenLDAP. Eveybody talks to everybody in every possible way. In the end, I am completely unable to know how the information flows from "login + password" to full authentication.
|
That was my impression too, that's why I skipped SASL whenever possible (I use it in postfix only, as it stores SMTP logins in there, IIRC).
Quote: |
Talking about "old ways" of doing things, do you have any good documentation (ok, perhaps not so good, but understandable) on the new "cn=config" paradigm? Slapd.conf probably will be deprecated, so it is good to have a clean and correct start.
|
Unfortunately not. I won't be switching to OpenLDAP 2.4.x as long as it's not marked stable and did not look at the migration process so far. |
|
Back to top |
|
|
cantao Apprentice
Joined: 07 Jan 2004 Posts: 166
|
Posted: Mon Aug 03, 2009 12:07 pm Post subject: |
|
|
Good. As soon as I sort out the "cn=config" stuff, I'll post it here to help other OpenLDAP suferers
Thanks a lot again, Cantão! |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Mon Aug 03, 2009 1:57 pm Post subject: |
|
|
If you're going to use OpenLDAP for management of auth, servers, e-mail, etc, then IMHO having SASL is redundant.
Someone else may point out a benefit to me, but I personally see none.
SSH logins can be managed with ldap, email addresses can be managed with ldap, things like postfix and apache can query ldap without a need for SASL.
I guess I'm somewhat in the same boat, and don't see how SASL ties in or why it would even be needed. |
|
Back to top |
|
|
cantao Apprentice
Joined: 07 Jan 2004 Posts: 166
|
Posted: Mon Aug 03, 2009 5:52 pm Post subject: |
|
|
That's exactly what I plan to use OpenLDAP for. I guess is bye, bye SASL...
Thanks for the answer cach0rr0! (Off topic: do you know what your nick means in Portuguese?) |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Mon Aug 03, 2009 6:09 pm Post subject: |
|
|
cantao wrote: | That's exactly what I plan to use OpenLDAP for. I guess is bye, bye SASL...
Thanks for the answer cach0rr0! (Off topic: do you know what your nick means in Portuguese?) |
aye, was a Brazilian friend who nicknamed me "c-cachorro" a long time ago.
It wasn't until later that I learned there were some unfortunate sexual connotations to the word - but I decided screw it, it's easy to remember! |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Mon Aug 03, 2009 6:13 pm Post subject: |
|
|
I would recommend confirming what I've said with another source.
I know that SASL can use LDAP as its backend - what I'm looking for now so I can help answer you is information on whether or not ESMTP authentication can function using LDAP only, without SASL in the picture
That is the only piece I can see that might require sasl - and I'm not entirely sure why |
|
Back to top |
|
|
aceFruchtsaft Guru
Joined: 16 May 2004 Posts: 438 Location: Vienna, Austria
|
Posted: Mon Aug 03, 2009 7:04 pm Post subject: |
|
|
cach0rr0 wrote: | I would recommend confirming what I've said with another source.
I know that SASL can use LDAP as its backend - what I'm looking for now so I can help answer you is information on whether or not ESMTP authentication can function using LDAP only, without SASL in the picture
That is the only piece I can see that might require sasl - and I'm not entirely sure why |
At least postfix has a pam USE flag and the ebuild provides a /etc/pam.d/smtp which indicates that SMTP authentication should work through PAM without SASL as well. However, as I gather from Hildebrandt's "The book of postfix", you are constrained in the SMTP auth mechanism you can support by the choice of authentication backend. For example, if you go via saslauthd -> PAM -> pam_ldap -> openldap, it seem's that you can use only the LOGIN and PLAIN STMP auth mechanisms and I assume that this applies to authenticating directly via PAM as well.
See this table:
http://omploader.org/vMjM5cQ |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Mon Aug 03, 2009 10:06 pm Post subject: |
|
|
I'm not terribly concerned with allowing plaintext auth, as I only allow auth over a TLS-enabled socket.
Most all clients support both plain auth, and SMTP over TLS, so that's good enough for me
My aim is to have postfix be able to talk to LDAP for ESMTP auth *without* a requirement of SASL. I don't know if this is possible or not - it would seem silly that that's a requirement though, an unnecessary middle man; authenticating to an authenticator who then authenticates you against LDAP? silliness! |
|
Back to top |
|
|
aceFruchtsaft Guru
Joined: 16 May 2004 Posts: 438 Location: Vienna, Austria
|
Posted: Tue Aug 04, 2009 9:03 am Post subject: |
|
|
cach0rr0 wrote: |
My aim is to have postfix be able to talk to LDAP for ESMTP auth *without* a requirement of SASL. I don't know if this is possible or not - it would seem silly that that's a requirement though, an unnecessary middle man; authenticating to an authenticator who then authenticates you against LDAP? silliness! |
I don't know if postfix can authenticate directly against openldap (without PAM or SASL) in between, but I can see why developers might be motivated to do it this way: the only have to code against a single API (PAM, SASL, whatever) which itself supports a multitude of authentication backends, instead of implementing authentication against unix, ldap, sql, etc. themselves. |
|
Back to top |
|
|
cantao Apprentice
Joined: 07 Jan 2004 Posts: 166
|
Posted: Tue Aug 04, 2009 1:03 pm Post subject: |
|
|
Hi!
I guess that for a while I´ll go with OpenLDAP + PAM + TLS. It seems reasonably simple and that way I can at least see part of the big picture. As cach0rr0 said, way so many authenticators? (SASL <-> OpenLDAP <-> PAM <-> Whatever!)
Of course, let's keep the discussion open so other contributors with different experiences can help!
Thanks a lot, Cantão! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|