1 The LDAP Authorization plugin allows for StatusNet to handle authorization
6 add "addPlugin('ldapAuthorization',
7 array('setting'=>'value', 'setting2'=>'value2', ...);"
8 to the bottom of your config.php
10 You *cannot* use this plugin without the LDAP Authentication plugin
14 provider_name*: name of the LDAP authentication provider that this plugin works with.
15 authoritative (false): should this plugin be authoritative for
17 uniqueMember_attribute ('uniqueMember')*: the attribute of a group
18 that lists the DNs of its members
19 roles_to_groups*: array that maps StatusNet roles to LDAP groups
20 some StatusNet roles are: moderator, administrator, sandboxed, silenced
21 login_group: if this is set to a group DN, only members of that group will be
24 The below settings must be exact copies of the settings used for the
25 corresponding LDAP Authentication plugin.
27 host*: LDAP server name to connect to. You can provide several hosts in an
28 array in which case the hosts are tried from left to right.
29 See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
30 port: Port on the server.
31 See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
32 version: LDAP version.
33 See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
34 starttls: TLS is started after connecting.
35 See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
36 binddn: The distinguished name to bind as (username).
37 See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
38 bindpw: Password for the binddn.
39 See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
40 basedn*: LDAP base name (root directory).
41 See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
42 options: See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
43 filter: Default search filter.
44 See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
45 scope: Default search scope.
46 See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
49 default values are in (parenthesis)
53 Here's an example of an LDAP plugin configuration that connects to
54 Microsoft Active Directory.
56 addPlugin('ldapAuthentication', array(
57 'provider_name'=>'Example',
58 'authoritative'=>true,
59 'autoregistration'=>true,
62 'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
63 'host'=>array('server1', 'server2'),
64 'password_encoding'=>'ad',
66 'username'=>'sAMAccountName',
67 'nickname'=>'sAMAccountName',
69 'fullname'=>'displayName',
70 'password'=>'unicodePwd')
72 addPlugin('ldapAuthorization', array(
73 'provider_name'=>'Example',
74 'authoritative'=>false,
75 'uniqueMember_attribute'=>'uniqueMember',
76 'roles_to_groups'=> array(
77 'moderator'=>'CN=SN-Moderators,OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
78 'administrator'=> array('CN=System-Adminstrators,OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
79 'CN=SN-Administrators,OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc')
83 'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
84 'host'=>array('server1', 'server2')