This is all great feedback. Thanks everyone. I'm trying to figure out how to grab a copy of the SEGFAULT core for SSSD which I will provide as an attachment back to this conversation when I figure out how to extract it.

I noticed that providers/ldap/ldap_common.c:855 automatically uses SSS_LDAP_SRV_NAME to construct the LDAP uri on discovery which is statically set (providers/ldap/ldap_common.h:36) to "ldap" and is very problematic if ldap is supposed to be ldaps in the uri.

Why this combination might lead to a SEGFAULT is still a bit of a mystery to me so I'll try to find the additional troubleshooting information.

As pointed out to me in a couple of the other responses TLS and not SSL is probably the better way to go which is surprising to me but admittedly I am new to the LDAP security world and that will give me something to research more deeply. Does SSSD cater more to the TLS + LDAP combination?

My hope was to see how far I could get with a fairly secure Kerberos + LDAP combination that could (mostly) automatically be pushed to the clients (SSSD) with as little configuration as possible. Initially LDAPS seemed to make sense and SRV records for DNS Discovery also seemed like a decent choice.


Joshua Riffle
Software Engineer
Azusa Pacific University


On Fri, May 10, 2013 at 8:17 AM, Simo Sorce <simo@redhat.com> wrote:
On Fri, 2013-05-10 at 10:40 +0200, Jakub Hrozek wrote:
> On Fri, May 10, 2013 at 09:23:33AM +0100, John Hodrien wrote:
> > On Thu, 9 May 2013, Joshua Riffle wrote:
> >
> > >In the case of service discovery there seems to be no way of getting LDAP to
> > >be treated as LDAPS (secure) and I think this may be leading to a
> > >segmentation fault in the sss_ldap library.
> >
>
> A segmentation fault? Can you get us a backtrace or a core file, please?
> Even if the functionality didn't work as expected, we should never ever
> segfault.
>
> > >_ldap._tcp              SRV  0 0 636 ldap
> >
> > >ldaps (which is correct!) and instead makes it regular old ldap which is
> > >bound to fail.
> >
> > I think this is the point.  It's an LDAP record, so it'll get used as LDAP, so
> > that entry is incorrect and should point to the plain/tls port not the LDAPS
> > port.
> >
>
> IIRC the exact same issue came up recently on #sssd on freenode. Someone
> (Stephen perhaps?) suggested that if the port in the SRV entry was set to
> 636 we could try ldaps:// first and fall back to ldap:// instead of simply
> trying ldap:// all the time.
>
> I'm going to file this request as an RFE, but to be honest I'd consider
> it a "nice-to-have-patch-welcome" feature rather than something that
> would be available in the next release:
> https://fedorahosted.org/sssd/ticket/1920

Keep in mind that LDAPS has been deprecated for a decade now which is
why there is also no _ldaps SRV record defined. LDAP + TLS should be
used these days.

(I do not object to trying ldaps if the port is 636 although I agree
this is a low prio RFE)

Simo.

--
Simo Sorce * Red Hat, Inc * New York

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel