ldap-rest 0.6.2 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/abstract/ldapFlat.js +1 -1
  2. package/dist/abstract/plugin.js +1 -1
  3. package/dist/bin/index.js +1 -1
  4. package/dist/config/args.js +1 -1
  5. package/dist/config/schema.js +1 -0
  6. package/dist/lib/expressFormatedResponses.js +1 -1
  7. package/dist/lib/ldapActions.js +1 -1
  8. package/dist/lib/utils.js +1 -1
  9. package/dist/plugins/auth/authzScope.js +1 -0
  10. package/dist/plugins/auth/llng.js +1 -1
  11. package/dist/plugins/ldap/accountLifecycle.js +1 -0
  12. package/dist/plugins/ldap/bulkImport.js +1 -1
  13. package/dist/plugins/ldap/departmentSync.js +1 -1
  14. package/dist/plugins/ldap/enterpriseRules.js +1 -0
  15. package/dist/plugins/ldap/externalUsersInGroups.js +1 -1
  16. package/dist/plugins/ldap/flatGeneric.js +1 -1
  17. package/dist/plugins/ldap/groups.js +1 -1
  18. package/dist/plugins/ldap/organizations.js +1 -1
  19. package/dist/plugins/scim/bulk.js +1 -1
  20. package/dist/plugins/scim/errors.js +1 -1
  21. package/dist/plugins/scim/filter.js +1 -1
  22. package/dist/plugins/scim/groups.js +1 -1
  23. package/dist/plugins/scim/list.js +1 -1
  24. package/dist/plugins/scim/mapping.js +1 -1
  25. package/dist/plugins/scim/patch.js +1 -1
  26. package/dist/plugins/scim/projection.js +1 -0
  27. package/dist/plugins/scim/scim.js +1 -1
  28. package/dist/plugins/scim/users.js +1 -1
  29. package/dist/plugins/twake/calendar.js +1 -0
  30. package/dist/plugins/twake/calendarResources.js +1 -1
  31. package/dist/plugins/twake/james.js +1 -1
  32. package/dist/src/abstract/ldapFlat.d.ts +159 -1
  33. package/dist/src/abstract/plugin.d.ts +13 -0
  34. package/dist/src/config/args.d.ts +5 -0
  35. package/dist/src/config/schema.d.ts +382 -12
  36. package/dist/src/lib/expressFormatedResponses.d.ts +14 -0
  37. package/dist/src/lib/ldapActions.d.ts +59 -6
  38. package/dist/src/lib/utils.d.ts +65 -0
  39. package/dist/src/plugins/auth/authzScope.d.ts +53 -0
  40. package/dist/src/plugins/auth/llng.d.ts +30 -1
  41. package/dist/src/plugins/ldap/accountLifecycle.d.ts +56 -0
  42. package/dist/src/plugins/ldap/departmentSync.d.ts +43 -0
  43. package/dist/src/plugins/ldap/enterpriseRules.d.ts +436 -0
  44. package/dist/src/plugins/ldap/flatGeneric.d.ts +29 -0
  45. package/dist/src/plugins/ldap/groups.d.ts +22 -0
  46. package/dist/src/plugins/ldap/organizations.d.ts +25 -4
  47. package/dist/src/plugins/scim/errors.d.ts +17 -4
  48. package/dist/src/plugins/scim/filter.d.ts +11 -1
  49. package/dist/src/plugins/scim/groups.d.ts +2 -0
  50. package/dist/src/plugins/scim/list.d.ts +3 -5
  51. package/dist/src/plugins/scim/mapping.d.ts +90 -9
  52. package/dist/src/plugins/scim/patch.d.ts +16 -1
  53. package/dist/src/plugins/scim/projection.d.ts +15 -0
  54. package/dist/src/plugins/scim/scim.d.ts +5 -0
  55. package/dist/src/plugins/scim/users.d.ts +21 -0
  56. package/dist/src/plugins/twake/calendar.d.ts +113 -0
  57. package/dist/src/plugins/twake/calendarResources.d.ts +9 -58
  58. package/docs/README.md +2 -0
  59. package/docs/client-development/api/openapi.md +1 -1
  60. package/docs/client-development/browser/libraries.md +1 -1
  61. package/docs/plugin-development/README.md +22 -0
  62. package/docs/plugin-development/dependencies.md +10 -7
  63. package/docs/presentations/en.md +1 -1
  64. package/docs/presentations/fr.md +1 -1
  65. package/docs/usage/README.md +2 -0
  66. package/docs/usage/configuration.md +35 -15
  67. package/docs/usage/directory-audit.md +105 -0
  68. package/docs/usage/plugins/README.md +6 -6
  69. package/docs/usage/plugins/auth/README.md +6 -5
  70. package/docs/usage/plugins/auth/authz-scope.md +103 -0
  71. package/docs/usage/plugins/auth/llng.md +17 -0
  72. package/docs/usage/plugins/integrations/README.md +5 -5
  73. package/docs/usage/plugins/integrations/{calendar-resources.md → calendar.md} +70 -13
  74. package/docs/usage/plugins/integrations/scim.md +147 -38
  75. package/docs/usage/plugins/ldap/README.md +13 -11
  76. package/docs/usage/plugins/ldap/account-lifecycle.md +129 -0
  77. package/docs/usage/plugins/ldap/bulk-import.md +8 -1
  78. package/docs/usage/plugins/ldap/enterprise-rules.md +167 -0
  79. package/docs/usage/plugins/ldap/flat-generic.md +172 -0
  80. package/docs/usage/plugins/ldap/groups.md +10 -4
  81. package/docs/usage/plugins/ldap/organizations.md +59 -33
  82. package/docs/usage/upgrading.md +444 -0
  83. package/package.json +54 -5
  84. package/static/schemas/example/README.md +36 -0
  85. package/static/schemas/example/groups.json +94 -0
  86. package/static/schemas/example/nomenclature/domains.json +49 -0
  87. package/static/schemas/example/organizations.json +106 -0
  88. package/static/schemas/example/positions.json +35 -0
  89. package/static/schemas/example/users.json +246 -0
  90. package/static/schemas/twake/groups.json +81 -15
  91. package/static/schemas/twake/nomenclature/twakeAccountStatus.json +26 -0
  92. package/static/schemas/twake/nomenclature/twakeDeliveryMode.json +22 -0
  93. package/static/schemas/twake/nomenclature/twakeDomain.json +60 -0
  94. package/static/schemas/twake/nomenclature/twakeListType.json +22 -0
  95. package/static/schemas/twake/nomenclature/twakeMailboxType.json +22 -0
  96. package/static/schemas/twake/nomenclature/twakeTitle.json +42 -0
  97. package/static/schemas/twake/organizations.json +92 -12
  98. package/static/schemas/twake/positions.json +22 -4
  99. package/static/schemas/twake/users.json +269 -32
@@ -5,7 +5,15 @@
5
5
  "objectClass": ["top", "twakeAccount", "twakeWhitePages"],
6
6
  "singularName": "user",
7
7
  "pluralName": "users",
8
- "base": "ou=users,__ldap_base__"
8
+ "base": "ou=users,__ldap_base__",
9
+ "label": {
10
+ "en": "Users",
11
+ "fr": "Utilisateurs"
12
+ },
13
+ "singularLabel": {
14
+ "en": "user",
15
+ "fr": "utilisateur"
16
+ }
9
17
  },
10
18
  "strict": true,
11
19
  "attributes": {
@@ -21,80 +29,295 @@
21
29
  },
22
30
  "uid": {
23
31
  "type": "string",
32
+ "searchable": true,
24
33
  "test": "^[a-zA-Z0-9._-]{1,255}$",
25
34
  "required": true,
26
- "role": "identifier"
35
+ "role": "identifier",
36
+ "generated": true,
37
+ "generatedFrom": {
38
+ "attribute": "mail",
39
+ "extract": "^([^@]+)@",
40
+ "lowercase": true,
41
+ "strip": "[^a-zA-Z0-9._-]",
42
+ "onCollision": "suffix"
43
+ },
44
+ "label": {
45
+ "en": "Identifier",
46
+ "fr": "Identifiant"
47
+ }
27
48
  },
28
- "cn": {
49
+ "employeeNumber": {
29
50
  "type": "string",
51
+ "searchable": true,
30
52
  "required": true,
31
- "role": "displayName"
53
+ "unique": { "sentinel": "UNIT" },
54
+ "role": "employeeId",
55
+ "label": {
56
+ "en": "Employee ID",
57
+ "fr": "Matricule"
58
+ }
59
+ },
60
+ "cn": {
61
+ "type": "string",
62
+ "searchable": true,
63
+ "required": false,
64
+ "label": {
65
+ "en": "Common name",
66
+ "fr": "Nom d'annuaire"
67
+ }
32
68
  },
33
69
  "sn": {
34
70
  "type": "string",
35
- "required": true
71
+ "searchable": true,
72
+ "required": true,
73
+ "label": {
74
+ "en": "Last name",
75
+ "fr": "Nom de famille"
76
+ }
77
+ },
78
+ "givenName": {
79
+ "type": "string",
80
+ "searchable": true,
81
+ "required": true,
82
+ "label": {
83
+ "en": "First name",
84
+ "fr": "Prénom"
85
+ }
86
+ },
87
+ "displayName": {
88
+ "type": "string",
89
+ "role": "displayName",
90
+ "required": true,
91
+ "label": {
92
+ "en": "Full name",
93
+ "fr": "Nom complet"
94
+ }
95
+ },
96
+ "personalTitle": {
97
+ "type": "pointer",
98
+ "branch": ["ou=twakeTitle,ou=nomenclature,__LDAP_BASE__"],
99
+ "required": false,
100
+ "label": {
101
+ "en": "Title",
102
+ "fr": "Civilité"
103
+ }
104
+ },
105
+ "title": {
106
+ "type": "pointer",
107
+ "branch": ["ou=positions,__LDAP_BASE__"],
108
+ "required": false,
109
+ "referentialIntegrity": "restrict",
110
+ "role": "position",
111
+ "label": {
112
+ "en": "Position",
113
+ "fr": "Poste"
114
+ }
115
+ },
116
+ "description": {
117
+ "type": "string",
118
+ "required": false,
119
+ "label": {
120
+ "en": "Comment",
121
+ "fr": "Commentaire"
122
+ }
36
123
  },
37
124
  "mail": {
38
125
  "type": "string",
126
+ "searchable": true,
39
127
  "test": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$",
40
- "required": false,
41
- "role": "primaryEmail"
128
+ "hint": "Expected an email address, e.g. jane.doe@example.org",
129
+ "required": true,
130
+ "unique": {
131
+ "attributes": ["mailAlternateAddress"],
132
+ "branches": ["__LDAP_BASE__"]
133
+ },
134
+ "mailDomainScope": "organization",
135
+ "role": "primaryEmail",
136
+ "label": {
137
+ "en": "Email",
138
+ "fr": "Adresse électronique"
139
+ }
42
140
  },
43
141
  "mailAlternateAddress": {
44
142
  "type": "array",
45
143
  "items": {
46
144
  "type": "string",
47
- "test": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"
145
+ "test": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$",
146
+ "hint": "Expected an email address, e.g. jane.doe@example.org"
48
147
  },
49
148
  "required": false,
50
- "role": "emailAliases"
149
+ "unique": {
150
+ "attributes": ["mail"],
151
+ "branches": ["__LDAP_BASE__"]
152
+ },
153
+ "mailDomainScope": "organization",
154
+ "role": "emailAliases",
155
+ "label": {
156
+ "en": "Email aliases",
157
+ "fr": "Alias"
158
+ }
159
+ },
160
+ "twakeOtherMailbox": {
161
+ "type": "array",
162
+ "items": {
163
+ "type": "string",
164
+ "test": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$",
165
+ "hint": "Expected an email address, e.g. jane.doe@example.org"
166
+ },
167
+ "required": false,
168
+ "group": "Mailbox Settings",
169
+ "label": {
170
+ "en": "Other mailboxes",
171
+ "fr": "Autres boîtes"
172
+ }
51
173
  },
52
174
  "mailQuota": {
53
175
  "type": "number",
54
176
  "required": false,
55
- "role": "emailQuota"
177
+ "role": "emailQuota",
178
+ "group": "Mailbox Settings",
179
+ "label": {
180
+ "en": "Mail quota",
181
+ "fr": "Quota"
182
+ }
56
183
  },
57
- "givenName": {
184
+ "mailQuotaSize": {
185
+ "type": "number",
186
+ "required": false,
187
+ "role": "emailQuotaSize",
188
+ "normalize": "byteSize",
189
+ "hint": "Expected pattern xGB, xMB, xKB or a number of bytes",
190
+ "group": "Mailbox Settings",
191
+ "label": {
192
+ "en": "Mailbox size",
193
+ "fr": "Taille de boîte"
194
+ }
195
+ },
196
+ "telephoneNumber": {
58
197
  "type": "string",
59
- "required": false
198
+ "required": false,
199
+ "label": {
200
+ "en": "Phone",
201
+ "fr": "Téléphone"
202
+ }
60
203
  },
61
- "displayName": {
204
+ "mobile": {
62
205
  "type": "string",
63
- "required": false
206
+ "required": false,
207
+ "label": {
208
+ "en": "Mobile",
209
+ "fr": "Mobile"
210
+ }
64
211
  },
65
- "telephoneNumber": {
212
+ "postalAddress": {
66
213
  "type": "string",
67
- "required": false
214
+ "required": false,
215
+ "label": {
216
+ "en": "Address",
217
+ "fr": "Adresse"
218
+ }
68
219
  },
69
- "mobile": {
220
+ "postalCode": {
70
221
  "type": "string",
71
- "required": false
222
+ "required": false,
223
+ "label": {
224
+ "en": "Zip code",
225
+ "fr": "Code postal"
226
+ }
227
+ },
228
+ "l": {
229
+ "type": "string",
230
+ "required": false,
231
+ "label": {
232
+ "en": "Locality",
233
+ "fr": "Commune"
234
+ }
72
235
  },
73
236
  "userPassword": {
74
237
  "type": "string",
75
- "required": false
238
+ "required": false,
239
+ "role": "password",
240
+ "neverReturn": true,
241
+ "label": {
242
+ "en": "Password",
243
+ "fr": "Mot de passe"
244
+ }
245
+ },
246
+ "pwdReset": {
247
+ "type": "boolean",
248
+ "required": false,
249
+ "role": "passwordReset",
250
+ "neverReturn": true,
251
+ "label": {
252
+ "en": "Password reset required",
253
+ "fr": "Changement de mot de passe requis"
254
+ }
76
255
  },
77
256
  "twakeDepartmentLink": {
78
- "type": "string",
79
- "test": "^.*,__LDAP_BASE__",
257
+ "type": "pointer",
258
+ "branch": ["__LDAP_BASE__"],
80
259
  "required": true,
81
- "role": "organizationLink"
260
+ "role": "organizationLink",
261
+ "label": {
262
+ "en": "Department",
263
+ "fr": "Organisation"
264
+ }
82
265
  },
83
266
  "twakeDepartmentPath": {
84
267
  "type": "string",
85
- "test": "^[\\w\\s/,]+$",
268
+ "test": "^[^\\r\\n]{1,4096}$",
86
269
  "required": true,
87
- "role": "organizationPath"
270
+ "generated": true,
271
+ "role": "organizationPath",
272
+ "label": {
273
+ "en": "Department path",
274
+ "fr": "Chemin"
275
+ }
88
276
  },
89
277
  "twakeAccountStatus": {
90
278
  "type": "pointer",
91
279
  "branch": ["ou=twakeAccountStatus,ou=nomenclature,__LDAP_BASE__"],
92
- "required": true
280
+ "required": true,
281
+ "generated": true,
282
+ "role": "accountStatus",
283
+ "default": "cn=active,ou=twakeAccountStatus,ou=nomenclature,__LDAP_BASE__",
284
+ "states": {
285
+ "enabled": "cn=active,ou=twakeAccountStatus,ou=nomenclature,__LDAP_BASE__",
286
+ "disabled": "cn=disabled,ou=twakeAccountStatus,ou=nomenclature,__LDAP_BASE__",
287
+ "noAccess": "cn=noaccess,ou=twakeAccountStatus,ou=nomenclature,__LDAP_BASE__",
288
+ "toDelete": "cn=todelete,ou=twakeAccountStatus,ou=nomenclature,__LDAP_BASE__"
289
+ },
290
+ "label": {
291
+ "en": "Status",
292
+ "fr": "État"
293
+ }
93
294
  },
94
295
  "twakeDeliveryMode": {
95
- "type": "pointer",
96
- "branch": ["ou=twakeDeliveryMode,ou=nomenclature,__LDAP_BASE__"],
97
- "required": true
296
+ "type": "array",
297
+ "items": {
298
+ "type": "pointer",
299
+ "branch": ["ou=twakeDeliveryMode,ou=nomenclature,__LDAP_BASE__"]
300
+ },
301
+ "required": true,
302
+ "generated": true,
303
+ "default": [
304
+ "cn=normal,ou=twakeDeliveryMode,ou=nomenclature,__LDAP_BASE__"
305
+ ],
306
+ "group": "Mailbox Settings",
307
+ "label": {
308
+ "en": "Delivery mode",
309
+ "fr": "Mode de distribution"
310
+ }
311
+ },
312
+ "twakeDeletionDate": {
313
+ "type": "date",
314
+ "required": false,
315
+ "role": "accountExpiry",
316
+ "hint": "Expected a date not earlier than today",
317
+ "label": {
318
+ "en": "Deletion date",
319
+ "fr": "Date de suppression"
320
+ }
98
321
  },
99
322
  "twakeDelegatedUsers": {
100
323
  "type": "array",
@@ -102,11 +325,25 @@
102
325
  "type": "pointer",
103
326
  "branch": ["ou=users,__LDAP_BASE__"]
104
327
  },
105
- "required": false
328
+ "required": false,
329
+ "group": "Mailbox Settings",
330
+ "label": {
331
+ "en": "Delegates",
332
+ "fr": "Délégués"
333
+ }
106
334
  },
107
- "mailQuotaSize": {
108
- "type": "integer",
109
- "required": false
335
+ "memberOf": {
336
+ "type": "array",
337
+ "items": {
338
+ "type": "string"
339
+ },
340
+ "required": false,
341
+ "readOnly": true,
342
+ "role": "groupMemberships",
343
+ "label": {
344
+ "en": "Mailing lists",
345
+ "fr": "Listes de diffusion"
346
+ }
110
347
  }
111
348
  }
112
349
  }