]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/LdapAuthorization/README
2166b272660d56816196ac7bc18e70e87bf567da
[quix0rs-gnu-social.git] / plugins / LdapAuthorization / README
1 The LDAP Authorization plugin allows for StatusNet to handle authorization
2 through LDAP.
3
4 Installation
5 ============
6 add "addPlugin('ldapAuthorization',
7     array('setting'=>'value', 'setting2'=>'value2', ...);"
8 to the bottom of your config.php
9
10 You *cannot* use this plugin without the LDAP Authentication plugin
11
12 Settings
13 ========
14 provider_name*: name of the LDAP authentication provider that this plugin works with.
15 authoritative (false): should this plugin be authoritative for
16     authorization?
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
22     allowed to login
23     
24 The below settings must be exact copies of the settings used for the
25     corresponding LDAP Authentication plugin.
26     
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
47
48 * required
49 default values are in (parenthesis)
50
51 Example
52 =======
53 Here's an example of an LDAP plugin configuration that connects to
54     Microsoft Active Directory.
55
56 addPlugin('ldapAuthentication', array(
57     'provider_name'=>'Example',
58     'authoritative'=>true,
59     'autoregistration'=>true,
60     'binddn'=>'username',
61     'bindpw'=>'password',
62     'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
63     'host'=>array('server1', 'server2'),
64     'password_encoding'=>'ad',
65     'attributes'=>array(
66         'username'=>'sAMAccountName',
67         'nickname'=>'sAMAccountName',
68         'email'=>'mail',
69         'fullname'=>'displayName',
70         'password'=>'unicodePwd')
71 ));
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')
80         ),
81     'binddn'=>'username',
82     'bindpw'=>'password',
83     'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
84     'host'=>array('server1', 'server2')
85 ));
86