ldap-rest 0.0.1

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 (296) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +48 -0
  3. package/bin/cleanup-external-users.mjs +219 -0
  4. package/bin/index.mjs +54 -0
  5. package/bin/sync-james.mjs +190 -0
  6. package/dist/abstract/ldapFlat.js +1 -0
  7. package/dist/abstract/plugin.js +1 -0
  8. package/dist/abstract/twakePlugin.js +1 -0
  9. package/dist/bin/index.js +1 -0
  10. package/dist/config/args.js +1 -0
  11. package/dist/lib/auth/base.js +1 -0
  12. package/dist/lib/authz/base.js +1 -0
  13. package/dist/lib/expressFormatedResponses.js +1 -0
  14. package/dist/lib/ldapActions.js +1 -0
  15. package/dist/lib/parseConfig.js +1 -0
  16. package/dist/lib/utils.js +1 -0
  17. package/dist/logger/winston.js +1 -0
  18. package/dist/plugins/auth/authzLinid1.js +1 -0
  19. package/dist/plugins/auth/authzPerBranch.js +1 -0
  20. package/dist/plugins/auth/crowdsec.js +1 -0
  21. package/dist/plugins/auth/llng.js +1 -0
  22. package/dist/plugins/auth/openidconnect.js +1 -0
  23. package/dist/plugins/auth/rateLimit.js +1 -0
  24. package/dist/plugins/auth/token.js +1 -0
  25. package/dist/plugins/configApi.js +1 -0
  26. package/dist/plugins/demo/helloworld.js +1 -0
  27. package/dist/plugins/ldap/bulkImport.js +1 -0
  28. package/dist/plugins/ldap/departmentSync.js +1 -0
  29. package/dist/plugins/ldap/externalUsersInGroups.js +1 -0
  30. package/dist/plugins/ldap/flatGeneric.js +1 -0
  31. package/dist/plugins/ldap/groups.js +1 -0
  32. package/dist/plugins/ldap/onChange.js +1 -0
  33. package/dist/plugins/ldap/organization.js +1 -0
  34. package/dist/plugins/ldap/trash.js +1 -0
  35. package/dist/plugins/priority.json.js +1 -0
  36. package/dist/plugins/static.js +1 -0
  37. package/dist/plugins/twake/calendarResources.js +1 -0
  38. package/dist/plugins/twake/james.js +1 -0
  39. package/dist/plugins/weblogs.js +1 -0
  40. package/dist/src/abstract/ldapFlat.d.ts +94 -0
  41. package/dist/src/abstract/plugin.d.ts +43 -0
  42. package/dist/src/abstract/twakePlugin.d.ts +90 -0
  43. package/dist/src/bin/index.d.ts +43 -0
  44. package/dist/src/browser/ldap-group-editor/LdapGroupEditor.d.ts +31 -0
  45. package/dist/src/browser/ldap-group-editor/api/GroupApiClient.d.ts +23 -0
  46. package/dist/src/browser/ldap-group-editor/components/CreateGroupModal.d.ts +19 -0
  47. package/dist/src/browser/ldap-group-editor/components/GroupPropertyEditor.d.ts +30 -0
  48. package/dist/src/browser/ldap-group-editor/components/GroupTree.d.ts +17 -0
  49. package/dist/src/browser/ldap-group-editor/components/MoveGroupModal.d.ts +20 -0
  50. package/dist/src/browser/ldap-group-editor/index.d.ts +6 -0
  51. package/dist/src/browser/ldap-group-editor/types.d.ts +58 -0
  52. package/dist/src/browser/ldap-resource-editor/api/ResourceApiClient.d.ts +53 -0
  53. package/dist/src/browser/ldap-resource-editor/cache/CacheManager.d.ts +65 -0
  54. package/dist/src/browser/ldap-resource-editor/index.d.ts +6 -0
  55. package/dist/src/browser/ldap-resource-editor/types.d.ts +78 -0
  56. package/dist/src/browser/ldap-tree-viewer/LdapTreeViewer.d.ts +26 -0
  57. package/dist/src/browser/ldap-tree-viewer/api/LdapApiClient.d.ts +30 -0
  58. package/dist/src/browser/ldap-tree-viewer/components/TreeNode.d.ts +17 -0
  59. package/dist/src/browser/ldap-tree-viewer/components/TreeRoot.d.ts +14 -0
  60. package/dist/src/browser/ldap-tree-viewer/index.d.ts +7 -0
  61. package/dist/src/browser/ldap-tree-viewer/store/Store.d.ts +18 -0
  62. package/dist/src/browser/ldap-tree-viewer/store/actions.d.ts +28 -0
  63. package/dist/src/browser/ldap-tree-viewer/store/reducers.d.ts +7 -0
  64. package/dist/src/browser/ldap-tree-viewer/types.d.ts +34 -0
  65. package/dist/src/browser/ldap-unit-editor/LdapUnitEditor.d.ts +27 -0
  66. package/dist/src/browser/ldap-unit-editor/api/UnitApiClient.d.ts +24 -0
  67. package/dist/src/browser/ldap-unit-editor/components/MoveUnitModal.d.ts +28 -0
  68. package/dist/src/browser/ldap-unit-editor/components/UnitPropertyEditor.d.ts +28 -0
  69. package/dist/src/browser/ldap-unit-editor/components/UnitTree.d.ts +18 -0
  70. package/dist/src/browser/ldap-unit-editor/index.d.ts +6 -0
  71. package/dist/src/browser/ldap-unit-editor/types.d.ts +55 -0
  72. package/dist/src/browser/ldap-user-editor/LdapUserEditor.d.ts +32 -0
  73. package/dist/src/browser/ldap-user-editor/api/UserApiClient.d.ts +55 -0
  74. package/dist/src/browser/ldap-user-editor/cache/CacheManager.d.ts +65 -0
  75. package/dist/src/browser/ldap-user-editor/components/MoveUserModal.d.ts +28 -0
  76. package/dist/src/browser/ldap-user-editor/components/PointerField.d.ts +22 -0
  77. package/dist/src/browser/ldap-user-editor/components/UserEditor.d.ts +46 -0
  78. package/dist/src/browser/ldap-user-editor/components/UserList.d.ts +24 -0
  79. package/dist/src/browser/ldap-user-editor/components/UserTree.d.ts +24 -0
  80. package/dist/src/browser/ldap-user-editor/index.d.ts +7 -0
  81. package/dist/src/browser/ldap-user-editor/types.d.ts +67 -0
  82. package/dist/src/browser/shared/components/Modal.d.ts +38 -0
  83. package/dist/src/browser/shared/components/StatusMessage.d.ts +48 -0
  84. package/dist/src/browser/shared/index.d.ts +10 -0
  85. package/dist/src/browser/shared/types/index.d.ts +65 -0
  86. package/dist/src/browser/shared/utils/dom.d.ts +33 -0
  87. package/dist/src/browser/shared/utils/form.d.ts +28 -0
  88. package/dist/src/browser/shared/utils/schema.d.ts +29 -0
  89. package/dist/src/config/args.d.ts +128 -0
  90. package/dist/src/config/schema.d.ts +18 -0
  91. package/dist/src/hooks.d.ts +76 -0
  92. package/dist/src/lib/auth/base.d.ts +9 -0
  93. package/dist/src/lib/authz/base.d.ts +63 -0
  94. package/dist/src/lib/expressFormatedResponses.d.ts +26 -0
  95. package/dist/src/lib/ldapActions.d.ts +91 -0
  96. package/dist/src/lib/parseConfig.d.ts +23 -0
  97. package/dist/src/lib/utils.d.ts +73 -0
  98. package/dist/src/logger/winston.d.ts +3 -0
  99. package/dist/src/plugins/auth/authzLinid1.d.ts +46 -0
  100. package/dist/src/plugins/auth/authzPerBranch.d.ts +59 -0
  101. package/dist/src/plugins/auth/crowdsec.d.ts +29 -0
  102. package/dist/src/plugins/auth/llng.d.ts +8 -0
  103. package/dist/src/plugins/auth/openidconnect.d.ts +11 -0
  104. package/dist/src/plugins/auth/rateLimit.d.ts +24 -0
  105. package/dist/src/plugins/auth/token.d.ts +17 -0
  106. package/dist/src/plugins/configApi.d.ts +24 -0
  107. package/dist/src/plugins/demo/helloworld.d.ts +12 -0
  108. package/dist/src/plugins/ldap/bulkImport.d.ts +48 -0
  109. package/dist/src/plugins/ldap/departmentSync.d.ts +35 -0
  110. package/dist/src/plugins/ldap/externalUsersInGroups.d.ts +21 -0
  111. package/dist/src/plugins/ldap/flatGeneric.d.ts +31 -0
  112. package/dist/src/plugins/ldap/groups.d.ts +95 -0
  113. package/dist/src/plugins/ldap/onChange.d.ts +32 -0
  114. package/dist/src/plugins/ldap/organization.d.ts +65 -0
  115. package/dist/src/plugins/ldap/trash.d.ts +52 -0
  116. package/dist/src/plugins/static.d.ts +7 -0
  117. package/dist/src/plugins/twake/calendarResources.d.ts +31 -0
  118. package/dist/src/plugins/twake/james.d.ts +83 -0
  119. package/dist/src/plugins/weblogs.d.ts +8 -0
  120. package/docs/DEVELOPER_GUIDE.md +298 -0
  121. package/docs/OPENAPI.md +440 -0
  122. package/docs/PLUGIN_DEPENDENCIES.md +612 -0
  123. package/docs/README.md +466 -0
  124. package/docs/api/REFERENCE.md +983 -0
  125. package/docs/api/REST_API.md +1237 -0
  126. package/docs/authentication.md +469 -0
  127. package/docs/authzLinid1.md +521 -0
  128. package/docs/authzPerBranch.md +596 -0
  129. package/docs/browser/LIBRARIES.md +1196 -0
  130. package/docs/examples/EXAMPLES.md +1659 -0
  131. package/docs/examples/twake-mailbox-type-nomenclature.ldif +37 -0
  132. package/docs/examples/twake-mailbox-type-schema-amendment.ldif +30 -0
  133. package/docs/jamesTeamMailboxes.md +343 -0
  134. package/docs/ldapBulkImport.md +722 -0
  135. package/docs/ldapExternalUsersInGroups.md +325 -0
  136. package/docs/ldapFlatGeneric.md +444 -0
  137. package/docs/ldapGroups.md +589 -0
  138. package/docs/ldapOrganizations.md +659 -0
  139. package/docs/ldapTrash.md +260 -0
  140. package/docs/linagora.png +0 -0
  141. package/docs/onChange.md +318 -0
  142. package/docs/plugins/DEVELOPMENT.md +1219 -0
  143. package/docs/presenterm-fr.md +721 -0
  144. package/docs/presenterm.md +721 -0
  145. package/docs/schemas/SCHEMAS.md +1212 -0
  146. package/docs/static.md +410 -0
  147. package/docs/twakeCalendarResources.md +148 -0
  148. package/docs/twakeJames.md +661 -0
  149. package/docs/weblogs.md +399 -0
  150. package/examples/web/ldap-group-editor.html +113 -0
  151. package/examples/web/ldap-tree-viewer.html +368 -0
  152. package/examples/web/ldap-unit-editor.html +108 -0
  153. package/examples/web/ldap-user-editor.html +412 -0
  154. package/package.json +458 -0
  155. package/static/browser/common-demo.css +450 -0
  156. package/static/browser/ldap-group-editor/LdapGroupEditor.js +207 -0
  157. package/static/browser/ldap-group-editor/LdapGroupEditor.js.map +1 -0
  158. package/static/browser/ldap-group-editor/api/GroupApiClient.js +112 -0
  159. package/static/browser/ldap-group-editor/api/GroupApiClient.js.map +1 -0
  160. package/static/browser/ldap-group-editor/components/CreateGroupModal.js +212 -0
  161. package/static/browser/ldap-group-editor/components/CreateGroupModal.js.map +1 -0
  162. package/static/browser/ldap-group-editor/components/GroupPropertyEditor.js +497 -0
  163. package/static/browser/ldap-group-editor/components/GroupPropertyEditor.js.map +1 -0
  164. package/static/browser/ldap-group-editor/components/GroupTree.js +153 -0
  165. package/static/browser/ldap-group-editor/components/GroupTree.js.map +1 -0
  166. package/static/browser/ldap-group-editor/components/MoveGroupModal.js +235 -0
  167. package/static/browser/ldap-group-editor/components/MoveGroupModal.js.map +1 -0
  168. package/static/browser/ldap-group-editor/index.js +2 -0
  169. package/static/browser/ldap-group-editor/index.js.map +1 -0
  170. package/static/browser/ldap-group-editor/types.js +2 -0
  171. package/static/browser/ldap-group-editor/types.js.map +1 -0
  172. package/static/browser/ldap-group-editor.esm.js +1399 -0
  173. package/static/browser/ldap-group-editor.esm.js.map +1 -0
  174. package/static/browser/ldap-group-editor.js +1407 -0
  175. package/static/browser/ldap-group-editor.js.map +1 -0
  176. package/static/browser/ldap-group-editor.min.js +2 -0
  177. package/static/browser/ldap-group-editor.min.js.map +1 -0
  178. package/static/browser/ldap-resource-editor/api/ResourceApiClient.js +226 -0
  179. package/static/browser/ldap-resource-editor/api/ResourceApiClient.js.map +1 -0
  180. package/static/browser/ldap-resource-editor/cache/CacheManager.js +123 -0
  181. package/static/browser/ldap-resource-editor/cache/CacheManager.js.map +1 -0
  182. package/static/browser/ldap-resource-editor/index.js +2 -0
  183. package/static/browser/ldap-resource-editor/index.js.map +1 -0
  184. package/static/browser/ldap-resource-editor/types.js +2 -0
  185. package/static/browser/ldap-resource-editor/types.js.map +1 -0
  186. package/static/browser/ldap-tree-viewer/LdapTreeViewer.js +187 -0
  187. package/static/browser/ldap-tree-viewer/LdapTreeViewer.js.map +1 -0
  188. package/static/browser/ldap-tree-viewer/api/LdapApiClient.js +50 -0
  189. package/static/browser/ldap-tree-viewer/api/LdapApiClient.js.map +1 -0
  190. package/static/browser/ldap-tree-viewer/components/TreeNode.js +140 -0
  191. package/static/browser/ldap-tree-viewer/components/TreeNode.js.map +1 -0
  192. package/static/browser/ldap-tree-viewer/components/TreeRoot.js +98 -0
  193. package/static/browser/ldap-tree-viewer/components/TreeRoot.js.map +1 -0
  194. package/static/browser/ldap-tree-viewer/index.js +2 -0
  195. package/static/browser/ldap-tree-viewer/index.js.map +1 -0
  196. package/static/browser/ldap-tree-viewer/store/Store.js +29 -0
  197. package/static/browser/ldap-tree-viewer/store/Store.js.map +1 -0
  198. package/static/browser/ldap-tree-viewer/store/actions.js +53 -0
  199. package/static/browser/ldap-tree-viewer/store/actions.js.map +1 -0
  200. package/static/browser/ldap-tree-viewer/store/reducers.js +79 -0
  201. package/static/browser/ldap-tree-viewer/store/reducers.js.map +1 -0
  202. package/static/browser/ldap-tree-viewer/types.js +2 -0
  203. package/static/browser/ldap-tree-viewer/types.js.map +1 -0
  204. package/static/browser/ldap-tree-viewer.css +2 -0
  205. package/static/browser/ldap-tree-viewer.css.map +1 -0
  206. package/static/browser/ldap-tree-viewer.esm.js +606 -0
  207. package/static/browser/ldap-tree-viewer.esm.js.map +1 -0
  208. package/static/browser/ldap-tree-viewer.js +614 -0
  209. package/static/browser/ldap-tree-viewer.js.map +1 -0
  210. package/static/browser/ldap-tree-viewer.min.js +2 -0
  211. package/static/browser/ldap-tree-viewer.min.js.map +1 -0
  212. package/static/browser/ldap-unit-editor/LdapUnitEditor.js +119 -0
  213. package/static/browser/ldap-unit-editor/LdapUnitEditor.js.map +1 -0
  214. package/static/browser/ldap-unit-editor/api/UnitApiClient.js +95 -0
  215. package/static/browser/ldap-unit-editor/api/UnitApiClient.js.map +1 -0
  216. package/static/browser/ldap-unit-editor/components/MoveUnitModal.js +295 -0
  217. package/static/browser/ldap-unit-editor/components/MoveUnitModal.js.map +1 -0
  218. package/static/browser/ldap-unit-editor/components/UnitPropertyEditor.js +321 -0
  219. package/static/browser/ldap-unit-editor/components/UnitPropertyEditor.js.map +1 -0
  220. package/static/browser/ldap-unit-editor/components/UnitTree.js +197 -0
  221. package/static/browser/ldap-unit-editor/components/UnitTree.js.map +1 -0
  222. package/static/browser/ldap-unit-editor/index.js +2 -0
  223. package/static/browser/ldap-unit-editor/index.js.map +1 -0
  224. package/static/browser/ldap-unit-editor/types.js +2 -0
  225. package/static/browser/ldap-unit-editor/types.js.map +1 -0
  226. package/static/browser/ldap-unit-editor.esm.js +1013 -0
  227. package/static/browser/ldap-unit-editor.esm.js.map +1 -0
  228. package/static/browser/ldap-unit-editor.js +1021 -0
  229. package/static/browser/ldap-unit-editor.js.map +1 -0
  230. package/static/browser/ldap-unit-editor.min.js +2 -0
  231. package/static/browser/ldap-unit-editor.min.js.map +1 -0
  232. package/static/browser/ldap-user-editor/LdapUserEditor.js +184 -0
  233. package/static/browser/ldap-user-editor/LdapUserEditor.js.map +1 -0
  234. package/static/browser/ldap-user-editor/api/UserApiClient.js +209 -0
  235. package/static/browser/ldap-user-editor/api/UserApiClient.js.map +1 -0
  236. package/static/browser/ldap-user-editor/cache/CacheManager.js +123 -0
  237. package/static/browser/ldap-user-editor/cache/CacheManager.js.map +1 -0
  238. package/static/browser/ldap-user-editor/components/MoveUserModal.js +302 -0
  239. package/static/browser/ldap-user-editor/components/MoveUserModal.js.map +1 -0
  240. package/static/browser/ldap-user-editor/components/PointerField.js +152 -0
  241. package/static/browser/ldap-user-editor/components/PointerField.js.map +1 -0
  242. package/static/browser/ldap-user-editor/components/UserEditor.js +608 -0
  243. package/static/browser/ldap-user-editor/components/UserEditor.js.map +1 -0
  244. package/static/browser/ldap-user-editor/components/UserList.js +181 -0
  245. package/static/browser/ldap-user-editor/components/UserList.js.map +1 -0
  246. package/static/browser/ldap-user-editor/components/UserTree.js +164 -0
  247. package/static/browser/ldap-user-editor/components/UserTree.js.map +1 -0
  248. package/static/browser/ldap-user-editor/index.js +2 -0
  249. package/static/browser/ldap-user-editor/index.js.map +1 -0
  250. package/static/browser/ldap-user-editor/types.js +2 -0
  251. package/static/browser/ldap-user-editor/types.js.map +1 -0
  252. package/static/browser/ldap-user-editor.css +2 -0
  253. package/static/browser/ldap-user-editor.css.map +1 -0
  254. package/static/browser/ldap-user-editor.esm.js +1897 -0
  255. package/static/browser/ldap-user-editor.esm.js.map +1 -0
  256. package/static/browser/ldap-user-editor.js +1905 -0
  257. package/static/browser/ldap-user-editor.js.map +1 -0
  258. package/static/browser/ldap-user-editor.min.js +2 -0
  259. package/static/browser/ldap-user-editor.min.js.map +1 -0
  260. package/static/browser/shared/components/Modal.js +121 -0
  261. package/static/browser/shared/components/Modal.js.map +1 -0
  262. package/static/browser/shared/components/StatusMessage.js +119 -0
  263. package/static/browser/shared/components/StatusMessage.js.map +1 -0
  264. package/static/browser/shared/index.js +7 -0
  265. package/static/browser/shared/index.js.map +1 -0
  266. package/static/browser/shared/types/index.js +37 -0
  267. package/static/browser/shared/types/index.js.map +1 -0
  268. package/static/browser/shared/utils/dom.js +78 -0
  269. package/static/browser/shared/utils/dom.js.map +1 -0
  270. package/static/browser/shared/utils/form.js +234 -0
  271. package/static/browser/shared/utils/form.js.map +1 -0
  272. package/static/browser/shared/utils/schema.js +121 -0
  273. package/static/browser/shared/utils/schema.js.map +1 -0
  274. package/static/browser/shared.esm.js +694 -0
  275. package/static/browser/shared.esm.js.map +1 -0
  276. package/static/browser/shared.js +723 -0
  277. package/static/browser/shared.js.map +1 -0
  278. package/static/browser/shared.min.js +2 -0
  279. package/static/browser/shared.min.js.map +1 -0
  280. package/static/schemas/ad/computers.json +92 -0
  281. package/static/schemas/ad/groups.json +55 -0
  282. package/static/schemas/ad/organizations.json +66 -0
  283. package/static/schemas/ad/users.json +116 -0
  284. package/static/schemas/standard/devices.json +72 -0
  285. package/static/schemas/standard/groups.json +54 -0
  286. package/static/schemas/standard/organizations.json +49 -0
  287. package/static/schemas/standard/users.json +86 -0
  288. package/static/schemas/twake/groups.json +75 -0
  289. package/static/schemas/twake/nomenclature/twakeAccountStatus.json +31 -0
  290. package/static/schemas/twake/nomenclature/twakeDeliveryMode.json +31 -0
  291. package/static/schemas/twake/nomenclature/twakeListType.json +31 -0
  292. package/static/schemas/twake/nomenclature/twakeMailboxType.json +31 -0
  293. package/static/schemas/twake/nomenclature/twakeTitle.json +31 -0
  294. package/static/schemas/twake/organizations.json +52 -0
  295. package/static/schemas/twake/positions.json +32 -0
  296. package/static/schemas/twake/users.json +112 -0
@@ -0,0 +1,721 @@
1
+ ---
2
+ title: LDAP-Rest
3
+ sub_title: Lightweight Directory Manager
4
+ ---
5
+
6
+ # LDAP-Rest
7
+
8
+ ## Lightweight Directory Manager with Plugin Architecture
9
+
10
+ ![LDAP-Rest Logo](./linagora.png)
11
+
12
+ <!-- end_slide -->
13
+
14
+ # What is LDAP-Rest?
15
+
16
+ A **lightweight** and **extensible** directory manager for LDAP
17
+
18
+ ## Key Features
19
+
20
+ - 🔌 **Plugin Architecture** - Modular and extensible functionality
21
+ - 🔄 **Automatic LDAP Consistency** - Data consistency plugins
22
+ - 🌐 **Complete REST API** - LDAP management via HTTP
23
+ - 🎨 **Browser Libraries** - Ready-to-use UI components
24
+ - 🔐 **Configurable Authentication** - Token, OIDC, LLNG, etc.
25
+ - ⚡ **Lightweight and Fast** - Minimal memory footprint
26
+ - 📦 **TypeScript** - Strict typing and safety
27
+
28
+ <!-- end_slide -->
29
+
30
+ # Architecture
31
+
32
+ ## Technology Stack
33
+
34
+ ```
35
+ ┌─────────────────────────────────────┐
36
+ │ REST API (Express) │
37
+ ├─────────────────────────────────────┤
38
+ │ Plugin System │
39
+ │ ┌──────────┬──────────┬─────────┐ │
40
+ │ │ Auth │ LDAP │ Twake │ │
41
+ │ └──────────┴──────────┴─────────┘ │
42
+ ├─────────────────────────────────────┤
43
+ │ LDAP Client (ldapts) │
44
+ └─────────────────────────────────────┘
45
+ ```
46
+
47
+ - **Runtime**: Node.js + TypeScript (ES Modules)
48
+ - **Build**: Rollup (dual config: server + browser)
49
+ - **Test**: Mocha + Chai
50
+ - **LDAP**: ldapts (modern client)
51
+
52
+ <!-- end_slide -->
53
+
54
+ # Plugin Architecture
55
+
56
+ ## Event System and Hooks
57
+
58
+ ```typescript
59
+ export default class MyPlugin extends DmPlugin {
60
+ name = 'myPlugin';
61
+ dependencies = { onChange: 'core/ldap/onChange' };
62
+
63
+ hooks: Hooks = {
64
+ onLdapChange: async (dn, changes) => {
65
+ // React to LDAP changes
66
+ },
67
+ onBeforeResponse: async (req, res, data) => {
68
+ // Modify API responses
69
+ },
70
+ };
71
+ }
72
+ ```
73
+
74
+ <!-- end_slide -->
75
+
76
+ # Available Plugins
77
+
78
+ ## Authentication
79
+
80
+ - **token** - Bearer Token Authentication
81
+ - **openidconnect** - OpenID Connect / OAuth2
82
+ - **llng** - LemonLDAP::NG SSO
83
+ - **crowdsec** - Abuse Protection
84
+ - **rateLimit** - Rate Limiting
85
+ - **authzPerBranch** - Authorization per LDAP Branch
86
+ - **authzLinid1** - LinID v1 Authorization
87
+
88
+ <!-- end_slide -->
89
+
90
+ # Available Plugins (continued)
91
+
92
+ ## LDAP Core
93
+
94
+ - **onChange** - Change Detection and Notification
95
+ - **flatGeneric** - Schema-Driven Generic Management
96
+ - **groups** - LDAP Group Management
97
+ - **organization** - Organizational Hierarchy
98
+ - **externalUsersInGroups** - External Users in Groups
99
+
100
+ ## Integrations
101
+
102
+ - **twake/james** - Apache James Synchronization (mail)
103
+ - **twake/calendarResources** - Calendar Resources
104
+
105
+ <!-- end_slide -->
106
+
107
+ # Apache James Plugin
108
+
109
+ ## LDAP ↔ Mail Consistency Plugin
110
+
111
+ [Apache James](https://james.apache.org/) is an open source mail server (SMTP, IMAP, POP3)
112
+
113
+ ### Plugin Features
114
+
115
+ - 📧 **Automatic LDAP → James Sync**
116
+ - 🔄 **Mail Address Changes** - Account renaming + data
117
+ - 💾 **Quota Management** - Automatic updates
118
+ - 👥 **Mailing Lists** - LDAP Groups → Address Groups
119
+ - 📨 **Mail Aliases** - mailAlternateAddress → James aliases
120
+ - 🎯 **WebAdmin API** - REST Communication
121
+
122
+ ### 🔐 Consistency Guarantee
123
+
124
+ **All LDAP modifications are automatically propagated to James**
125
+
126
+ - ✅ No desynchronization
127
+ - ✅ No manual intervention
128
+ - ✅ Real-time consistency
129
+
130
+ <!-- end_slide -->
131
+
132
+ # James Plugin - Consistency Scenarios
133
+
134
+ ## 1. Mail Address Change
135
+
136
+ ```
137
+ LDAP: mail = alice@example.com → alice.smith@example.com
138
+ ↓ onChange detects the change
139
+ ↓ Hook onLdapMailChange triggered
140
+ ↓
141
+ James WebAdmin: POST /users/alice@.../rename/alice.smith@...
142
+ → Account renamed
143
+ → Mailbox preserved (inbox, sent, folders)
144
+ → Old alias created automatically
145
+ ✅ CONSISTENCY GUARANTEED
146
+ ```
147
+
148
+ ## 2. Quota Update
149
+
150
+ ```
151
+ LDAP: mailQuota = 1000000000 → 5000000000 (1GB → 5GB)
152
+ ↓ onChange detects the change
153
+ ↓ Hook onLdapQuotaChange triggered
154
+ ↓
155
+ James WebAdmin: PUT /quota/users/alice@.../size
156
+ → Quota updated immediately
157
+ ✅ CONSISTENCY GUARANTEED
158
+ ```
159
+
160
+ <!-- end_slide -->
161
+
162
+ # James Plugin - List Consistency
163
+
164
+ ## LDAP Groups → James Address Groups
165
+
166
+ ```bash
167
+ # Create a group with mail attribute
168
+ POST /api/v1/ldap/groups
169
+ {
170
+ "cn": "engineering",
171
+ "mail": "engineering@company.com",
172
+ "member": ["uid=alice,...", "uid=bob,..."]
173
+ }
174
+ ```
175
+
176
+ ### Automatic List Consistency
177
+
178
+ 1. ✅ **Creation** → Group created in James + members added
179
+ 2. ✅ **Add Member** → Member added to James list
180
+ 3. ✅ **Remove Member** → Member removed from James list
181
+ 4. ✅ **Delete Group** → List deleted in James
182
+
183
+ ### Guarantee
184
+
185
+ **LDAP is the source of truth, James stays synchronized**
186
+
187
+ <!-- end_slide -->
188
+
189
+ # LDAP Consistency
190
+
191
+ ## Automatic Consistency Plugins
192
+
193
+ LDAP-Rest automatically maintains **consistency** between LDAP and external systems
194
+
195
+ ### Mechanisms
196
+
197
+ 1. **onChange** detects all LDAP changes
198
+ 2. Plugins react via hooks
199
+ 3. Automatic corrective actions
200
+ 4. **Referential integrity guarantee**
201
+
202
+ ### Examples - LDAP Consistency
203
+
204
+ - **User Deletion** → Automatic removal from groups
205
+ - **DN Change** → Reference updates
206
+ - **External Users** → Maintained in groups
207
+
208
+ ### Examples - LDAP ↔ James Consistency
209
+
210
+ - **Mail Change** → Account renaming + James alias
211
+ - **Quota Modification** → Immediate propagation
212
+ - **Alias Management** → Bidirectional LDAP/James sync
213
+
214
+ <!-- end_slide -->
215
+
216
+ # REST API
217
+
218
+ ## Main Endpoints
219
+
220
+ ```bash
221
+ # Organizations
222
+ GET /api/v1/ldap/organizations/:dn
223
+ GET /api/v1/ldap/organizations/:dn/subnodes
224
+ GET /api/v1/ldap/organizations/:dn/subnodes/search
225
+
226
+ # Users (flatGeneric)
227
+ GET /api/v1/ldap/users
228
+ POST /api/v1/ldap/users
229
+ GET /api/v1/ldap/users/:dn
230
+ PUT /api/v1/ldap/users/:dn
231
+ DELETE /api/v1/ldap/users/:dn
232
+
233
+ # Groups
234
+ GET /api/v1/ldap/groups
235
+ POST /api/v1/ldap/groups
236
+ ```
237
+
238
+ <!-- end_slide -->
239
+
240
+ # JSON Schemas
241
+
242
+ ## Schema-Driven Architecture
243
+
244
+ Schemas define:
245
+
246
+ - LDAP object structure
247
+ - Data validation
248
+ - Auto-generated UI (browser)
249
+ - Automatic documentation
250
+
251
+ ```json
252
+ {
253
+ "objectClass": "inetOrgPerson",
254
+ "fields": {
255
+ "uid": { "type": "string", "required": true },
256
+ "mail": { "type": "string", "format": "email" },
257
+ "displayName": { "type": "string" }
258
+ }
259
+ }
260
+ ```
261
+
262
+ <!-- end_slide -->
263
+
264
+ # Available Schemas
265
+
266
+ ## Standard LDAP
267
+
268
+ - **users** - Users (inetOrgPerson)
269
+ - **groups** - Groups (groupOfNames)
270
+ - **organizations** - Organizations (organizationalUnit)
271
+
272
+ ## Active Directory
273
+
274
+ - **ad/users** - AD Users
275
+ - **ad/groups** - AD Groups
276
+
277
+ ## Twake
278
+
279
+ - **twake/users** - Twake Extensions
280
+ - **twake/groups** - Twake Groups
281
+ - **twake/positions** - Positions/Functions
282
+
283
+ <!-- end_slide -->
284
+
285
+ # Browser Libraries
286
+
287
+ ## Ready-to-Use UI Components
288
+
289
+ ### LdapTreeViewer
290
+
291
+ Interactive tree for navigating LDAP organizations
292
+
293
+ ### LdapUserEditor
294
+
295
+ Complete user management interface
296
+
297
+ - Organizational tree
298
+ - User list
299
+ - Edit form
300
+
301
+ <!-- end_slide -->
302
+
303
+ # LdapTreeViewer
304
+
305
+ ## Usage
306
+
307
+ ```typescript
308
+ import LdapTreeViewer from 'ldap-rest/browser-ldap-tree-viewer-index';
309
+
310
+ const viewer = new LdapTreeViewer({
311
+ containerId: 'tree-container',
312
+ apiBaseUrl: 'http://localhost:8081',
313
+ onNodeClick: node => {
314
+ console.log('Selection:', node.dn);
315
+ },
316
+ });
317
+
318
+ await viewer.init();
319
+ ```
320
+
321
+ <!-- end_slide -->
322
+
323
+ # LdapUserEditor
324
+
325
+ ## Usage
326
+
327
+ ```typescript
328
+ import LdapUserEditor from 'ldap-rest/browser-ldap-user-editor-index';
329
+
330
+ const editor = new LdapUserEditor({
331
+ containerId: 'editor-container',
332
+ apiBaseUrl: 'http://localhost:8081',
333
+ onUserSaved: userDn => {
334
+ console.log('User saved:', userDn);
335
+ },
336
+ });
337
+
338
+ await editor.init();
339
+ ```
340
+
341
+ <!-- end_slide -->
342
+
343
+ # Installation and Quick Start
344
+
345
+ ## Installation
346
+
347
+ ```bash
348
+ npm install ldap-rest
349
+ ```
350
+
351
+ ## Quick Start
352
+
353
+ ```bash
354
+ npx ldap-rest \
355
+ --ldap-base 'dc=example,dc=com' \
356
+ --ldap-dn 'cn=admin,dc=example,dc=com' \
357
+ --ldap-pwd admin \
358
+ --ldap-url ldap://localhost \
359
+ --plugin core/ldap/groups \
360
+ --plugin core/ldap/organization
361
+ ```
362
+
363
+ <!-- end_slide -->
364
+
365
+ # Configuration
366
+
367
+ ## Environment Variables
368
+
369
+ ```bash
370
+ # LDAP Connection
371
+ DM_LDAP_URL=ldap://localhost:389
372
+ DM_LDAP_DN=cn=admin,dc=example,dc=com
373
+ DM_LDAP_PWD=adminpassword
374
+ DM_LDAP_BASE=ou=users,dc=example,dc=com
375
+
376
+ # HTTP Server
377
+ DM_PORT=8081
378
+ DM_HOST=0.0.0.0
379
+
380
+ # Logging
381
+ DM_LOG_LEVEL=info # debug, info, warn, error
382
+ ```
383
+
384
+ <!-- end_slide -->
385
+
386
+ # Development
387
+
388
+ ## Main Commands
389
+
390
+ ```bash
391
+ # Development
392
+ npm run build:dev # Quick dev build
393
+ npm run start:dev # Start dev server
394
+ npm run dev # build + start
395
+
396
+ # Tests
397
+ npm test # All tests
398
+ npm run test:one <file> # Single test
399
+
400
+ # Quality
401
+ npm run check # lint + format check
402
+ npm run fix # lint + format fix
403
+ ```
404
+
405
+ <!-- end_slide -->
406
+
407
+ # Build and Deployment
408
+
409
+ ## Production Build
410
+
411
+ ```bash
412
+ npm run build:prod
413
+ # → Generates dist/, static/browser/, Dockerfile
414
+ ```
415
+
416
+ ## Docker
417
+
418
+ ```bash
419
+ npm run build:docker # Build image
420
+ docker run -p 8081:8081 ldap-rest
421
+ ```
422
+
423
+ ## Distribution
424
+
425
+ - NPM package with TypeScript exports
426
+ - CLI binaries: `ldap-rest`, `sync-james`, `cleanup-external-users`
427
+ - Static files ready for CDN
428
+
429
+ <!-- end_slide -->
430
+
431
+ # Use Cases
432
+
433
+ ## Usage Scenarios
434
+
435
+ ✅ **Enterprise Directory**
436
+
437
+ - Centralized user management
438
+ - **Mail synchronization (Apache James)**
439
+ - Web management interface
440
+ - **Automatic data consistency**
441
+
442
+ ✅ **Collaborative Platform (Twake)**
443
+
444
+ - Multi-tenant with authzPerBranch
445
+ - **Mail, calendar, mailing lists**
446
+ - Reusable UI components
447
+ - **Guaranteed referential integrity**
448
+
449
+ ✅ **Provisioning Service**
450
+
451
+ - **Hooks for external synchronization (James, etc.)**
452
+ - **Automatic LDAP consistency**
453
+ - Change auditing
454
+ - **Automatic inconsistency cleanup**
455
+
456
+ <!-- end_slide -->
457
+
458
+ # Extensibility
459
+
460
+ ## Create a Custom Plugin
461
+
462
+ ```typescript
463
+ import DmPlugin from 'ldap-rest/plugin-abstract';
464
+ import { Hooks } from 'ldap-rest/hooks';
465
+
466
+ export default class CustomPlugin extends DmPlugin {
467
+ name = 'custom/myPlugin';
468
+
469
+ hooks: Hooks = {
470
+ onLdapChange: async (dn, changes) => {
471
+ // Your business logic
472
+ await this.syncToExternalSystem(dn, changes);
473
+ },
474
+ };
475
+
476
+ routes() {
477
+ return [
478
+ {
479
+ method: 'get',
480
+ path: '/api/v1/custom/stats',
481
+ handler: async (req, res) => {
482
+ res.json({ stats: await this.getStats() });
483
+ },
484
+ },
485
+ ];
486
+ }
487
+ }
488
+ ```
489
+
490
+ <!-- end_slide -->
491
+
492
+ # Security
493
+
494
+ ## Security Mechanisms
495
+
496
+ - 🔐 **Multi-Method Authentication** (Token, OIDC, LLNG)
497
+ - 🛡️ **Granular Authorization** (per branch, per user)
498
+ - 🚦 **Rate Limiting** (DoS protection)
499
+ - 🔒 **CrowdSec** (intrusion detection)
500
+ - 📝 **Change Auditing** (via onChange)
501
+ - 🔑 **Secure LDAP Bind** (TLS supported)
502
+
503
+ <!-- end_slide -->
504
+
505
+ # Performance
506
+
507
+ ## Optimizations
508
+
509
+ - ⚡ **Lazy Loading** - On-demand loading
510
+ - 🎯 **Smart Cache** - Reduced LDAP queries
511
+ - 📦 **Optimized Bundle** - Tree-shaking, minification
512
+ - 🔄 **Persistent Connections** - LDAP pool
513
+ - 🎨 **Efficient Rendering** - Virtual DOM (browser libs)
514
+
515
+ ## Typical Metrics
516
+
517
+ - Startup: < 500ms
518
+ - API Request: < 50ms
519
+ - Memory Footprint: ~50MB
520
+
521
+ <!-- end_slide -->
522
+
523
+ # Roadmap
524
+
525
+ ## Upcoming Features
526
+
527
+ - 🔍 **Advanced Search** - Complex LDAP filters
528
+ - 📊 **Admin Dashboard** - Monitoring and statistics
529
+ - 🌍 **i18n** - Complete internationalization
530
+ - 🔔 **Webhooks** - External notifications
531
+ - 📱 **Mobile-First UI** - Improved responsive design
532
+ - 🧪 **Interactive Playground** - Online demo
533
+
534
+ <!-- end_slide -->
535
+
536
+ # Documentation
537
+
538
+ ## Available Resources
539
+
540
+ 📚 **Guides**
541
+
542
+ - [Developer Guide](./DEVELOPER_GUIDE.md)
543
+ - [Browser Libraries](./browser/LIBRARIES.md)
544
+ - [REST API Reference](./api/REST_API.md)
545
+
546
+ 🔌 **Plugins**
547
+
548
+ - [Plugin Development](./plugins/DEVELOPMENT.md)
549
+ - [Hooks Reference](HOOKS.md)
550
+
551
+ 📦 **Schemas**
552
+
553
+ - [JSON Schemas Guide](./schemas/SCHEMAS.md)
554
+
555
+ <!-- end_slide -->
556
+
557
+ # Community
558
+
559
+ ## Contributing
560
+
561
+ - 🐛 **Issues**: https://github.com/linagora/ldap-rest/issues
562
+ - 💡 **Discussions**: GitHub Discussions
563
+ - 📖 **Wiki**: https://deepwiki.com/linagora/ldap-rest
564
+ - 🤝 **Contributions**: See [CONTRIBUTING.md](CONTRIBUTING.md)
565
+
566
+ ## License
567
+
568
+ **AGPL-3.0** - Copyright 2025-present LINAGORA
569
+
570
+ Free and open source software
571
+
572
+ <!-- end_slide -->
573
+
574
+ # Concrete Examples
575
+
576
+ ## Twake + Apache James Integration
577
+
578
+ ```bash
579
+ # Complete configuration
580
+ npx ldap-rest \
581
+ --plugin core/ldap/onChange \
582
+ --plugin core/ldap/groups \
583
+ --plugin twake/james \
584
+ --james-webadmin-url http://james:8000 \
585
+ --james-webadmin-token "admin-token" \
586
+ --mail-attribute mail \
587
+ --quota-attribute mailQuota \
588
+ --alias-attribute mailAlternateAddress
589
+ ```
590
+
591
+ ### Synchronization Flow
592
+
593
+ ```
594
+ LDAP Change → onChange → Hook → James WebAdmin API
595
+ ↓
596
+ Logging + Audit
597
+ ```
598
+
599
+ ## Consistency Plugins - Examples
600
+
601
+ ```typescript
602
+ // 1. LDAP Group Consistency
603
+ import groups from 'ldap-rest/plugin-ldap-groups';
604
+ dm.registerPlugin('groups', groups);
605
+
606
+ // User deletion:
607
+ // → Automatic removal from all groups
608
+ // → Update member/uniqueMember attributes
609
+
610
+ // 2. LDAP ↔ James Consistency
611
+ import james from 'ldap-rest/plugin-twake-james';
612
+ dm.registerPlugin('james', james);
613
+
614
+ // LDAP mail change:
615
+ // → James account renaming
616
+ // → Alias update
617
+ // → Quota propagation
618
+ // → Consistency guaranteed without manual intervention
619
+ ```
620
+
621
+ <!-- end_slide -->
622
+
623
+ # Concrete Examples (continued)
624
+
625
+ ## Custom Web Interface
626
+
627
+ ```typescript
628
+ import LdapUserEditor from 'ldap-rest/browser-ldap-user-editor-index';
629
+
630
+ // Integration in your React/Vue/Angular app
631
+ const editor = new LdapUserEditor({
632
+ containerId: 'users',
633
+ apiBaseUrl: process.env.API_URL,
634
+ onUserSaved: dn => {
635
+ analytics.track('user_updated', { dn });
636
+ notifications.success('User saved');
637
+ },
638
+ onError: err => {
639
+ errorTracker.capture(err);
640
+ },
641
+ });
642
+ ```
643
+
644
+ <!-- end_slide -->
645
+
646
+ # Comparison
647
+
648
+ ## LDAP-Rest vs Alternatives
649
+
650
+ | Feature | LDAP-Rest | LDAP Account Manager | phpLDAPadmin |
651
+ | ------------------- | --------- | -------------------- | ------------ |
652
+ | TypeScript | ✅ | ❌ | ❌ |
653
+ | Plugin Architecture | ✅ | ⚠️ | ❌ |
654
+ | REST API | ✅ | ⚠️ | ❌ |
655
+ | Browser Libraries | ✅ | ❌ | ❌ |
656
+ | Modern Stack | ✅ | ⚠️ | ❌ |
657
+ | Extensibility | ✅✅ | ⚠️ | ⚠️ |
658
+ | James Sync | ✅ | ❌ | ❌ |
659
+ | Auto Consistency | ✅ | ❌ | ❌ |
660
+
661
+ <!-- end_slide -->
662
+
663
+ # Why LDAP-Rest?
664
+
665
+ ## Key Benefits
666
+
667
+ 🎯 **Modern**
668
+
669
+ - Modern JavaScript stack
670
+ - TypeScript first
671
+ - Native ES Modules
672
+
673
+ 🔧 **Flexible**
674
+
675
+ - Customizable plugins
676
+ - Extensible hooks
677
+ - Configurable schemas
678
+
679
+ 🚀 **Productive**
680
+
681
+ - Complete REST API
682
+ - Ready-to-use UI components
683
+ - Rich documentation
684
+
685
+ <!-- end_slide -->
686
+
687
+ # Q&A & Demo
688
+
689
+ ## Contact
690
+
691
+ - 📧 Email: yadd@debian.org
692
+ - 🐙 GitHub: https://github.com/linagora/ldap-rest
693
+ - 🏢 LINAGORA: https://linagora.com
694
+
695
+ ## Live Demo
696
+
697
+ ```bash
698
+ # Launch demo
699
+ git clone https://github.com/linagora/ldap-rest
700
+ cd ldap-rest
701
+ npm install
702
+ npm run dev
703
+ ```
704
+
705
+ Open http://localhost:8081
706
+
707
+ <!-- end_slide -->
708
+
709
+ # Thank You!
710
+
711
+ ## LDAP-Rest - Lightweight Directory Manager
712
+
713
+ [![Powered by LINAGORA](./linagora.png)](https://linagora.com)
714
+
715
+ **GitHub**: https://github.com/linagora/ldap-rest
716
+
717
+ **License**: AGPL-3.0
718
+
719
+ ---
720
+
721
+ _Questions?_