Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Support ldap_sasl_bind() #64

Closed
wants to merge 1 commit into from
Closed

Conversation

mbaynton
Copy link
Contributor

@mbaynton mbaynton commented Jun 6, 2017

From my requests initially made in issue #59, this PR adds support for accomplishing SASL binds.

The vast majority of the PR just facilitates CI. The easiest (and most relevant to me) SASL mechanism to get up & running is EXTERNAL with a TLS client certificate providing the transport layer authentication. Thus it was necessary to generate CA, server, and client certificates and adjust the test server's configuration to also run ldaps.

My main concern is how this should be documented:

  • For users of the API, there's new parameters/options.
  • For developers, it's necessary to copy the client certificate/key to /tmp if they run the tests on their own development machine. In general, some docs on how to run the tests overall would be useful too. I could help with that but not sure where you want them (README.md, other committed .md, external website, ...)

Thanks for reviewing!

commit 6b8cd755d24bfb1d0ed676168ec5dc6c7b338550
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Tue Jun 6 14:01:02 2017 -0500

    CS fixes

commit 5984ebf
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Tue Jun 6 13:54:22 2017 -0500

    CS fixes

commit d106760
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Tue Jun 6 13:45:37 2017 -0500

    Re-add ldap.so for Ubuntu 12.04

commit 259afb6
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Tue Jun 6 13:37:05 2017 -0500

    Cleanup

commit 07708d7
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Tue Jun 6 13:36:53 2017 -0500

    Cleanup

commit ab1eb0d
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Tue Jun 6 11:26:13 2017 -0500

    Do not load already loaded ldap .so

commit f81c1a7
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Tue Jun 6 11:09:11 2017 -0500

    Try removing all the extra packages

commit 7a384dd
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Tue Jun 6 11:03:24 2017 -0500

    Use full CA and signed certificates, commit CA as well for easy future changes

commit c06c3bb
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Mon Jun 5 15:38:02 2017 -0500

    Try making client certs more accessible

commit db7f6b3
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Wed May 31 13:17:45 2017 -0500

    As a test, demand a client cert

commit 9617057
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Wed May 31 11:08:32 2017 -0500

    Change TLSVerifyClient setting

commit 4ab2870
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Fri May 26 16:00:13 2017 -0500

    Print the supported SASL mechs for funsies

commit 798ed9c
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Fri May 26 15:58:34 2017 -0500

    Print the supported SASL mechs for funsies

commit ff618ee
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Fri May 26 10:07:48 2017 -0500

    More package

commit 6e2cb7f
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Fri May 26 10:04:46 2017 -0500

    More package

commit 4180cec
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Fri May 26 10:00:39 2017 -0500

    Use Ubuntu trusty, whose slapd automatically installs the sasl packages

commit b1bb992
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Fri May 26 09:31:28 2017 -0500

    More package

commit 4e06652
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Fri May 26 09:27:08 2017 -0500

    See if package libsasl2-2 is required for even client ceritificate based SASL binds

commit 4af9c75
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Fri May 26 08:52:16 2017 -0500

    See if package cyrus-sasl-gssapi is required for even client ceritificate based SASL binds

commit 5eedbea
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Fri May 26 08:41:48 2017 -0500

    Add uber-debugging output of a SASL external bind using ldapsearch; see if that reveals a clue

commit 404fd02
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 12:57:16 2017 -0500

    do not verify CA of test cert

commit 7fc074e
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 11:05:28 2017 -0500

    Work on fixing up phpunit tests

commit f750ce2
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 10:51:56 2017 -0500

    Make server cert in a predictable location on vagrant and travis environments, update slapd config file to use that location.

commit 715d372
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 10:21:29 2017 -0500

    Try other debug options; stop testing all the things while debugging the devops

commit 8ed1efc
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 10:16:52 2017 -0500

    Try other debug options; stop testing all the things while debugging the devops

commit 7ccd301
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 10:09:54 2017 -0500

    Run slapd in foreground with debug on to see what it has to say for itself

commit 4d53e43
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 09:53:19 2017 -0500

    Add net-tools

commit ebc53ba
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 09:40:27 2017 -0500

    Debugging CI error; print netstat and tell ldapadd to give more debug output.

commit f88ba67
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 09:25:57 2017 -0500

    Debugging CI error; see if we just are not waiting long enough for the service to start?

commit 122e369
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Thu May 25 09:15:57 2017 -0500

    Debugging CI error; see if for some reason running ldaps causes issues with non-SSL binds

commit 7b46771
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Wed May 24 15:26:43 2017 -0500

    Debugging CI error; see if the env vars in bootstrap are a problem.

commit 97d5f5f
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Wed May 24 14:59:12 2017 -0500

    CI environment updates to support SASL-EXTERNAL binds, initial tests for ldap_sasl_bind() capability.

commit 49cb421
Author: Mike Baynton <mbaynton@umn.edu>
Date:   Tue Apr 18 14:32:20 2017 -0500

    A basic concept, at least, for supporting SASL binds. Works in informal/manual testing, still needs automated/CI tests.
heiglandreas added a commit to heiglandreas/zend-ldap that referenced this pull request Jul 2, 2018
heiglandreas added a commit that referenced this pull request Jul 2, 2018
@heiglandreas
Copy link
Member

Thanks for your contribution! I've just merged it into the develop-branch.

Currently the API is not really documented. That's one of the things I would like to get to. I'm going add an Easy-Pick issue as that's something that can be done without too deep knowledge of LDAP or PHP.

@heiglandreas heiglandreas self-assigned this Jul 5, 2018
@heiglandreas heiglandreas added this to the 2.10.0 milestone Jul 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants