README 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. The LDAP Authentication plugin allows for StatusNet to handle authentication
  2. through LDAP.
  3. Installation
  4. ============
  5. add "addPlugin('ldapAuthentication',
  6. array('setting'=>'value', 'setting2'=>'value2', ...);"
  7. to the bottom of your config.php
  8. Settings
  9. ========
  10. provider_name*: This is a identifier designated to the connection.
  11. It's how StatusNet will refer to the authentication source.
  12. For the most part, any name can be used, so long as each authentication
  13. source has a different identifier. In most cases there will be only one
  14. authentication source used.
  15. authoritative (false): Set to true if LDAP's responses are authoritative
  16. (if authorative and LDAP fails, no other password checking will be done).
  17. autoregistration (false): Set to true if users should be automatically created
  18. when they attempt to login.
  19. email_changeable (true): Are users allowed to change their email address?
  20. (true or false)
  21. password_changeable (true): Are users allowed to change their passwords?
  22. (true or false)
  23. password_encoding: required if users are to be able to change their passwords
  24. Possible values are: crypt, ext_des, md5crypt, blowfish, md5, sha, ssha,
  25. smd5, ad, clear
  26. host*: LDAP server name to connect to. You can provide several hosts in an
  27. array in which case the hosts are tried from left to right.
  28. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  29. port: Port on the server.
  30. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  31. version: LDAP version.
  32. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  33. starttls: TLS is started after connecting.
  34. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  35. binddn: The distinguished name to bind as (username).
  36. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  37. bindpw: Password for the binddn.
  38. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  39. basedn*: LDAP base name (root directory).
  40. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  41. options: See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  42. filter: Default search filter.
  43. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  44. scope: Default search scope.
  45. See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
  46. schema_cachefile: File location to store ldap schema.
  47. schema_maxage: TTL for cache file.
  48. attributes: an array that relates StatusNet user attributes to LDAP ones
  49. username*: LDAP attribute value entered when authenticating to StatusNet
  50. nickname*: LDAP attribute value shown as the user's nickname
  51. email
  52. fullname
  53. homepage
  54. location
  55. password: required if users are to be able to change their passwords
  56. * required
  57. default values are in (parenthesis)
  58. For most LDAP installations, the "nickname" and "username" attributes should
  59. be the same.
  60. Example
  61. =======
  62. Here's an example of an LDAP plugin configuration that connects to
  63. Microsoft Active Directory.
  64. addPlugin('ldapAuthentication', array(
  65. 'provider_name'=>'Example',
  66. 'authoritative'=>true,
  67. 'autoregistration'=>true,
  68. 'binddn'=>'username',
  69. 'bindpw'=>'password',
  70. 'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
  71. 'host'=>array('server1', 'server2'),
  72. 'password_encoding'=>'ad',
  73. 'attributes'=>array(
  74. 'username'=>'sAMAccountName',
  75. 'nickname'=>'sAMAccountName',
  76. 'email'=>'mail',
  77. 'fullname'=>'displayName',
  78. 'password'=>'unicodePwd')
  79. ));