Projet

Général

Profil

Paste
Télécharger (7,3 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / ldap / ldap_test / ldap_servers.conf.inc @ bc175c27

1
<?php
2

    
3
/**
4
 * @file
5
 *
6
 */
7

    
8
/*** activedirectory is default Active Directory server config **/
9
function ldap_test_ldap_servers_data() {
10

    
11
$servers['ldapauthor1']['properties']  = array(
12
    'sid' => 'openldap1',
13
    'name'  => 'Test LDAP Server LDAP Authorization' ,
14
    'inDatabase' => TRUE,
15
    'status'  => 1,
16
    'ldap_type'  => 'openldap',
17
    'address'  => 'ldap.hogwarts.edu',
18
    'port'  => 389,
19
    'tls'  => FALSE,
20
    'bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT,
21
    'basedn'  => array(
22
       'dc=hogwarts,dc=edu',
23
      ),
24
    'binddn'  => 'cn=service-account,ou=people,dc=hogwarts,dc=edu',
25
    'bindpw' => 'goodpwd',
26
    'user_dn_expression' => NULL,
27
    'user_attr'  => 'cn',
28
    'mail_attr'  => 'mail',
29
    'mail_template'  => NULL,
30
    'unique_persistent_attr' => 'guid',
31
    'ldap_to_drupal_user' => FALSE,
32
    'ldapToDrupalUserPhp'  => NULL,
33
    'groupObjectClass' => 'groupofnames',
34
    'groupUserMembershipsAttrExists' => FALSE,
35
    'groupUserMembershipsAttr' => NULL,
36
    'groupMembershipsAttr' => 'member',
37
    'groupMembershipsAttrMatchingUserAttr' => 'dn',
38
    'search_pagination' => 0,
39
    'searchPageSize' => NULL,
40
  );
41

    
42

    
43

    
44
$conf['openldap1']['properties']  = array(
45
    'sid' => 'openldap1',
46
    'name'  => 'Test Open LDAP' ,
47
    'inDatabase' => TRUE,
48
    'status'  => 1,
49
    'ldap_type'  => 'openldap',
50
    'address'  => 'ldap.hogwarts.edu',
51
    'port'  => 389,
52
    'tls'  => FALSE,
53
    'bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT,
54
    'basedn'  => array(
55
       'dc=hogwarts,dc=edu',
56
    ),
57
    'binddn'  => 'cn=service-account,ou=people,dc=hogwarts,dc=edu',
58
    'bindpw' => 'goodpwd',
59
    'user_dn_expression' => NULL,
60
    'user_attr'  => 'cn',
61
    'mail_attr'  => 'mail',
62
    'mail_template'  => NULL,
63
    'unique_persistent_attr' => 'guid',
64
    'unique_persistent_attr_binary' => FALSE,
65
    'ldap_to_drupal_user' => FALSE,
66
    'ldapToDrupalUserPhp'  => NULL,
67
    'groupObjectClass' => 'groupofnames',
68
    'groupUserMembershipsAttrExists' => FALSE,
69
    'groupUserMembershipsAttr' => NULL,
70
    'groupMembershipsAttr' => 'member',
71
    'groupMembershipsAttrMatchingUserAttr' => 'dn',
72
    'search_pagination' => 0,
73
    'searchPageSize' => NULL,
74
  );
75

    
76
$conf['openldap1']['methodResponses']['connect'] = LDAP_SUCCESS;
77

    
78

    
79
$conf['openldap1']['search_results'] = array();
80

    
81

    
82
$conf['openldap1']['search_results']['(&(objectClass=group)(|(member=cn=gryffindor,ou=groups,dc=hogwarts,dc=edu)(member=cn=students,ou=groups,dc=hogwarts,dc=edu)(member=cn=honors students,ou=groups,dc=hogwarts,dc=edu)))']['dc=hogwarts,dc=edu'] = array(
83
  0 => array('count' => 1, 'dn' => 'cn=users,ou=groups,dc=hogwarts,dc=edu'),
84
  'count' => 1,
85
);
86

    
87
$conf['openldap1']['search_results']['(cn=hpotter)']['dc=hogwarts,dc=edu'] = array(
88
  0 => array(
89
    'count' => 1,
90
    'dn' => 'cn=hpotter,ou=people,dc=hogwarts,dc=edu',
91
    'FULLENTRY' => TRUE,
92
  ),
93
  'count' => 1,
94
);
95

    
96
$conf['openldap1']['search_results']['(cn=hpotter)']['dc=hogwarts,dc=edu'] = array(
97
  0 => array(
98
    'count' => 1,
99
    'dn' => 'cn=hpotter,ou=people,dc=hogwarts,dc=edu',
100
    'FULLENTRY' => TRUE,
101
  ),
102
  'count' => 1,
103
);
104

    
105
$conf['openldap1']['search_results']['(cn=hpotter-granger)']['dc=hogwarts,dc=edu'] = array(
106
  0 => array(
107
    'count' => 1,
108
    'dn' => 'cn=hpotter,ou=people,dc=hogwarts,dc=edu',
109
    'FULLENTRY' => TRUE,
110
  ),
111
  'count' => 1,
112
);
113

    
114
$conf['openldap1']['search_results']['(cn=ssnape)']['dc=hogwarts,dc=edu'] = array(
115
  0 => array(
116
    'count' => 1,
117
    'dn' => 'cn=ssnape,ou=people,dc=hogwarts,dc=edu',
118
    'FULLENTRY' => TRUE,
119
  ),
120
  'count' => 1,
121
);
122

    
123
$conf['openldap1']['search_results']['(cn=adumbledore)']['dc=hogwarts,dc=edu'] = array(
124
  0 => array(
125
    'count' => 1,
126
    'dn' => 'cn=adumbledore,ou=people,dc=hogwarts,dc=edu',
127
    'FULLENTRY' => TRUE,
128
  ),
129
  'count' => 1,
130
);
131

    
132
$conf['openldap1']['search_results']['(&(objectClass=groupofnames)(member=cn=hpotter,ou=people,dc=hogwarts,dc=edu))']['dc=hogwarts,dc=edu'] = array(
133
  0 => array('count' => 1, 'dn' => 'cn=gryffindor,ou=groups,dc=hogwarts,dc=edu'),
134
  1 => array('count' => 1, 'dn' => 'cn=students,ou=groups,dc=hogwarts,dc=edu'),
135
  2 => array('count' => 1, 'dn' => 'cn=honors students,ou=groups,dc=hogwarts,dc=edu'),
136
  'count' => 3,
137
);
138

    
139
$conf['openldap1']['search_results']['(&(objectClass=groupofnames)(|(member=cn=gryffindor,ou=groups,dc=hogwarts,dc=edu)(member=cn=students,ou=groups,dc=hogwarts,dc=edu)(member=cn=honors students,ou=groups,dc=hogwarts,dc=edu)))']['dc=hogwarts,dc=edu'] = array(
140
  0 => array('count' => 1, 'dn' => 'cn=users,ou=groups,dc=hogwarts,dc=edu'),
141
  'count' => 1,
142
);
143

    
144

    
145

    
146
$conf['activedirectory1']['properties']  = array(
147
    'sid' => 'activedirectory1',
148
    'name'  => 'Test Active Directory LDAP' ,
149
    'inDatabase' => TRUE,
150
    'status'  => 1,
151
    'ldap_type'  => 'activedirectory',
152
    'address'  => 'ldap.hogwarts.edu',
153
    'port'  => 389,
154
    'tls'  => FALSE,
155
    'bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT,
156
    'basedn'  => array(
157
       'dc=hogwarts,dc=edu',
158
    ),
159
    'binddn'  => 'cn=service-account,ou=people,dc=hogwarts,dc=edu',
160
    'bindpw' => 'goodpwd',
161
    'user_dn_expression' => NULL,
162
    'user_attr'  => 'samaccountname',
163
    'mail_attr'  => 'mail',
164
    'mail_template'  => NULL,
165
    'unique_persistent_attr' => 'guid',
166
    'unique_persistent_attr_binary' => FALSE,
167
    'ldap_to_drupal_user' => FALSE,
168
    'ldapToDrupalUserPhp'  => NULL,
169
    'groupNested' => 0,
170
    'groupObjectClass' => 'group',
171
    'groupUserMembershipsAttrExists' => TRUE,
172
    'groupUserMembershipsAttr' => 'memberof',
173
    'groupMembershipsAttr' => 'member',
174
    'groupMembershipsAttrMatchingUserAttr' => 'dn',
175
    'search_pagination' => 0,
176
    'searchPageSize' => NULL,
177
  );
178

    
179
$conf['activedirectory1']['methodResponses']['connect'] = LDAP_SUCCESS;
180
$conf['activedirectory1']['clones'] = LDAP_TEST_USER_ORPHAN_CLONE_COUNT;
181

    
182
$conf['activedirectory1']['search_results'] = array();
183

    
184
$conf['activedirectory1']['search_results']['(&(objectClass=group)(member=cn=hpotter,ou=people,dc=hogwarts,dc=edu))']['dc=hogwarts,dc=edu'] = array(
185
  0 => array('count' => 1, 'dn' => 'cn=gryffindor,ou=groups,dc=hogwarts,dc=edu'),
186
  1 => array('count' => 1, 'dn' => 'cn=students,ou=groups,dc=hogwarts,dc=edu'),
187
  2 => array('count' => 1, 'dn' => 'cn=honors students,ou=groups,dc=hogwarts,dc=edu'),
188
  'count' => 3,
189
);
190

    
191
$conf['activedirectory1']['search_results']['(&(objectClass=group)(|(member=cn=gryffindor,ou=groups,dc=hogwarts,dc=edu)(member=cn=students,ou=groups,dc=hogwarts,dc=edu)(member=cn=honors students,ou=groups,dc=hogwarts,dc=edu)))']['dc=hogwarts,dc=edu'] = array(
192
  0 => array('count' => 1, 'dn' => 'cn=users,ou=groups,dc=hogwarts,dc=edu'),
193
  'count' => 1,
194
);
195

    
196
foreach (array('hpotter', 'hgrainger', 'ssnape', 'adumbledore') as $cn) {
197

    
198
  $conf['activedirectory1']['search_results']["(cn=$cn)"]['dc=hogwarts,dc=edu'] = array(
199
    0 => array(
200
      'count' => 1,
201
      'dn' => "cn=$cn,ou=people,dc=hogwarts,dc=edu",
202
      'FULLENTRY' => TRUE,
203
    ),
204
    'count' => 1,
205
  );
206

    
207
  $conf['activedirectory1']['search_results']["(samaccountname=$cn)"]['dc=hogwarts,dc=edu'] = array(
208
    0 => array(
209
      'count' => 1,
210
      'dn' => "cn=$cn,ou=people,dc=hogwarts,dc=edu",
211
      'FULLENTRY' => TRUE,
212
    ),
213
    'count' => 1,
214
  );
215

    
216
}
217

    
218

    
219
$conf['activedirectory1']['search_results']['(samaccountname=hpotter-granger)']['dc=hogwarts,dc=edu'] = array(
220
  0 => array(
221
    'count' => 1,
222
    'dn' => 'cn=hpotter,ou=people,dc=hogwarts,dc=edu',
223
    'FULLENTRY' => TRUE,
224
  ),
225
  'count' => 1,
226
);
227

    
228

    
229

    
230
return $conf;
231
}