Author Topic: Ldap Authentication patch  (Read 25280 times)

lucor

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Luca's Forge
Ldap Authentication patch
« on: July 29, 2009, 12:30:17 pm »
Hi all,
first off thanks for the great product :)

In attachement you may find a patch to enable OpenGoo to authenticate against a lpad server.
To apply it you need:
- extract the patch in the OpenGoo root
- install the PEAR::Net_LDAP2 package under the OPENGOO_ROOT/library/PEAR folder
- copy the ldap.config.example.php in  ldap.config.php and modify it in according with your ldap server settings.
- create the users you want to allow to login in OpenGoo.

Hope this helps  :)

Luca
2bopen - Open Solutions for Open Minds

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Ldap Authentication patch
« Reply #1 on: July 30, 2009, 10:51:35 am »
Great! I'll try to make it into a plugin and upload it to the plugins section. Of course you will get all the credit :)

neapovea

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Ldap Authentication patch
« Reply #2 on: August 13, 2009, 05:57:14 am »
Hi

Can tell us when is ready the plugin?

Thanks.
alx.

Hitman

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Ldap Authentication patch
« Reply #3 on: September 23, 2009, 12:28:33 pm »
I need help.

I can't get this to work...  ???

Here is what I did so far:

- Downloaded and extracted the patch in my OpenGoo Root directory.
- I placed every file in the patch into the right folders.
- Downloaded PEAR Net_LDAP2 v2.0.6.
- Extracted the content of Net_LDAP2 to the following directories:
       * LDAP2.php --> opengoo_root/library/PEAR/
       * LDAP2 folder --> opengoo_root/library/PEAR/Net
- Configured opengoo_root/config/ldap.config.php with the following settings:

 // The configuration array:
  $config_ldap = array (
      'basedn'    => 'cn=users,dc=serveur1,dc=dct,dc=com',
      'starttls'  => false,
      'port'      => 389,
      'version' => 3,
      'binddn'    => '',   
      'bindpw'    => '',
      'host'      => 'serveur1.dct.com',
      'uid'       => 'uid' //Change in according with your settings to match the userid entry
  );

I was able to connect to my LDAP tree using those settings in ldapbrowser so I think those settings are correct.

        *In OpenGoo, I created a user whose id is the thing as its uid in the LDAP tree.
        * Restarted my web server.

Now, when I login with any username (local to OpenGoo or LDAP based), I only get a blank white page. And when I try to login with a username that does not exist in OpenGoo nor in LDAP, I get the "Failed to log you in" error message.

What am I doing wrong?

I can I debug this? I don't get any errors in LDAP.

I really hope someone can help me with this... OpenGoo seems to be a great product but we really need a solution that can bind to our LDAP server.

Murug

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Ldap Authentication patch
« Reply #4 on: October 06, 2009, 07:40:54 am »
Hi,

  Create the user in opengoo (use the LDAP username and allow the system to create random password. Infact this random password is not going to be used for authentication) using admin user before enabling LDAP. If you enable LDAP authentication before the user entry created in opengoo then the login will fail.

so the order shd be,

1) Create User in Opengoo
2) Enable LDAP
3) Login to opengoo

Thanks,
Muruges

sussox

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Ldap Authentication patch
« Reply #5 on: November 24, 2009, 08:18:01 am »
Did you get this to work? I have the same error as you.. Blank white page when trying to login with a user that exists in ldap.

Hitman

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Ldap Authentication patch
« Reply #6 on: November 24, 2009, 11:00:01 am »
Yes, I was able to get this to work.

This post was also very helpful: http://forums.opengoo.org/index.php?topic=2821.0

You will want to make sure that the LDAP2.php and LDAP2 folder are located in the OPENGOOROOT/library/PEAR/Net folder.

Hope this helps...

sussox

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Ldap Authentication patch
« Reply #7 on: November 24, 2009, 12:05:55 pm »
Ok, some progress but not quite there. Now i only get the red error.

My LDAP conf:

  // The configuration array:
  $config_ldap = array (
      'starttls'  => false,
      'port'      => 389,
      'version' => 3,
      'binddn'    => '',
      'bindpw'    => '',
      'basedn'    => 'cn=users,dc=server,dc=xxxxx,dc=se',
      'host'      => 'server.xxxxx.se',
      'uid'       => 'uid' //Change in according with your settings to match the userid entry
  );
  return true;

?>

I get nothing at all in my logfile (Password Service server Log) on my OS X Server machine  (LDAP-server)

Hitman

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Ldap Authentication patch
« Reply #8 on: November 24, 2009, 12:28:40 pm »
If you use an LDAP browsing utility (such as LDAPBrowser), are you able to browse your LDAP tree with those settings?

sussox

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Ldap Authentication patch
« Reply #9 on: November 24, 2009, 12:30:24 pm »
Yups, works fine..

Hitman

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Ldap Authentication patch
« Reply #10 on: November 24, 2009, 12:39:47 pm »
What is you RED error?

sussox

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Ldap Authentication patch
« Reply #11 on: November 24, 2009, 12:43:09 pm »
only "Failed to log you in. Please check your login data and try again"

using the ldap uid as login and the correct password. But i get no trace of a login in the ldap-log :(

Hitman

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Ldap Authentication patch
« Reply #12 on: November 24, 2009, 12:49:36 pm »
Check in OPENGOOROOT/cache/log.php to see if there is any file missing or other errors.

oarnt

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Ldap Authentication patch
« Reply #13 on: November 24, 2009, 09:34:56 pm »
Hi
we are currenty looking for a project life opengoo and this software seems promising, but we will need ldap support and i am not sure how this "patch" works.
Does it import users from my LDAP Server to the opengoo Database or will i have to create / import each user? Can i map groups from the LDAP Server to groups in OpenGoo?
If this is possible i can start evaluating the whole thing.

sussox

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Ldap Authentication patch
« Reply #14 on: November 25, 2009, 04:37:53 am »
Check in OPENGOOROOT/cache/log.php to see if there is any file missing or other errors.

Super! Found some errors and fixed it. Its working now :)