ldap-rest 2.0.2 → 2.0.4

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 (177) hide show
  1. package/dist/abstract/ldapFlat.js +1 -1
  2. package/dist/lib/authz/base.js +1 -1
  3. package/dist/lib/entitySchema/validator.js +1 -1
  4. package/dist/lib/utils.js +1 -1
  5. package/dist/plugins/auth/auth.options.js +1 -1
  6. package/dist/plugins/auth/authzDynamic.js +1 -1
  7. package/dist/plugins/auth/openidconnect.js +1 -1
  8. package/dist/plugins/auth/trustedProxy.js +1 -1
  9. package/dist/plugins/ldap/departmentSync.js +1 -1
  10. package/dist/plugins/ldap/organizations.js +1 -1
  11. package/dist/plugins/scim/baseResolver.js +1 -1
  12. package/dist/src/abstract/ldapFlat.d.ts +6 -6
  13. package/dist/src/abstract/plugin.d.ts +11 -11
  14. package/dist/src/abstract/twakePlugin.d.ts +4 -4
  15. package/dist/src/bin/index.d.ts +10 -10
  16. package/dist/src/browser/ldap-browser/LdapBrowser.d.ts +1 -1
  17. package/dist/src/browser/ldap-browser/api/RawApiClient.d.ts +1 -1
  18. package/dist/src/browser/ldap-browser/components/EntryTree.d.ts +2 -2
  19. package/dist/src/browser/ldap-browser/components/EntryView.d.ts +2 -2
  20. package/dist/src/browser/ldap-browser/index.d.ts +4 -5
  21. package/dist/src/browser/ldap-browser/schema.d.ts +1 -1
  22. package/dist/src/browser/ldap-group-editor/LdapGroupEditor.d.ts +2 -2
  23. package/dist/src/browser/ldap-group-editor/api/GroupApiClient.d.ts +1 -1
  24. package/dist/src/browser/ldap-group-editor/components/CreateGroupModal.d.ts +2 -2
  25. package/dist/src/browser/ldap-group-editor/components/GroupPropertyEditor.d.ts +1 -1
  26. package/dist/src/browser/ldap-group-editor/components/MoveGroupModal.d.ts +1 -1
  27. package/dist/src/browser/ldap-group-editor/types.d.ts +1 -1
  28. package/dist/src/browser/ldap-resource-editor/api/ResourceApiClient.d.ts +2 -2
  29. package/dist/src/browser/ldap-resource-editor/index.d.ts +2 -2
  30. package/dist/src/browser/ldap-resource-editor/types.d.ts +1 -1
  31. package/dist/src/browser/ldap-tree-viewer/LdapTreeViewer.d.ts +1 -1
  32. package/dist/src/browser/ldap-tree-viewer/components/TreeNode.d.ts +2 -2
  33. package/dist/src/browser/ldap-tree-viewer/components/TreeRoot.d.ts +2 -2
  34. package/dist/src/browser/ldap-tree-viewer/index.d.ts +2 -3
  35. package/dist/src/browser/ldap-tree-viewer/store/actions.d.ts +2 -2
  36. package/dist/src/browser/ldap-tree-viewer/store/reducers.d.ts +2 -2
  37. package/dist/src/browser/ldap-unit-editor/LdapUnitEditor.d.ts +1 -1
  38. package/dist/src/browser/ldap-unit-editor/api/UnitApiClient.d.ts +1 -1
  39. package/dist/src/browser/ldap-unit-editor/components/MoveUnitModal.d.ts +1 -1
  40. package/dist/src/browser/ldap-unit-editor/components/UnitPropertyEditor.d.ts +1 -1
  41. package/dist/src/browser/ldap-unit-editor/types.d.ts +1 -1
  42. package/dist/src/browser/ldap-user-editor/LdapUserEditor.d.ts +2 -2
  43. package/dist/src/browser/ldap-user-editor/api/UserApiClient.d.ts +2 -2
  44. package/dist/src/browser/ldap-user-editor/components/MoveUserModal.d.ts +1 -1
  45. package/dist/src/browser/ldap-user-editor/components/PointerField.d.ts +2 -2
  46. package/dist/src/browser/ldap-user-editor/components/UserEditor.d.ts +1 -1
  47. package/dist/src/browser/ldap-user-editor/components/UserList.d.ts +1 -1
  48. package/dist/src/browser/ldap-user-editor/components/UserTree.d.ts +1 -1
  49. package/dist/src/browser/ldap-user-editor/index.d.ts +2 -3
  50. package/dist/src/browser/ldap-user-editor/types.d.ts +1 -1
  51. package/dist/src/browser/shared/components/Modal.d.ts +1 -1
  52. package/dist/src/browser/shared/index.d.ts +7 -7
  53. package/dist/src/browser/shared/utils/form.d.ts +1 -1
  54. package/dist/src/browser/shared/utils/schema.d.ts +1 -1
  55. package/dist/src/config/args.d.ts +3 -3
  56. package/dist/src/config/options.d.ts +2 -2
  57. package/dist/src/config/schema.d.ts +1 -1
  58. package/dist/src/hooks.d.ts +5 -5
  59. package/dist/src/lib/auth/base.d.ts +2 -2
  60. package/dist/src/lib/authz/base.d.ts +15 -20
  61. package/dist/src/lib/authz/composition.d.ts +4 -4
  62. package/dist/src/lib/entitySchema/validator.d.ts +23 -2
  63. package/dist/src/lib/expressFormatedResponses.d.ts +1 -1
  64. package/dist/src/lib/health.d.ts +1 -1
  65. package/dist/src/lib/hookBus.d.ts +1 -1
  66. package/dist/src/lib/ldap/schema.d.ts +2 -2
  67. package/dist/src/lib/ldapActions.d.ts +5 -5
  68. package/dist/src/lib/mailDomains.d.ts +1 -1
  69. package/dist/src/lib/parseConfig.d.ts +1 -1
  70. package/dist/src/lib/schemaFile.d.ts +1 -1
  71. package/dist/src/lib/staticFiles.d.ts +1 -1
  72. package/dist/src/lib/storage/store.d.ts +1 -1
  73. package/dist/src/lib/utils.d.ts +3 -3
  74. package/dist/src/logger/winston.d.ts +1 -1
  75. package/dist/src/plugins/auth/auth.options.d.ts +39 -38
  76. package/dist/src/plugins/auth/authzDynamic.d.ts +24 -11
  77. package/dist/src/plugins/auth/authzLinid1.d.ts +7 -7
  78. package/dist/src/plugins/auth/authzPerBranch.d.ts +8 -8
  79. package/dist/src/plugins/auth/authzPerRoute.d.ts +2 -2
  80. package/dist/src/plugins/auth/authzScope.d.ts +1 -1
  81. package/dist/src/plugins/auth/crowdsec.d.ts +4 -4
  82. package/dist/src/plugins/auth/fake.d.ts +3 -3
  83. package/dist/src/plugins/auth/hmac.d.ts +4 -4
  84. package/dist/src/plugins/auth/llng.d.ts +20 -5
  85. package/dist/src/plugins/auth/openidconnect.d.ts +29 -8
  86. package/dist/src/plugins/auth/rateLimit.d.ts +3 -3
  87. package/dist/src/plugins/auth/token.d.ts +3 -3
  88. package/dist/src/plugins/auth/totp.d.ts +5 -5
  89. package/dist/src/plugins/auth/trustedProxy.d.ts +16 -32
  90. package/dist/src/plugins/bcl.d.ts +4 -4
  91. package/dist/src/plugins/bcl.options.d.ts +3 -3
  92. package/dist/src/plugins/configApi.d.ts +1 -1
  93. package/dist/src/plugins/demo/helloworld.d.ts +1 -1
  94. package/dist/src/plugins/ldap/accountLifecycle.d.ts +1 -1
  95. package/dist/src/plugins/ldap/bulkImport.d.ts +5 -5
  96. package/dist/src/plugins/ldap/departmentSync.d.ts +14 -3
  97. package/dist/src/plugins/ldap/enterpriseRules.d.ts +7 -7
  98. package/dist/src/plugins/ldap/externalUsersInGroups.d.ts +6 -6
  99. package/dist/src/plugins/ldap/flatGeneric.d.ts +6 -6
  100. package/dist/src/plugins/ldap/groups.d.ts +8 -8
  101. package/dist/src/plugins/ldap/ldap.options.d.ts +45 -45
  102. package/dist/src/plugins/ldap/onChange.d.ts +4 -4
  103. package/dist/src/plugins/ldap/organization.d.ts +1 -1
  104. package/dist/src/plugins/ldap/organizations.d.ts +12 -12
  105. package/dist/src/plugins/ldap/passwordPolicy.d.ts +11 -11
  106. package/dist/src/plugins/ldap/raw.d.ts +8 -8
  107. package/dist/src/plugins/ldap/trash.d.ts +6 -6
  108. package/dist/src/plugins/metrics.d.ts +3 -3
  109. package/dist/src/plugins/metrics.options.d.ts +3 -3
  110. package/dist/src/plugins/rabbitmq.d.ts +4 -4
  111. package/dist/src/plugins/rabbitmq.options.d.ts +3 -3
  112. package/dist/src/plugins/scim/baseResolver.d.ts +3 -3
  113. package/dist/src/plugins/scim/bulk.d.ts +7 -7
  114. package/dist/src/plugins/scim/discovery.d.ts +4 -4
  115. package/dist/src/plugins/scim/errors.d.ts +3 -3
  116. package/dist/src/plugins/scim/filter.d.ts +1 -1
  117. package/dist/src/plugins/scim/groups.d.ts +8 -8
  118. package/dist/src/plugins/scim/list.d.ts +1 -1
  119. package/dist/src/plugins/scim/mapping.d.ts +2 -2
  120. package/dist/src/plugins/scim/patch.d.ts +2 -2
  121. package/dist/src/plugins/scim/scim.d.ts +30 -30
  122. package/dist/src/plugins/scim/scim.options.d.ts +27 -27
  123. package/dist/src/plugins/scim/users.d.ts +6 -6
  124. package/dist/src/plugins/static.d.ts +6 -6
  125. package/dist/src/plugins/static.options.d.ts +6 -6
  126. package/dist/src/plugins/storage/file.d.ts +2 -2
  127. package/dist/src/plugins/storage/ldap.d.ts +2 -2
  128. package/dist/src/plugins/storage/postgres.d.ts +2 -2
  129. package/dist/src/plugins/storage/valkey.d.ts +2 -2
  130. package/dist/src/plugins/storage.d.ts +13 -13
  131. package/dist/src/plugins/storage.options.d.ts +11 -11
  132. package/dist/src/plugins/twake/appAccounts.options.d.ts +6 -6
  133. package/dist/src/plugins/twake/appAccountsApi.d.ts +7 -7
  134. package/dist/src/plugins/twake/appAccountsConsistency.d.ts +9 -9
  135. package/dist/src/plugins/twake/calendar.d.ts +14 -14
  136. package/dist/src/plugins/twake/calendar.options.d.ts +11 -11
  137. package/dist/src/plugins/twake/calendarResources.d.ts +1 -1
  138. package/dist/src/plugins/twake/cloudery.options.d.ts +18 -18
  139. package/dist/src/plugins/twake/clouderyProvision.d.ts +19 -19
  140. package/dist/src/plugins/twake/cozy.options.d.ts +14 -14
  141. package/dist/src/plugins/twake/cozyProvision.d.ts +15 -15
  142. package/dist/src/plugins/twake/drive.d.ts +9 -9
  143. package/dist/src/plugins/twake/drive.options.d.ts +7 -7
  144. package/dist/src/plugins/twake/groups.d.ts +16 -16
  145. package/dist/src/plugins/twake/instances.d.ts +38 -38
  146. package/dist/src/plugins/twake/james.d.ts +18 -18
  147. package/dist/src/plugins/twake/james.options.d.ts +13 -13
  148. package/dist/src/plugins/twake/lifecycleAttributes.d.ts +2 -2
  149. package/dist/src/plugins/twake/lifecycleEvents.d.ts +13 -13
  150. package/dist/src/plugins/twake/migrationProxy.d.ts +11 -11
  151. package/dist/src/plugins/twake/migrationProxy.options.d.ts +8 -8
  152. package/dist/src/plugins/twake/spaces.d.ts +12 -12
  153. package/dist/src/plugins/twake/tombstone.d.ts +10 -10
  154. package/dist/src/plugins/twake/twakeGroups.options.d.ts +12 -12
  155. package/dist/src/plugins/twake/twakeInstances.options.d.ts +35 -35
  156. package/dist/src/plugins/twake/twakeLifecycle.options.d.ts +12 -12
  157. package/dist/src/plugins/twake/twakeSpaces.options.d.ts +11 -11
  158. package/dist/src/plugins/twake/twakeTombstone.options.d.ts +9 -9
  159. package/dist/src/plugins/weblogs.d.ts +1 -1
  160. package/docs/client-development/schemas/README.md +6 -1
  161. package/docs/development/contracts.md +22 -0
  162. package/docs/presentations/en.md +1 -1
  163. package/docs/presentations/fr.md +1 -1
  164. package/docs/usage/configuration.md +1 -0
  165. package/docs/usage/plugins/auth/authz-dynamic.md +3 -1
  166. package/docs/usage/plugins/auth/authz-linid1.md +10 -5
  167. package/docs/usage/plugins/auth/oidc.md +11 -0
  168. package/docs/usage/plugins/auth/trusted-proxy.md +11 -1
  169. package/docs/usage/upgrading.md +61 -0
  170. package/package.json +4 -3
  171. package/static/browser/ldap-user-editor.esm.js.map +1 -1
  172. package/static/browser/ldap-user-editor.js.map +1 -1
  173. package/static/browser/ldap-user-editor.min.js.map +1 -1
  174. package/static/browser/shared/utils/schema.js.map +1 -1
  175. package/static/browser/shared.esm.js.map +1 -1
  176. package/static/browser/shared.js.map +1 -1
  177. package/static/browser/shared.min.js.map +1 -1
@@ -1,7 +1,7 @@
1
1
  import type { Express, Request } from 'express';
2
- import DmPlugin, { type Role } from '../../abstract/plugin';
3
- import type { DM } from '../../bin';
4
- import type { Hooks } from '../../hooks';
2
+ import DmPlugin, { type Role } from '../../abstract/plugin.js';
3
+ import type { DM } from '../../bin/index.js';
4
+ import type { Hooks } from '../../hooks.js';
5
5
  export declare const EraseTombstoneBody: import("@sinclair/typebox").TObject<{
6
6
  dn: import("@sinclair/typebox").TString;
7
7
  force: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -11,13 +11,13 @@ export declare const EraseTombstoneResponse: import("@sinclair/typebox").TObject
11
11
  }>;
12
12
  export default class TwakeTombstone extends DmPlugin {
13
13
  static optionDefinitions: {
14
- twake_tombstone_dn: import("../../config/options").ArrayOption;
15
- twake_tombstone_default_reason: import("../../config/options").StringOption;
16
- twake_tombstone_reason_header: import("../../config/options").StringOption;
17
- twake_tombstone_reasons: import("../../config/options").ArrayOption;
18
- twake_tombstone_clear_attributes: import("../../config/options").ArrayOption;
19
- twake_tombstone_erase_min_age: import("../../config/options").NumberOption;
20
- twake_tombstone_group_bases: import("../../config/options").ArrayOption;
14
+ twake_tombstone_dn: import("../../config/options.js").ArrayOption;
15
+ twake_tombstone_default_reason: import("../../config/options.js").StringOption;
16
+ twake_tombstone_reason_header: import("../../config/options.js").StringOption;
17
+ twake_tombstone_reasons: import("../../config/options.js").ArrayOption;
18
+ twake_tombstone_clear_attributes: import("../../config/options.js").ArrayOption;
19
+ twake_tombstone_erase_min_age: import("../../config/options.js").NumberOption;
20
+ twake_tombstone_group_bases: import("../../config/options.js").ArrayOption;
21
21
  };
22
22
  name: string;
23
23
  roles: Role[];
@@ -1,19 +1,19 @@
1
1
  /**
2
2
  * Twake groups options, see `docs/plugin-development/options.md`.
3
3
  */
4
- import type { Config } from '../../config/args';
5
- import { type OptionsOf } from '../../config/options';
4
+ import type { Config } from '../../config/args.js';
5
+ import { type OptionsOf } from '../../config/options.js';
6
6
  export declare const twakeGroupsOptions: {
7
- twake_group_base: import("../../config/options").StringOption;
8
- twake_group_user_base: import("../../config/options").StringOption;
9
- twake_group_organization_dn: import("../../config/options").StringOption;
10
- twake_group_organization_status_attribute: import("../../config/options").StringOption;
11
- twake_group_organization_deleted_value: import("../../config/options").StringOption;
12
- twake_group_display_name_attribute: import("../../config/options").StringOption;
13
- twake_group_color_attribute: import("../../config/options").StringOption;
14
- twake_group_created_at_attribute: import("../../config/options").StringOption;
15
- twake_group_max_page_limit: import("../../config/options").NumberOption;
16
- twake_group_member_fields: import("../../config/options").JsonOption<{}>;
7
+ twake_group_base: import("../../config/options.js").StringOption;
8
+ twake_group_user_base: import("../../config/options.js").StringOption;
9
+ twake_group_organization_dn: import("../../config/options.js").StringOption;
10
+ twake_group_organization_status_attribute: import("../../config/options.js").StringOption;
11
+ twake_group_organization_deleted_value: import("../../config/options.js").StringOption;
12
+ twake_group_display_name_attribute: import("../../config/options.js").StringOption;
13
+ twake_group_color_attribute: import("../../config/options.js").StringOption;
14
+ twake_group_created_at_attribute: import("../../config/options.js").StringOption;
15
+ twake_group_max_page_limit: import("../../config/options.js").NumberOption;
16
+ twake_group_member_fields: import("../../config/options.js").JsonOption<{}>;
17
17
  };
18
18
  export type TwakeGroupsOptions = OptionsOf<typeof twakeGroupsOptions>;
19
19
  /** The checked values for a caller that holds a Config instead of the plugin */
@@ -1,42 +1,42 @@
1
1
  /**
2
2
  * Twake instances options, see `docs/plugin-development/options.md`.
3
3
  */
4
- import type { Config } from '../../config/args';
5
- import { type OptionsOf } from '../../config/options';
4
+ import type { Config } from '../../config/args.js';
5
+ import { type OptionsOf } from '../../config/options.js';
6
6
  export declare const twakeInstancesOptions: {
7
- twake_instance_dn: import("../../config/options").ArrayOption;
8
- twake_instance_skip_attribute: import("../../config/options").StringOption;
9
- twake_instance_skip_value: import("../../config/options").StringOption;
10
- twake_instance_provider: import("../../config/options").StringOption;
11
- twake_instance_id: import("../../config/options").StringOption;
12
- twake_instance_fqdn_attribute: import("../../config/options").StringOption;
13
- twake_instance_sent_attribute: import("../../config/options").StringOption;
14
- twake_instance_locale: import("../../config/options").StringOption;
15
- twake_instance_timeout: import("../../config/options").NumberOption;
16
- twake_instance_cloudery_url: import("../../config/options").StringOption;
17
- twake_instance_cloudery_token: import("../../config/options").StringOption;
18
- twake_instance_cloudery_offer: import("../../config/options").StringOption;
19
- twake_instance_cloudery_domain: import("../../config/options").StringOption;
20
- twake_instance_cloudery_organization_offer: import("../../config/options").StringOption;
21
- twake_instance_cozy_url: import("../../config/options").StringOption;
22
- twake_instance_cozy_user: import("../../config/options").StringOption;
23
- twake_instance_cozy_passphrase: import("../../config/options").StringOption;
24
- twake_instance_cozy_domain: import("../../config/options").StringOption;
25
- twake_instance_cozy_context: import("../../config/options").StringOption;
26
- twake_instance_cozy_apps: import("../../config/options").StringOption;
27
- twake_instance_cozy_org_id: import("../../config/options").StringOption;
28
- twake_instance_cozy_org_domain: import("../../config/options").StringOption;
29
- twake_instance_auth_exchange: import("../../config/options").StringOption;
30
- twake_instance_b2b_exchange: import("../../config/options").StringOption;
31
- twake_instance_user_created_key: import("../../config/options").StringOption;
32
- twake_instance_organization_created_key: import("../../config/options").StringOption;
33
- twake_instance_workplace_created_key: import("../../config/options").StringOption;
34
- twake_instance_queue: import("../../config/options").StringOption;
35
- twake_instance_organization_base: import("../../config/options").StringOption;
36
- twake_instance_organization_id_attribute: import("../../config/options").StringOption;
37
- twake_instance_organization_domain_attribute: import("../../config/options").StringOption;
38
- twake_instance_organization_name_attribute: import("../../config/options").StringOption;
39
- twake_instance_organization_fqdn_attribute: import("../../config/options").StringOption;
7
+ twake_instance_dn: import("../../config/options.js").ArrayOption;
8
+ twake_instance_skip_attribute: import("../../config/options.js").StringOption;
9
+ twake_instance_skip_value: import("../../config/options.js").StringOption;
10
+ twake_instance_provider: import("../../config/options.js").StringOption;
11
+ twake_instance_id: import("../../config/options.js").StringOption;
12
+ twake_instance_fqdn_attribute: import("../../config/options.js").StringOption;
13
+ twake_instance_sent_attribute: import("../../config/options.js").StringOption;
14
+ twake_instance_locale: import("../../config/options.js").StringOption;
15
+ twake_instance_timeout: import("../../config/options.js").NumberOption;
16
+ twake_instance_cloudery_url: import("../../config/options.js").StringOption;
17
+ twake_instance_cloudery_token: import("../../config/options.js").StringOption;
18
+ twake_instance_cloudery_offer: import("../../config/options.js").StringOption;
19
+ twake_instance_cloudery_domain: import("../../config/options.js").StringOption;
20
+ twake_instance_cloudery_organization_offer: import("../../config/options.js").StringOption;
21
+ twake_instance_cozy_url: import("../../config/options.js").StringOption;
22
+ twake_instance_cozy_user: import("../../config/options.js").StringOption;
23
+ twake_instance_cozy_passphrase: import("../../config/options.js").StringOption;
24
+ twake_instance_cozy_domain: import("../../config/options.js").StringOption;
25
+ twake_instance_cozy_context: import("../../config/options.js").StringOption;
26
+ twake_instance_cozy_apps: import("../../config/options.js").StringOption;
27
+ twake_instance_cozy_org_id: import("../../config/options.js").StringOption;
28
+ twake_instance_cozy_org_domain: import("../../config/options.js").StringOption;
29
+ twake_instance_auth_exchange: import("../../config/options.js").StringOption;
30
+ twake_instance_b2b_exchange: import("../../config/options.js").StringOption;
31
+ twake_instance_user_created_key: import("../../config/options.js").StringOption;
32
+ twake_instance_organization_created_key: import("../../config/options.js").StringOption;
33
+ twake_instance_workplace_created_key: import("../../config/options.js").StringOption;
34
+ twake_instance_queue: import("../../config/options.js").StringOption;
35
+ twake_instance_organization_base: import("../../config/options.js").StringOption;
36
+ twake_instance_organization_id_attribute: import("../../config/options.js").StringOption;
37
+ twake_instance_organization_domain_attribute: import("../../config/options.js").StringOption;
38
+ twake_instance_organization_name_attribute: import("../../config/options.js").StringOption;
39
+ twake_instance_organization_fqdn_attribute: import("../../config/options.js").StringOption;
40
40
  };
41
41
  export type TwakeInstancesOptions = OptionsOf<typeof twakeInstancesOptions>;
42
42
  /** The checked values for a caller that holds a Config instead of the plugin */
@@ -2,19 +2,19 @@
2
2
  * Account lifecycle options, shared by the Twake lifecycle plugins. See
3
3
  * `docs/plugin-development/options.md`.
4
4
  */
5
- import type { Config } from '../../config/args';
6
- import { type OptionsOf } from '../../config/options';
5
+ import type { Config } from '../../config/args.js';
6
+ import { type OptionsOf } from '../../config/options.js';
7
7
  export declare const twakeLifecycleOptions: {
8
- twake_lifecycle_role_attribute: import("../../config/options").StringOption;
9
- twake_lifecycle_lock_attribute: import("../../config/options").StringOption;
10
- twake_lifecycle_lock_value: import("../../config/options").StringOption;
11
- twake_lifecycle_deleted_attribute: import("../../config/options").StringOption;
12
- twake_lifecycle_deleted_value: import("../../config/options").StringOption;
13
- twake_lifecycle_deleted_at_attribute: import("../../config/options").StringOption;
14
- twake_lifecycle_deleted_at_format: import("../../config/options").StringOption;
15
- twake_lifecycle_reason_attribute: import("../../config/options").StringOption;
16
- twake_lifecycle_rules: import("../../config/options").StringOption;
17
- twake_lifecycle_member_attribute: import("../../config/options").StringOption;
8
+ twake_lifecycle_role_attribute: import("../../config/options.js").StringOption;
9
+ twake_lifecycle_lock_attribute: import("../../config/options.js").StringOption;
10
+ twake_lifecycle_lock_value: import("../../config/options.js").StringOption;
11
+ twake_lifecycle_deleted_attribute: import("../../config/options.js").StringOption;
12
+ twake_lifecycle_deleted_value: import("../../config/options.js").StringOption;
13
+ twake_lifecycle_deleted_at_attribute: import("../../config/options.js").StringOption;
14
+ twake_lifecycle_deleted_at_format: import("../../config/options.js").StringOption;
15
+ twake_lifecycle_reason_attribute: import("../../config/options.js").StringOption;
16
+ twake_lifecycle_rules: import("../../config/options.js").StringOption;
17
+ twake_lifecycle_member_attribute: import("../../config/options.js").StringOption;
18
18
  };
19
19
  export type TwakeLifecycleOptions = OptionsOf<typeof twakeLifecycleOptions>;
20
20
  /** The checked values for a caller that holds a Config instead of the plugin */
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * Twake spaces options, see `docs/plugin-development/options.md`.
3
3
  */
4
- import type { Config } from '../../config/args';
5
- import { type OptionsOf } from '../../config/options';
4
+ import type { Config } from '../../config/args.js';
5
+ import { type OptionsOf } from '../../config/options.js';
6
6
  export declare const twakeSpacesOptions: {
7
- twake_space_base: import("../../config/options").StringOption;
8
- twake_space_class: import("../../config/options").ArrayOption;
9
- twake_space_display_name_attribute: import("../../config/options").StringOption;
10
- twake_space_admin_attribute: import("../../config/options").StringOption;
11
- twake_space_editor_attribute: import("../../config/options").StringOption;
12
- twake_space_viewer_attribute: import("../../config/options").StringOption;
13
- twake_space_user_role_attribute: import("../../config/options").StringOption;
14
- twake_space_exchange: import("../../config/options").StringOption;
15
- twake_space_sync_queue: import("../../config/options").StringOption;
7
+ twake_space_base: import("../../config/options.js").StringOption;
8
+ twake_space_class: import("../../config/options.js").ArrayOption;
9
+ twake_space_display_name_attribute: import("../../config/options.js").StringOption;
10
+ twake_space_admin_attribute: import("../../config/options.js").StringOption;
11
+ twake_space_editor_attribute: import("../../config/options.js").StringOption;
12
+ twake_space_viewer_attribute: import("../../config/options.js").StringOption;
13
+ twake_space_user_role_attribute: import("../../config/options.js").StringOption;
14
+ twake_space_exchange: import("../../config/options.js").StringOption;
15
+ twake_space_sync_queue: import("../../config/options.js").StringOption;
16
16
  };
17
17
  export type TwakeSpacesOptions = OptionsOf<typeof twakeSpacesOptions>;
18
18
  /** The checked values for a caller that holds a Config instead of the plugin */
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  * Twake tombstone options, see `docs/plugin-development/options.md`.
3
3
  */
4
- import type { Config } from '../../config/args';
5
- import { type OptionsOf } from '../../config/options';
4
+ import type { Config } from '../../config/args.js';
5
+ import { type OptionsOf } from '../../config/options.js';
6
6
  export declare const twakeTombstoneOptions: {
7
- twake_tombstone_dn: import("../../config/options").ArrayOption;
8
- twake_tombstone_default_reason: import("../../config/options").StringOption;
9
- twake_tombstone_reason_header: import("../../config/options").StringOption;
10
- twake_tombstone_reasons: import("../../config/options").ArrayOption;
11
- twake_tombstone_clear_attributes: import("../../config/options").ArrayOption;
12
- twake_tombstone_erase_min_age: import("../../config/options").NumberOption;
13
- twake_tombstone_group_bases: import("../../config/options").ArrayOption;
7
+ twake_tombstone_dn: import("../../config/options.js").ArrayOption;
8
+ twake_tombstone_default_reason: import("../../config/options.js").StringOption;
9
+ twake_tombstone_reason_header: import("../../config/options.js").StringOption;
10
+ twake_tombstone_reasons: import("../../config/options.js").ArrayOption;
11
+ twake_tombstone_clear_attributes: import("../../config/options.js").ArrayOption;
12
+ twake_tombstone_erase_min_age: import("../../config/options.js").NumberOption;
13
+ twake_tombstone_group_bases: import("../../config/options.js").ArrayOption;
14
14
  };
15
15
  export type TwakeTombstoneOptions = OptionsOf<typeof twakeTombstoneOptions>;
16
16
  /** The checked values for a caller that holds a Config instead of the plugin */
@@ -1,5 +1,5 @@
1
1
  import type { Express, Request, Response } from 'express';
2
- import DmPlugin, { type Role } from '../abstract/plugin';
2
+ import DmPlugin, { type Role } from '../abstract/plugin.js';
3
3
  declare global {
4
4
  namespace Express {
5
5
  interface Request {
@@ -772,7 +772,12 @@ Attribute values must have the shape of their declared type, see
772
772
 
773
773
  ### Fixed Attributes
774
774
 
775
- Attributes with `"fixed": true` cannot be modified after creation.
775
+ Attributes with `"fixed": true` cannot be modified after creation. A creation
776
+ that sends one **with a default** under an option (`l;lang-fr`, or an alias
777
+ such as `localityName;lang-fr`) is refused with `400`: the default is written
778
+ under the attribute's own name, and the option would add a second value beside
779
+ it. A fixed attribute without a default is set at creation and keeps its
780
+ options.
776
781
 
777
782
  ```json
778
783
  {
@@ -45,6 +45,28 @@ The snapshot records what the parser reads. A narrowed `choices` list, a
45
45
  raised `min` or a lowered `max` is checked when a plugin reads its options,
46
46
  not by the snapshot, and is reviewed by hand, as is a custom error `code`.
47
47
 
48
+ ## Resolution guard
49
+
50
+ The published package is `"type": "module"`, so a plugin compiled with
51
+ `moduleResolution: nodenext` resolves the declarations as Node resolves
52
+ JavaScript: every relative specifier needs its `.js` extension. The build
53
+ keeps them in the sources, and the declarations inherit them. TypeScript says
54
+ nothing about a specifier it cannot resolve in `node_modules`: it reports the
55
+ imported type as `any`, so a plugin loses type checking on the plugin API
56
+ without a warning.
57
+
58
+ `npm run lint` refuses an extensionless relative specifier under `src/` (the
59
+ `import-x/extensions` rule), so the mistake shows up locally. `npm run
60
+ check:declarations` then reads the built declarations for one, and type-checks
61
+ a small `nodenext` consumer against the package entries installed with only the
62
+ runtime dependencies: a type the declarations take from a devDependency is
63
+ missing there too. The consumer checks the library declarations themselves, so
64
+ a bare import they make must resolve even when the consumer names no type from
65
+ it. The build drops the browser sources' side-effect CSS imports from the
66
+ emitted declarations: they say nothing about the JavaScript API, and the
67
+ consumer has no CSS module for them. The check needs a build: run `npm run
68
+ build` first. The `test` workflow runs it after the build.
69
+
48
70
  ## The pull request gate
49
71
 
50
72
  The `contracts` job of `.github/workflows/contracts.yml` generates the
@@ -432,7 +432,7 @@ docker run -p 8081:8081 ldap-rest
432
432
  ## Create a Custom Plugin
433
433
 
434
434
  ```typescript
435
- import DmPlugin from 'ldap-rest/plugin-abstract';
435
+ import DmPlugin from 'ldap-rest/plugin';
436
436
  import { Hooks } from 'ldap-rest/hooks';
437
437
 
438
438
  export default class CustomPlugin extends DmPlugin {
@@ -432,7 +432,7 @@ docker run -p 8081:8081 ldap-rest
432
432
  ## Créer un plugin personnalisé
433
433
 
434
434
  ```typescript
435
- import DmPlugin from 'ldap-rest/plugin-abstract';
435
+ import DmPlugin from 'ldap-rest/plugin';
436
436
  import { Hooks } from 'ldap-rest/hooks';
437
437
 
438
438
  export default class CustomPlugin extends DmPlugin {
@@ -375,6 +375,7 @@ Development only, refused with `NODE_ENV=production` — see [Fake Authenticatio
375
375
  | `--oidc-client-id` | `DM_OIDC_CLIENT_ID` | | OIDC Client ID |
376
376
  | `--oidc-client-secret` | `DM_OIDC_CLIENT_SECRET` | | OIDC Client Secret |
377
377
  | `--oidc-username-claim` | `DM_OIDC_USERNAME_CLAIM` | `sub` | Claim naming the caller, published as `req.userName` (see [OIDC](plugins/auth/oidc.md)) |
378
+ | `--oidc-logout-origins` | `DM_OIDC_LOGOUT_ORIGINS` | `[]` | Other origins a console may log out from (see [OIDC](plugins/auth/oidc.md#logout)) |
378
379
  | `--base-url` | `DM_BASE_URL` | | Public URL for callbacks |
379
380
 
380
381
  #### `core/bcl`
@@ -122,7 +122,9 @@ description: {
122
122
  target DNs are compared RDN by RDN, so case, spacing, escapes, `;`
123
123
  separators and attribute-type spellings (`ou`, `2.5.4.11`, `OID.2.5.4.11`)
124
124
  do not matter; an escaped comma is part of a value, never a separator.
125
- - Absent flags default to `false`.
125
+ - Only the JSON boolean `true` grants a permission. An absent flag, or one
126
+ written as anything else (a string such as `"false"` or `"true"`, a
127
+ number), is `false`; a non-boolean flag is logged as a warning.
126
128
  - `tenant` is optional; if omitted, `req.user` falls back to the value of the
127
129
  configured `tenantAttribute` (default `cn`).
128
130
 
@@ -58,11 +58,16 @@ belongs to nobody's branch, and no administrator could list or change one.
58
58
  - Listings of accounts and groups drop the entries attached to an
59
59
  organization outside the caller's branches. A single read of one answers
60
60
  `404`.
61
- - Entries attached to nothing — the organizations, the nomenclature values, a
62
- group or an account with no `twakeDepartmentLink` — are readable by every
63
- administrator: the organization tree is reference data. Writes to them are
64
- judged on their parent. The tree a console draws still starts at the
65
- caller's own branches: see [getOrganisationTop Hook](#getorganisationtop-hook).
61
+ - An organization is judged by the branch it sits in. The tree under the top
62
+ organization carries every branch's name, description and local
63
+ administrators, so a listing returns the caller's branches, and a direct
64
+ read of another branch answers `404`. `organizations/top` still answers one
65
+ of their branches: see [getOrganisationTop Hook](#getorganisationtop-hook).
66
+ - Entries attached to nothing — a nomenclature value, a group or an account
67
+ with no `twakeDepartmentLink` — are readable by every administrator:
68
+ reference data. Writes to them are judged on their parent. The transit
69
+ branch's own entry stays readable too: the console opens its card from the
70
+ scope banner.
66
71
  - A caller named in no `twakeLocalAdminLink` is refused every read (`403`)
67
72
  but the top organization's own entry, which `organizations/top` answers.
68
73
 
@@ -113,6 +113,17 @@ browser is sent to the provider's `end_session_endpoint` with the id token as
113
113
  No `post_logout_redirect_uri` is sent: the caller ends on the provider's own
114
114
  logout page, and nothing has to be registered there.
115
115
 
116
+ A request a browser reports as coming from another site — `Sec-Fetch-Site`
117
+ other than `same-origin` or `none`, or an `Origin` or `Referer` naming another
118
+ origin — is refused (`403`) and leaves the session alone. `/logout` is a `GET`
119
+ a link reaches and asks for no token, so without that check any page could end
120
+ an administrator's session. A console served from another origin than
121
+ `--base-url` names that origin in `--oidc-logout-origins`
122
+ (`DM_OIDC_LOGOUT_ORIGINS`, comma-separated), and is then the only other origin
123
+ a logout is accepted from. A link from such a console is recognized by its
124
+ `Referer`: a page setting `Referrer-Policy: no-referrer`, or a link marked
125
+ `noreferrer`, sends neither `Referer` nor `Origin`, and its logout is refused.
126
+
116
127
  Ending the cookie alone would not log anyone out: every guarded path goes
117
128
  through the provider, which still holds its session and logs the caller back
118
129
  in without asking anything.
@@ -39,7 +39,17 @@ DM_TRUSTED_PROXY_AUTH_HEADER="Auth-User"
39
39
  - **IPv4 addresses:** `192.168.1.1`
40
40
  - **IPv6 addresses:** `::1`, `fe80::1`
41
41
  - **CIDR ranges:** `10.0.0.0/8`, `192.168.0.0/16`, `2001:db8::/32`
42
- - **IPv4-mapped IPv6:** Automatically handled (e.g., `::ffff:127.0.0.1` matches `127.0.0.1`)
42
+ - **IPv4-mapped IPv6:** accepted in any spelling, e.g. `::ffff:127.0.0.1` or
43
+ `::ffff:7f00:1` matches `127.0.0.1`. A network written in mapped form is
44
+ checked as the IPv4 network it is: `::ffff:10.0.0.0/104` is `10.0.0.0/8`.
45
+ - **Zone index:** a peer address carrying an interface, such as
46
+ `fe80::1%eth0`, is matched on the address alone. A trusted entry carrying
47
+ one is refused: the same link-local address names another host on another
48
+ link.
49
+
50
+ An entry that is neither an address nor an `address/prefix` network (`:::`,
51
+ `10.0.0.0/2.`, `10.0.0.0/24x`) makes the server refuse to start: it would
52
+ otherwise trust a network the administrator never wrote.
43
53
 
44
54
  ## Auth-User Header
45
55
 
@@ -4,6 +4,67 @@ What to check before deploying, newest first. Only releases that need a
4
4
  decision or a configuration change appear here; see the
5
5
  [CHANGELOG](../../CHANGELOG.md) for everything else.
6
6
 
7
+ ## From 2.0.3
8
+
9
+ ### An `authzDynamic` flag must be a JSON boolean
10
+
11
+ **Who is affected:** a deployment loading `core/auth/authzDynamic` whose
12
+ token entries hold a `read`, `write` or `delete` flag in `description` as a
13
+ string or a number (`"true"`, `"yes"`, `1`) instead of the boolean `true`.
14
+
15
+ That flag grants nothing after the upgrade: the permission is refused on
16
+ the branch, and each reload logs `… not a boolean: permission refused`,
17
+ naming the token entry and the branch. Write the JSON boolean `true` for the
18
+ permissions the token holds. A flag written `"false"`, `"no"` or `"0"`
19
+ refuses too, as it was meant to.
20
+
21
+ ### A malformed trusted proxy stops the server
22
+
23
+ **Who is affected:** a deployment whose `--trusted-proxy` /
24
+ `DM_TRUSTED_PROXIES` holds something that is neither an address nor an
25
+ `address/prefix` network, such as `10.0.0.0/2.`, `10.0.0.0/24x` or `:::`.
26
+
27
+ `core/auth/trustedProxy` refuses it at startup (`Invalid trusted proxy
28
+ address "…"`) instead of reading its leading digits and trusting another
29
+ network: `10.0.0.0/2.` was read as `10.0.0.0/2`, a network covering
30
+ `0.0.0.0/2`. An IPv4-mapped address remains accepted. A trusted entry
31
+ carrying a zone index (`fe80::1%eth0`) is refused too: the same link-local
32
+ address names another host on another link. Fix the entry.
33
+
34
+ ## From 2.0.2
35
+
36
+ ### A console on another origin must be trusted for logout
37
+
38
+ **Who is affected:** a deployment whose console is served from an origin
39
+ other than `--base-url`, for example a front-end calling the API with its own
40
+ `apiBaseUrl`.
41
+
42
+ `/logout` refuses a request a browser reports as coming from another site.
43
+ List the console's origin in `--oidc-logout-origins` (or
44
+ `DM_OIDC_LOGOUT_ORIGINS`, comma-separated); otherwise its sign-out link
45
+ answers `403` and the session stays. A console served by ldap-rest itself,
46
+ from `--base-url`, needs nothing.
47
+
48
+ ### The organization tree is held to branches
49
+
50
+ **Who is affected:** a deployment using `core/auth/authzLinid1`, or
51
+ `core/auth/authzPerBranch` with `--authz-filter-attached-entries`.
52
+
53
+ An administrator no longer reads the organizations of another branch: a
54
+ single read answers `404`, and a subnode listing or a search returns only the
55
+ branches they hold. The tree names every branch, its description and its
56
+ local administrators, which an administrator of one branch has no business
57
+ reading. `organizations/top` still answers one of their branches — or the
58
+ top organization for a caller named in no `twakeLocalAdminLink` — and the
59
+ transit branch's own entry stays readable so that the console can open its
60
+ card from the scope banner. Naming the tree top directly is refused like any
61
+ organization outside their branches.
62
+
63
+ A console drawing the whole tree from an administrator's session draws their
64
+ branches only. A client that listed the tree to let one administrator choose
65
+ another branch as a destination loses that choice; the write was refused on
66
+ the destination branch anyway.
67
+
7
68
  ## From 1.3.0
8
69
 
9
70
  ### A plugin with its own `service` member
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ldap-rest",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "Light directory manager",
5
5
  "keywords": [
6
6
  "Identity-Manager"
@@ -809,6 +809,7 @@
809
809
  "check": "npm run check:ts && npm run lint && npm run format:check && npm run check:hooks && npm run check:comments && npm run check:no-client-values && npm run check:api && npm run check:openapi && npm run check:options",
810
810
  "check:api": "tsx scripts/api-snapshot.ts --check",
811
811
  "check:comments": "sh scripts/check-comments.sh",
812
+ "check:declarations": "tsx scripts/check-declarations.ts",
812
813
  "check:hooks": "tsx scripts/hooks-doc.ts",
813
814
  "check:no-client-values": "sh scripts/check-no-client-values.sh",
814
815
  "check:openapi": "tsx scripts/check-openapi.ts",
@@ -843,6 +844,7 @@
843
844
  },
844
845
  "dependencies": {
845
846
  "@sinclair/typebox": "^0.34.52",
847
+ "@types/express": "^5.0.3",
846
848
  "body-parser": "^2.2.0",
847
849
  "csv-parse": "^7.0.2",
848
850
  "express": "^5.1.0",
@@ -862,12 +864,10 @@
862
864
  "@rollup/plugin-terser": "^1.0.2",
863
865
  "@rollup/plugin-typescript": "^12.1.4",
864
866
  "@types/chai": "^5.2.2",
865
- "@types/express": "^5.0.3",
866
867
  "@types/js-yaml": "^4.0.9",
867
868
  "@types/mocha": "^10.0.10",
868
869
  "@types/multer": "^2.0.0",
869
870
  "@types/node": "^26.6.5",
870
- "@types/pg": "^8.23.1",
871
871
  "@types/supertest": "^7.2.1",
872
872
  "@typescript-eslint/eslint-plugin": "^8.44.0",
873
873
  "@typescript-eslint/parser": "^8.44.0",
@@ -895,6 +895,7 @@
895
895
  },
896
896
  "optionalDependencies": {
897
897
  "@linagora/rabbitmq-client": "^0.7.2",
898
+ "@types/pg": "^8.23.1",
898
899
  "express-openid-connect": "^3.4.0",
899
900
  "iovalkey": "^0.4.0",
900
901
  "lemonldap-ng-handler": "^0.9.6",