]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/LdapAuthorization/README
Don't accept non-objects before testing with "instanceof".
[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*: This is a identifier designated to the connection.
15     It's how StatusNet will refer to the authentication source.
16     For the most part, any name can be used, so long as each authentication
17     source has a different identifier. In most cases there will be only one
18     authentication source used.
19 authoritative (false): should this plugin be authoritative for
20     authorization?
21 uniqueMember_attribute ('uniqueMember')*: the attribute of a group
22     that lists the DNs of its members
23 roles_to_groups: array that maps StatusNet roles to LDAP groups
24     some StatusNet roles are: moderator, administrator, sandboxed, silenced
25 login_group: if this is set to a group DN, only members of that group will be
26     allowed to login
27
28 The below settings must be exact copies of the settings used for the
29     corresponding LDAP Authentication plugin.
30
31 host*: LDAP server name to connect to. You can provide several hosts in an
32     array in which case the hosts are tried from left to right.
33     See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
34 port: Port on the server.
35     See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
36 version: LDAP version.
37     See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
38 starttls: TLS is started after connecting.
39     See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
40 binddn: The distinguished name to bind as (username).
41     See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
42 bindpw: Password for the binddn.
43     See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
44 basedn*: LDAP base name (root directory).
45     See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
46 options: See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
47 filter: Default search filter.
48     See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
49 scope: Default search scope.
50     See http://pear.php.net/manual/en/package.networking.net-ldap2.connecting.php
51
52 attributes: an array that relates StatusNet user attributes to LDAP ones
53     username*: LDAP attribute value entered when authenticating to StatusNet
54
55 * required
56 default values are in (parenthesis)
57
58 Example
59 =======
60 Here's an example of an LDAP plugin configuration that connects to
61     Microsoft Active Directory.
62
63 addPlugin('ldapAuthentication', array(
64     'provider_name'=>'Example',
65     'authoritative'=>true,
66     'autoregistration'=>true,
67     'binddn'=>'username',
68     'bindpw'=>'password',
69     'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
70     'host'=>array('server1', 'server2'),
71     'password_encoding'=>'ad',
72     'attributes'=>array(
73         'username'=>'sAMAccountName',
74         'nickname'=>'sAMAccountName',
75         'email'=>'mail',
76         'fullname'=>'displayName',
77         'password'=>'unicodePwd')
78 ));
79 addPlugin('ldapAuthorization', array(
80     'provider_name'=>'Example',
81     'authoritative'=>false,
82     'uniqueMember_attribute'=>'member',
83     'roles_to_groups'=> array(
84         'moderator'=>'CN=SN-Moderators,OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
85         'administrator'=> array('CN=System-Adminstrators,OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
86                                 'CN=SN-Administrators,OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc')
87         ),
88     'binddn'=>'username',
89     'bindpw'=>'password',
90     'basedn'=>'OU=Users,OU=StatusNet,OU=US,DC=americas,DC=global,DC=loc',
91     'host'=>array('server1', 'server2'),
92     'attributes'=>array(
93         'username'=>'sAMAccountName')
94 ));