ldap-rest 1.2.1 → 1.3.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.
- package/bin/sync-james.mjs +13 -2
- package/dist/abstract/ldapFlat.js +1 -1
- package/dist/abstract/plugin.js +1 -1
- package/dist/abstract/twakePlugin.js +1 -1
- package/dist/bin/index.js +1 -1
- package/dist/config/args.js +1 -1
- package/dist/config/options.js +1 -0
- package/dist/config/schema.js +1 -1
- package/dist/lib/auth/base.js +1 -1
- package/dist/lib/authz/base.js +1 -1
- package/dist/lib/entitySchema/validator.js +1 -1
- package/dist/lib/errors.js +1 -1
- package/dist/lib/expressFormatedResponses.js +1 -1
- package/dist/lib/health.js +1 -1
- package/dist/lib/hookBus.js +1 -0
- package/dist/lib/instanceProviders.js +1 -1
- package/dist/lib/ldapActions.js +1 -1
- package/dist/lib/ldapSchema.js +1 -1
- package/dist/lib/parseConfig.js +1 -1
- package/dist/lib/route.js +1 -0
- package/dist/lib/schemaFile.js +1 -1
- package/dist/lib/storage/store.js +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/lib/version.js +1 -0
- package/dist/logger/winston.js +1 -1
- package/dist/plugins/auth/auth.options.js +1 -0
- package/dist/plugins/auth/authzDynamic.js +1 -1
- package/dist/plugins/auth/authzLinid1.js +1 -1
- package/dist/plugins/auth/authzPerBranch.js +1 -1
- package/dist/plugins/auth/authzPerRoute.js +1 -1
- package/dist/plugins/auth/authzScope.js +1 -1
- package/dist/plugins/auth/crowdsec.js +1 -1
- package/dist/plugins/auth/fake.js +1 -1
- package/dist/plugins/auth/hmac.js +1 -1
- package/dist/plugins/auth/llng.js +1 -1
- package/dist/plugins/auth/openidconnect.js +1 -1
- package/dist/plugins/auth/rateLimit.js +1 -1
- package/dist/plugins/auth/token.js +1 -1
- package/dist/plugins/auth/totp.js +1 -1
- package/dist/plugins/auth/trustedProxy.js +1 -1
- package/dist/plugins/bcl.js +1 -1
- package/dist/plugins/bcl.options.js +1 -0
- package/dist/plugins/configApi.js +1 -1
- package/dist/plugins/demo/helloworld.js +1 -1
- package/dist/plugins/ldap/accountLifecycle.js +1 -1
- package/dist/plugins/ldap/bulkImport.js +1 -1
- package/dist/plugins/ldap/departmentSync.js +1 -1
- package/dist/plugins/ldap/enterpriseRules.js +1 -1
- package/dist/plugins/ldap/externalUsersInGroups.js +1 -1
- package/dist/plugins/ldap/flatGeneric.js +1 -1
- package/dist/plugins/ldap/groups.js +1 -1
- package/dist/plugins/ldap/ldap.options.js +1 -0
- package/dist/plugins/ldap/onChange.js +1 -1
- package/dist/plugins/ldap/organizations.js +1 -1
- package/dist/plugins/ldap/passwordPolicy.js +1 -1
- package/dist/plugins/ldap/raw.js +1 -1
- package/dist/plugins/ldap/trash.js +1 -1
- package/dist/plugins/metrics.js +1 -1
- package/dist/plugins/metrics.options.js +1 -0
- package/dist/plugins/rabbitmq.js +1 -1
- package/dist/plugins/rabbitmq.options.js +1 -0
- package/dist/plugins/scim/baseResolver.js +1 -1
- package/dist/plugins/scim/bulk.js +1 -1
- package/dist/plugins/scim/discovery.js +1 -1
- package/dist/plugins/scim/errors.js +1 -1
- package/dist/plugins/scim/filter.js +1 -1
- package/dist/plugins/scim/groups.js +1 -1
- package/dist/plugins/scim/mapping.js +1 -1
- package/dist/plugins/scim/patch.js +1 -1
- package/dist/plugins/scim/scim.js +1 -1
- package/dist/plugins/scim/scim.options.js +1 -0
- package/dist/plugins/scim/users.js +1 -1
- package/dist/plugins/static.js +1 -1
- package/dist/plugins/static.options.js +1 -0
- package/dist/plugins/storage/file.js +1 -1
- package/dist/plugins/storage/ldap.js +1 -1
- package/dist/plugins/storage/postgres.js +1 -1
- package/dist/plugins/storage/valkey.js +1 -1
- package/dist/plugins/storage.js +1 -1
- package/dist/plugins/storage.options.js +1 -0
- package/dist/plugins/twake/appAccounts.options.js +1 -0
- package/dist/plugins/twake/appAccountsApi.js +1 -1
- package/dist/plugins/twake/appAccountsConsistency.js +1 -1
- package/dist/plugins/twake/calendar.js +1 -1
- package/dist/plugins/twake/calendar.options.js +1 -0
- package/dist/plugins/twake/calendarResources.js +1 -1
- package/dist/plugins/twake/cloudery.options.js +1 -0
- package/dist/plugins/twake/clouderyProvision.js +1 -1
- package/dist/plugins/twake/cozy.options.js +1 -0
- package/dist/plugins/twake/cozyProvision.js +1 -1
- package/dist/plugins/twake/drive.js +1 -1
- package/dist/plugins/twake/drive.options.js +1 -0
- package/dist/plugins/twake/groups.js +1 -1
- package/dist/plugins/twake/instances.js +1 -1
- package/dist/plugins/twake/james.js +1 -1
- package/dist/plugins/twake/james.options.js +1 -0
- package/dist/plugins/twake/lifecycleAttributes.js +1 -1
- package/dist/plugins/twake/lifecycleEvents.js +1 -1
- package/dist/plugins/twake/migrationProxy.js +1 -1
- package/dist/plugins/twake/migrationProxy.options.js +1 -0
- package/dist/plugins/twake/spaces.js +1 -1
- package/dist/plugins/twake/tombstone.js +1 -1
- package/dist/plugins/twake/twakeGroups.options.js +1 -0
- package/dist/plugins/twake/twakeInstances.options.js +1 -0
- package/dist/plugins/twake/twakeLifecycle.options.js +1 -0
- package/dist/plugins/twake/twakeSpaces.options.js +1 -0
- package/dist/plugins/twake/twakeTombstone.options.js +1 -0
- package/dist/plugins/weblogs.js +1 -1
- package/dist/src/abstract/ldapFlat.d.ts +28 -10
- package/dist/src/abstract/plugin.d.ts +10 -5
- package/dist/src/abstract/twakePlugin.d.ts +14 -4
- package/dist/src/bin/index.d.ts +17 -4
- package/dist/src/config/args.d.ts +2 -4
- package/dist/src/config/options.d.ts +89 -0
- package/dist/src/config/schema.d.ts +50 -1
- package/dist/src/hooks.d.ts +60 -22
- package/dist/src/lib/authz/base.d.ts +4 -51
- package/dist/src/lib/authz/composition.d.ts +2 -2
- package/dist/src/lib/entitySchema/validator.d.ts +63 -6
- package/dist/src/lib/errors.d.ts +56 -1
- package/dist/src/lib/expressFormatedResponses.d.ts +49 -7
- package/dist/src/lib/hookBus.d.ts +226 -0
- package/dist/src/lib/instanceProviders.d.ts +0 -8
- package/dist/src/lib/ldapActions.d.ts +7 -0
- package/dist/src/lib/parseConfig.d.ts +5 -0
- package/dist/src/lib/route.d.ts +99 -0
- package/dist/src/lib/utils.d.ts +31 -36
- package/dist/src/lib/version.d.ts +12 -0
- package/dist/src/plugins/auth/auth.options.d.ts +88 -0
- package/dist/src/plugins/auth/authzDynamic.d.ts +10 -1
- package/dist/src/plugins/auth/authzLinid1.d.ts +6 -0
- package/dist/src/plugins/auth/authzPerBranch.d.ts +9 -0
- package/dist/src/plugins/auth/authzPerRoute.d.ts +3 -0
- package/dist/src/plugins/auth/authzScope.d.ts +23 -14
- package/dist/src/plugins/auth/crowdsec.d.ts +5 -0
- package/dist/src/plugins/auth/fake.d.ts +3 -0
- package/dist/src/plugins/auth/hmac.d.ts +4 -0
- package/dist/src/plugins/auth/llng.d.ts +4 -0
- package/dist/src/plugins/auth/openidconnect.d.ts +7 -0
- package/dist/src/plugins/auth/rateLimit.d.ts +4 -0
- package/dist/src/plugins/auth/token.d.ts +3 -0
- package/dist/src/plugins/auth/totp.d.ts +5 -0
- package/dist/src/plugins/auth/trustedProxy.d.ts +4 -0
- package/dist/src/plugins/bcl.d.ts +3 -0
- package/dist/src/plugins/bcl.options.d.ts +8 -0
- package/dist/src/plugins/configApi.d.ts +24 -5
- package/dist/src/plugins/demo/helloworld.d.ts +8 -19
- package/dist/src/plugins/ldap/accountLifecycle.d.ts +17 -0
- package/dist/src/plugins/ldap/bulkImport.d.ts +6 -76
- package/dist/src/plugins/ldap/departmentSync.d.ts +1 -0
- package/dist/src/plugins/ldap/enterpriseRules.d.ts +8 -1
- package/dist/src/plugins/ldap/externalUsersInGroups.d.ts +4 -0
- package/dist/src/plugins/ldap/flatGeneric.d.ts +4 -0
- package/dist/src/plugins/ldap/groups.d.ts +27 -11
- package/dist/src/plugins/ldap/ldap.options.d.ts +75 -0
- package/dist/src/plugins/ldap/onChange.d.ts +10 -2
- package/dist/src/plugins/ldap/organizations.d.ts +16 -0
- package/dist/src/plugins/ldap/passwordPolicy.d.ts +32 -1
- package/dist/src/plugins/ldap/raw.d.ts +50 -19
- package/dist/src/plugins/ldap/trash.d.ts +6 -0
- package/dist/src/plugins/metrics.d.ts +3 -0
- package/dist/src/plugins/metrics.options.d.ts +8 -0
- package/dist/src/plugins/rabbitmq.d.ts +3 -0
- package/dist/src/plugins/rabbitmq.options.d.ts +8 -0
- package/dist/src/plugins/scim/baseResolver.d.ts +2 -1
- package/dist/src/plugins/scim/bulk.d.ts +6 -7
- package/dist/src/plugins/scim/discovery.d.ts +3 -0
- package/dist/src/plugins/scim/errors.d.ts +2 -1
- package/dist/src/plugins/scim/groups.d.ts +6 -4
- package/dist/src/plugins/scim/scim.d.ts +37 -3
- package/dist/src/plugins/scim/scim.options.d.ts +35 -0
- package/dist/src/plugins/scim/users.d.ts +6 -7
- package/dist/src/plugins/static.d.ts +9 -0
- package/dist/src/plugins/static.options.d.ts +13 -0
- package/dist/src/plugins/storage.d.ts +12 -1
- package/dist/src/plugins/storage.options.d.ts +16 -0
- package/dist/src/plugins/twake/appAccounts.options.d.ts +13 -0
- package/dist/src/plugins/twake/appAccountsApi.d.ts +18 -0
- package/dist/src/plugins/twake/appAccountsConsistency.d.ts +8 -0
- package/dist/src/plugins/twake/calendar.d.ts +25 -2
- package/dist/src/plugins/twake/calendar.options.d.ts +19 -0
- package/dist/src/plugins/twake/cloudery.options.d.ts +26 -0
- package/dist/src/plugins/twake/clouderyProvision.d.ts +18 -0
- package/dist/src/plugins/twake/cozy.options.d.ts +23 -0
- package/dist/src/plugins/twake/cozyProvision.d.ts +14 -0
- package/dist/src/plugins/twake/drive.d.ts +7 -0
- package/dist/src/plugins/twake/drive.options.d.ts +15 -0
- package/dist/src/plugins/twake/groups.d.ts +29 -1
- package/dist/src/plugins/twake/instances.d.ts +43 -10
- package/dist/src/plugins/twake/james.d.ts +17 -0
- package/dist/src/plugins/twake/james.options.d.ts +21 -0
- package/dist/src/plugins/twake/lifecycleEvents.d.ts +12 -0
- package/dist/src/plugins/twake/migrationProxy.d.ts +11 -11
- package/dist/src/plugins/twake/migrationProxy.options.d.ts +16 -0
- package/dist/src/plugins/twake/spaces.d.ts +30 -0
- package/dist/src/plugins/twake/tombstone.d.ts +16 -14
- package/dist/src/plugins/twake/twakeGroups.options.d.ts +20 -0
- package/dist/src/plugins/twake/twakeInstances.options.d.ts +43 -0
- package/dist/src/plugins/twake/twakeLifecycle.options.d.ts +21 -0
- package/dist/src/plugins/twake/twakeSpaces.options.d.ts +19 -0
- package/dist/src/plugins/twake/twakeTombstone.options.d.ts +17 -0
- package/docs/README.md +1 -0
- package/docs/client-development/api/rest-api.md +9 -3
- package/docs/client-development/schemas/README.md +96 -32
- package/docs/plugin-development/README.md +45 -94
- package/docs/plugin-development/dependencies.md +11 -6
- package/docs/plugin-development/hooks.md +142 -23
- package/docs/plugin-development/openapi.md +14 -1
- package/docs/plugin-development/options.md +109 -0
- package/docs/plugin-development/routes.md +152 -0
- package/docs/plugin-development/testing.md +3 -3
- package/docs/usage/configuration.md +18 -11
- package/docs/usage/operations.md +19 -4
- package/docs/usage/plugins/ldap/enterprise-rules.md +10 -1
- package/docs/usage/plugins/ldap/flat-generic.md +4 -0
- package/docs/usage/plugins/ldap/raw.md +17 -1
- package/docs/usage/upgrading.md +194 -0
- package/package.json +358 -277
- package/static/browser/ldap-browser/LdapBrowser.js +8 -6
- package/static/browser/ldap-browser/LdapBrowser.js.map +1 -1
- package/static/browser/ldap-browser/api/RawApiClient.js +2 -0
- package/static/browser/ldap-browser/api/RawApiClient.js.map +1 -1
- package/static/browser/ldap-browser/components/EntryTree.js +9 -5
- package/static/browser/ldap-browser/components/EntryTree.js.map +1 -1
- package/static/browser/ldap-browser/components/EntryView.js +2 -0
- package/static/browser/ldap-browser/components/EntryView.js.map +1 -1
- package/static/browser/ldap-browser/schema.js +3 -2
- package/static/browser/ldap-browser/schema.js.map +1 -1
- package/static/browser/ldap-browser.esm.js +27 -18
- package/static/browser/ldap-browser.esm.js.map +1 -1
- package/static/browser/ldap-browser.js +27 -18
- package/static/browser/ldap-browser.js.map +1 -1
- package/static/browser/ldap-browser.min.js +1 -1
- package/static/browser/ldap-browser.min.js.map +1 -1
- package/static/browser/ldap-group-editor/LdapGroupEditor.js +8 -6
- package/static/browser/ldap-group-editor/LdapGroupEditor.js.map +1 -1
- package/static/browser/ldap-group-editor/api/GroupApiClient.js +1 -0
- package/static/browser/ldap-group-editor/api/GroupApiClient.js.map +1 -1
- package/static/browser/ldap-group-editor/components/CreateGroupModal.js +5 -1
- package/static/browser/ldap-group-editor/components/CreateGroupModal.js.map +1 -1
- package/static/browser/ldap-group-editor/components/GroupPropertyEditor.js +6 -3
- package/static/browser/ldap-group-editor/components/GroupPropertyEditor.js.map +1 -1
- package/static/browser/ldap-group-editor/components/GroupTree.js +6 -3
- package/static/browser/ldap-group-editor/components/GroupTree.js.map +1 -1
- package/static/browser/ldap-group-editor/components/MoveGroupModal.js +6 -3
- package/static/browser/ldap-group-editor/components/MoveGroupModal.js.map +1 -1
- package/static/browser/ldap-group-editor.esm.js +32 -16
- package/static/browser/ldap-group-editor.esm.js.map +1 -1
- package/static/browser/ldap-group-editor.js +32 -16
- package/static/browser/ldap-group-editor.js.map +1 -1
- package/static/browser/ldap-group-editor.min.js +1 -1
- package/static/browser/ldap-group-editor.min.js.map +1 -1
- package/static/browser/ldap-resource-editor/api/ResourceApiClient.js +3 -0
- package/static/browser/ldap-resource-editor/api/ResourceApiClient.js.map +1 -1
- package/static/browser/ldap-resource-editor/cache/CacheManager.js +3 -1
- package/static/browser/ldap-resource-editor/cache/CacheManager.js.map +1 -1
- package/static/browser/ldap-tree-viewer/LdapTreeViewer.js +6 -1
- package/static/browser/ldap-tree-viewer/LdapTreeViewer.js.map +1 -1
- package/static/browser/ldap-tree-viewer/api/LdapApiClient.js +2 -0
- package/static/browser/ldap-tree-viewer/api/LdapApiClient.js.map +1 -1
- package/static/browser/ldap-tree-viewer/components/TreeNode.js +4 -0
- package/static/browser/ldap-tree-viewer/components/TreeNode.js.map +1 -1
- package/static/browser/ldap-tree-viewer/components/TreeRoot.js +3 -0
- package/static/browser/ldap-tree-viewer/components/TreeRoot.js.map +1 -1
- package/static/browser/ldap-tree-viewer/store/Store.js +3 -1
- package/static/browser/ldap-tree-viewer/store/Store.js.map +1 -1
- package/static/browser/ldap-tree-viewer.esm.js +18 -2
- package/static/browser/ldap-tree-viewer.esm.js.map +1 -1
- package/static/browser/ldap-tree-viewer.js +18 -2
- package/static/browser/ldap-tree-viewer.js.map +1 -1
- package/static/browser/ldap-tree-viewer.min.js +1 -1
- package/static/browser/ldap-tree-viewer.min.js.map +1 -1
- package/static/browser/ldap-unit-editor/LdapUnitEditor.js +7 -5
- package/static/browser/ldap-unit-editor/LdapUnitEditor.js.map +1 -1
- package/static/browser/ldap-unit-editor/api/UnitApiClient.js +1 -0
- package/static/browser/ldap-unit-editor/api/UnitApiClient.js.map +1 -1
- package/static/browser/ldap-unit-editor/components/MoveUnitModal.js +7 -4
- package/static/browser/ldap-unit-editor/components/MoveUnitModal.js.map +1 -1
- package/static/browser/ldap-unit-editor/components/UnitPropertyEditor.js +7 -4
- package/static/browser/ldap-unit-editor/components/UnitPropertyEditor.js.map +1 -1
- package/static/browser/ldap-unit-editor/components/UnitTree.js +6 -3
- package/static/browser/ldap-unit-editor/components/UnitTree.js.map +1 -1
- package/static/browser/ldap-unit-editor.esm.js +28 -16
- package/static/browser/ldap-unit-editor.esm.js.map +1 -1
- package/static/browser/ldap-unit-editor.js +28 -16
- package/static/browser/ldap-unit-editor.js.map +1 -1
- package/static/browser/ldap-unit-editor.min.js +1 -1
- package/static/browser/ldap-unit-editor.min.js.map +1 -1
- package/static/browser/ldap-user-editor/LdapUserEditor.js +9 -7
- package/static/browser/ldap-user-editor/LdapUserEditor.js.map +1 -1
- package/static/browser/ldap-user-editor/api/UserApiClient.js +2 -0
- package/static/browser/ldap-user-editor/api/UserApiClient.js.map +1 -1
- package/static/browser/ldap-user-editor/cache/CacheManager.js +3 -1
- package/static/browser/ldap-user-editor/cache/CacheManager.js.map +1 -1
- package/static/browser/ldap-user-editor/components/MoveUserModal.js +7 -4
- package/static/browser/ldap-user-editor/components/MoveUserModal.js.map +1 -1
- package/static/browser/ldap-user-editor/components/PointerField.js +6 -1
- package/static/browser/ldap-user-editor/components/PointerField.js.map +1 -1
- package/static/browser/ldap-user-editor/components/UserEditor.js +10 -5
- package/static/browser/ldap-user-editor/components/UserEditor.js.map +1 -1
- package/static/browser/ldap-user-editor/components/UserList.js +8 -4
- package/static/browser/ldap-user-editor/components/UserList.js.map +1 -1
- package/static/browser/ldap-user-editor/components/UserTree.js +7 -3
- package/static/browser/ldap-user-editor/components/UserTree.js.map +1 -1
- package/static/browser/ldap-user-editor.esm.js +55 -30
- package/static/browser/ldap-user-editor.esm.js.map +1 -1
- package/static/browser/ldap-user-editor.js +55 -30
- package/static/browser/ldap-user-editor.js.map +1 -1
- package/static/browser/ldap-user-editor.min.js +1 -1
- package/static/browser/ldap-user-editor.min.js.map +1 -1
- package/static/browser/shared/components/DisposableComponent.js +3 -5
- package/static/browser/shared/components/DisposableComponent.js.map +1 -1
- package/static/browser/shared/components/Modal.js +2 -1
- package/static/browser/shared/components/Modal.js.map +1 -1
- package/static/browser/shared/components/StatusMessage.js +3 -2
- package/static/browser/shared/components/StatusMessage.js.map +1 -1
- package/static/browser/shared/utils/form.js.map +1 -1
- package/static/browser/shared/utils/hmac.js +1 -0
- package/static/browser/shared/utils/hmac.js.map +1 -1
- package/static/browser/shared/utils/totp.js +1 -0
- package/static/browser/shared/utils/totp.js.map +1 -1
- package/static/browser/shared.esm.js +9 -8
- package/static/browser/shared.esm.js.map +1 -1
- package/static/browser/shared.js +9 -8
- package/static/browser/shared.js.map +1 -1
- package/static/browser/shared.min.js +1 -1
- package/static/browser/shared.min.js.map +1 -1
- package/static/schemas/ad/groups.json +1 -1
- package/static/schemas/ad/users.json +3 -3
- package/static/schemas/example/organizations.json +2 -2
- package/static/schemas/example/users.json +2 -2
- package/static/schemas/obm/users.json +2 -2
- package/static/schemas/standard/groups.json +1 -1
- package/static/schemas/standard/users.json +2 -2
- package/static/schemas/twake/groups.json +4 -4
- package/static/schemas/twake/teamMailboxes.json +3 -3
- package/static/schemas/twake/users.json +7 -7
|
@@ -2,7 +2,7 @@ import type { Express, RequestHandler } from 'express';
|
|
|
2
2
|
import DmPlugin, { type Role } from '../../abstract/plugin';
|
|
3
3
|
import type { DM } from '../../bin';
|
|
4
4
|
import type ldapActions from '../../lib/ldapActions';
|
|
5
|
-
import type
|
|
5
|
+
import { type ScimOptions } from './scim.options';
|
|
6
6
|
import { writeScimErrorFromException } from './errors';
|
|
7
7
|
/**
|
|
8
8
|
* Reusable SCIM 2.0 schemas surfaced by this plugin.
|
|
@@ -398,11 +398,44 @@ import { writeScimErrorFromException } from './errors';
|
|
|
398
398
|
* that a SCIM request sent as such gets the SCIM limit rather than the global
|
|
399
399
|
* parser's 100kb
|
|
400
400
|
*
|
|
401
|
-
* @param
|
|
401
|
+
* @param options the SCIM options holding the payload limit
|
|
402
402
|
* @returns the parser
|
|
403
403
|
*/
|
|
404
|
-
export declare function scimBodyParser(
|
|
404
|
+
export declare function scimBodyParser(options: ScimOptions): RequestHandler;
|
|
405
|
+
export declare const ScimIdParams: import("@sinclair/typebox").TObject<{
|
|
406
|
+
id: import("@sinclair/typebox").TString;
|
|
407
|
+
}>;
|
|
408
|
+
export declare const ScimNameParams: import("@sinclair/typebox").TObject<{
|
|
409
|
+
name: import("@sinclair/typebox").TString;
|
|
410
|
+
}>;
|
|
405
411
|
export default class Scim extends DmPlugin {
|
|
412
|
+
static optionDefinitions: {
|
|
413
|
+
scim_prefix: import("../../config/options").StringOption;
|
|
414
|
+
scim_user_base: import("../../config/options").StringOption;
|
|
415
|
+
scim_group_base: import("../../config/options").StringOption;
|
|
416
|
+
scim_user_base_template: import("../../config/options").StringOption;
|
|
417
|
+
scim_group_base_template: import("../../config/options").StringOption;
|
|
418
|
+
scim_base_map: import("../../config/options").StringOption;
|
|
419
|
+
scim_user_base_header: import("../../config/options").StringOption;
|
|
420
|
+
scim_group_base_header: import("../../config/options").StringOption;
|
|
421
|
+
scim_base_header_root: import("../../config/options").StringOption;
|
|
422
|
+
scim_user_object_class: import("../../config/options").ArrayOption;
|
|
423
|
+
scim_user_rdn_attribute: import("../../config/options").StringOption;
|
|
424
|
+
scim_user_lock_attribute: import("../../config/options").StringOption;
|
|
425
|
+
scim_user_lock_value: import("../../config/options").StringOption;
|
|
426
|
+
scim_group_object_class: import("../../config/options").ArrayOption;
|
|
427
|
+
scim_group_rdn_attribute: import("../../config/options").StringOption;
|
|
428
|
+
scim_group_external_id_attribute: import("../../config/options").StringOption;
|
|
429
|
+
scim_id_attribute: import("../../config/options").StringOption;
|
|
430
|
+
scim_user_mapping: import("../../config/options").StringOption;
|
|
431
|
+
scim_group_mapping: import("../../config/options").StringOption;
|
|
432
|
+
scim_max_results: import("../../config/options").NumberOption;
|
|
433
|
+
scim_max_scanned: import("../../config/options").NumberOption;
|
|
434
|
+
scim_bulk_max_operations: import("../../config/options").NumberOption;
|
|
435
|
+
scim_bulk_max_payload_size: import("../../config/options").NumberOption;
|
|
436
|
+
scim_etag: import("../../config/options").BooleanOption;
|
|
437
|
+
scim_base_url: import("../../config/options").StringOption;
|
|
438
|
+
};
|
|
406
439
|
name: string;
|
|
407
440
|
roles: Role[];
|
|
408
441
|
ldap: ldapActions;
|
|
@@ -414,6 +447,7 @@ export default class Scim extends DmPlugin {
|
|
|
414
447
|
/** Where it reads its schema files, which the static plugins may serve */
|
|
415
448
|
private readonly scimSchemaDir;
|
|
416
449
|
private readonly baseResolver;
|
|
450
|
+
private readonly settings;
|
|
417
451
|
constructor(server: DM);
|
|
418
452
|
private scimJson;
|
|
419
453
|
/**
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SCIM 2.0 plugin options, see `docs/plugin-development/options.md`.
|
|
3
|
+
*/
|
|
4
|
+
import type { Config } from '../../config/args';
|
|
5
|
+
import { type OptionsOf } from '../../config/options';
|
|
6
|
+
export declare const scimOptions: {
|
|
7
|
+
scim_prefix: import("../../config/options").StringOption;
|
|
8
|
+
scim_user_base: import("../../config/options").StringOption;
|
|
9
|
+
scim_group_base: import("../../config/options").StringOption;
|
|
10
|
+
scim_user_base_template: import("../../config/options").StringOption;
|
|
11
|
+
scim_group_base_template: import("../../config/options").StringOption;
|
|
12
|
+
scim_base_map: import("../../config/options").StringOption;
|
|
13
|
+
scim_user_base_header: import("../../config/options").StringOption;
|
|
14
|
+
scim_group_base_header: import("../../config/options").StringOption;
|
|
15
|
+
scim_base_header_root: import("../../config/options").StringOption;
|
|
16
|
+
scim_user_object_class: import("../../config/options").ArrayOption;
|
|
17
|
+
scim_user_rdn_attribute: import("../../config/options").StringOption;
|
|
18
|
+
scim_user_lock_attribute: import("../../config/options").StringOption;
|
|
19
|
+
scim_user_lock_value: import("../../config/options").StringOption;
|
|
20
|
+
scim_group_object_class: import("../../config/options").ArrayOption;
|
|
21
|
+
scim_group_rdn_attribute: import("../../config/options").StringOption;
|
|
22
|
+
scim_group_external_id_attribute: import("../../config/options").StringOption;
|
|
23
|
+
scim_id_attribute: import("../../config/options").StringOption;
|
|
24
|
+
scim_user_mapping: import("../../config/options").StringOption;
|
|
25
|
+
scim_group_mapping: import("../../config/options").StringOption;
|
|
26
|
+
scim_max_results: import("../../config/options").NumberOption;
|
|
27
|
+
scim_max_scanned: import("../../config/options").NumberOption;
|
|
28
|
+
scim_bulk_max_operations: import("../../config/options").NumberOption;
|
|
29
|
+
scim_bulk_max_payload_size: import("../../config/options").NumberOption;
|
|
30
|
+
scim_etag: import("../../config/options").BooleanOption;
|
|
31
|
+
scim_base_url: import("../../config/options").StringOption;
|
|
32
|
+
};
|
|
33
|
+
export type ScimOptions = OptionsOf<typeof scimOptions>;
|
|
34
|
+
/** The checked values for a caller outside the plugin that holds a Config */
|
|
35
|
+
export declare function scimOptionsOf(config: Config): ScimOptions;
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type winston from 'winston';
|
|
8
8
|
import type ldapActions from '../../lib/ldapActions';
|
|
9
|
-
import type { Config } from '../../config/args';
|
|
10
9
|
import type { DmRequest } from '../../lib/auth/base';
|
|
10
|
+
import type HookBus from '../../lib/hookBus';
|
|
11
11
|
import { BaseResolver } from './baseResolver';
|
|
12
|
+
import type { ScimOptions } from './scim.options';
|
|
12
13
|
import { type ResourceMapping, type ScimUser, type ListResponse, type PatchRequest } from './types';
|
|
13
14
|
export interface ListQuery {
|
|
14
15
|
filter?: string;
|
|
@@ -21,19 +22,17 @@ export interface ListQuery {
|
|
|
21
22
|
}
|
|
22
23
|
export interface ScimUsersOptions {
|
|
23
24
|
ldap: ldapActions;
|
|
24
|
-
|
|
25
|
+
options: ScimOptions;
|
|
25
26
|
logger: winston.Logger;
|
|
26
27
|
baseResolver: BaseResolver;
|
|
27
|
-
|
|
28
|
-
[K: string]: Function[] | undefined;
|
|
29
|
-
};
|
|
28
|
+
hookBus: HookBus;
|
|
30
29
|
}
|
|
31
30
|
export declare class ScimUsers {
|
|
32
31
|
private readonly ldap;
|
|
33
|
-
private readonly
|
|
32
|
+
private readonly options;
|
|
34
33
|
private readonly logger;
|
|
35
34
|
private readonly baseResolver;
|
|
36
|
-
private readonly
|
|
35
|
+
private readonly hookBus;
|
|
37
36
|
private readonly mapping;
|
|
38
37
|
private readonly rdnAttribute;
|
|
39
38
|
private readonly objectClass;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Express } from 'express';
|
|
2
2
|
import DmPlugin, { type Role } from '../abstract/plugin';
|
|
3
|
+
import type { DM } from '../bin';
|
|
3
4
|
/**
|
|
4
5
|
* @openapi-component
|
|
5
6
|
* LdapSchema:
|
|
@@ -35,10 +36,18 @@ import DmPlugin, { type Role } from '../abstract/plugin';
|
|
|
35
36
|
* required: true
|
|
36
37
|
*/
|
|
37
38
|
export default class Static extends DmPlugin {
|
|
39
|
+
static optionDefinitions: {
|
|
40
|
+
static_path: import("../config/options").StringOption;
|
|
41
|
+
static_name: import("../config/options").StringOption;
|
|
42
|
+
static_csp: import("../config/options").StringOrFalseOption;
|
|
43
|
+
static_frame_options: import("../config/options").StringOrFalseOption;
|
|
44
|
+
};
|
|
38
45
|
name: string;
|
|
39
46
|
roles: Role[];
|
|
40
47
|
/** The configuration's schema files it serves outside its directory, by URL */
|
|
41
48
|
private configured;
|
|
49
|
+
private readonly settings;
|
|
50
|
+
constructor(server: DM);
|
|
42
51
|
api(app: Express): void;
|
|
43
52
|
/**
|
|
44
53
|
* The handler of the schema routes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Config } from '../config/args';
|
|
2
|
+
import { type OptionsOf } from '../config/options';
|
|
3
|
+
/** The headers `core/static` sends unless told otherwise: no framing by another site */
|
|
4
|
+
export declare const STATIC_CSP = "frame-ancestors 'self'";
|
|
5
|
+
export declare const STATIC_FRAME_OPTIONS = "SAMEORIGIN";
|
|
6
|
+
export declare const staticOptions: {
|
|
7
|
+
static_path: import("../config/options").StringOption;
|
|
8
|
+
static_name: import("../config/options").StringOption;
|
|
9
|
+
static_csp: import("../config/options").StringOrFalseOption;
|
|
10
|
+
static_frame_options: import("../config/options").StringOrFalseOption;
|
|
11
|
+
};
|
|
12
|
+
export type StaticOptions = OptionsOf<typeof staticOptions>;
|
|
13
|
+
export declare function staticOptionsOf(config: Config): StaticOptions;
|
|
@@ -29,9 +29,20 @@
|
|
|
29
29
|
*/
|
|
30
30
|
import DmPlugin from '../abstract/plugin';
|
|
31
31
|
import type { DM } from '../bin';
|
|
32
|
-
import type Store from '../lib/storage/store';
|
|
33
32
|
import type { HealthStatus } from '../lib/health';
|
|
33
|
+
import type Store from '../lib/storage/store';
|
|
34
34
|
export default class Storage extends DmPlugin {
|
|
35
|
+
static optionDefinitions: {
|
|
36
|
+
storage_backend: import("../config/options").StringOption;
|
|
37
|
+
storage_sweep_interval: import("../config/options").NumberOption;
|
|
38
|
+
storage_ldap_base: import("../config/options").StringOption;
|
|
39
|
+
storage_ldap_object_class: import("../config/options").StringOption;
|
|
40
|
+
storage_file_directory: import("../config/options").StringOption;
|
|
41
|
+
storage_postgres_url: import("../config/options").StringOption;
|
|
42
|
+
storage_postgres_table: import("../config/options").StringOption;
|
|
43
|
+
storage_valkey_url: import("../config/options").StringOption;
|
|
44
|
+
storage_valkey_prefix: import("../config/options").StringOption;
|
|
45
|
+
};
|
|
35
46
|
name: string;
|
|
36
47
|
store: Store;
|
|
37
48
|
constructor(server: DM);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Keyed storage plugin options. */
|
|
2
|
+
import type { Config } from '../config/args';
|
|
3
|
+
import { type OptionsOf } from '../config/options';
|
|
4
|
+
export declare const storageOptions: {
|
|
5
|
+
storage_backend: import("../config/options").StringOption;
|
|
6
|
+
storage_sweep_interval: import("../config/options").NumberOption;
|
|
7
|
+
storage_ldap_base: import("../config/options").StringOption;
|
|
8
|
+
storage_ldap_object_class: import("../config/options").StringOption;
|
|
9
|
+
storage_file_directory: import("../config/options").StringOption;
|
|
10
|
+
storage_postgres_url: import("../config/options").StringOption;
|
|
11
|
+
storage_postgres_table: import("../config/options").StringOption;
|
|
12
|
+
storage_valkey_url: import("../config/options").StringOption;
|
|
13
|
+
storage_valkey_prefix: import("../config/options").StringOption;
|
|
14
|
+
};
|
|
15
|
+
export type StorageOptions = OptionsOf<typeof storageOptions>;
|
|
16
|
+
export declare function storageOptionsOf(config: Config): StorageOptions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Applicative accounts options, shared by `appAccountsApi` and
|
|
3
|
+
* `appAccountsConsistency`. See `docs/plugin-development/options.md`.
|
|
4
|
+
*/
|
|
5
|
+
import { type OptionsOf } from '../../config/options';
|
|
6
|
+
export declare const appAccountsOptions: {
|
|
7
|
+
applicative_account_base: import("../../config/options").StringOption;
|
|
8
|
+
max_app_accounts: import("../../config/options").NumberOption;
|
|
9
|
+
app_accounts_user_attribute: import("../../config/options").StringOption;
|
|
10
|
+
applicative_account_attribute: import("../../config/options").ArrayOption;
|
|
11
|
+
ldap_operational_attribute: import("../../config/options").ArrayOption;
|
|
12
|
+
};
|
|
13
|
+
export type AppAccountsOptions = OptionsOf<typeof appAccountsOptions>;
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import type { Express } from 'express';
|
|
2
2
|
import DmPlugin, { type Role } from '../../abstract/plugin';
|
|
3
3
|
import type { DM } from '../../bin';
|
|
4
|
+
export declare const AppAccountsParams: import("@sinclair/typebox").TObject<{
|
|
5
|
+
user: import("@sinclair/typebox").TString;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const AppAccountParams: import("@sinclair/typebox").TObject<{
|
|
8
|
+
user: import("@sinclair/typebox").TString;
|
|
9
|
+
uid: import("@sinclair/typebox").TString;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const AppAccountCreateBody: import("@sinclair/typebox").TObject<{
|
|
12
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
13
|
+
}>;
|
|
4
14
|
export default class AppAccountsApi extends DmPlugin {
|
|
15
|
+
static optionDefinitions: {
|
|
16
|
+
applicative_account_base: import("../../config/options").StringOption;
|
|
17
|
+
max_app_accounts: import("../../config/options").NumberOption;
|
|
18
|
+
app_accounts_user_attribute: import("../../config/options").StringOption;
|
|
19
|
+
applicative_account_attribute: import("../../config/options").ArrayOption;
|
|
20
|
+
ldap_operational_attribute: import("../../config/options").ArrayOption;
|
|
21
|
+
};
|
|
5
22
|
name: string;
|
|
6
23
|
roles: Role[];
|
|
7
24
|
dependencies: {
|
|
8
25
|
appAccountsConsistency: string;
|
|
9
26
|
};
|
|
27
|
+
private readonly settings;
|
|
10
28
|
private applicativeAccountBase;
|
|
11
29
|
private maxAppAccounts;
|
|
12
30
|
private mailAttr;
|
|
@@ -29,11 +29,19 @@ import type { Role } from '../../abstract/plugin';
|
|
|
29
29
|
import type { DM } from '../../bin';
|
|
30
30
|
import { Hooks } from '../../hooks';
|
|
31
31
|
export default class AppAccountsConsistency extends DmPlugin {
|
|
32
|
+
static optionDefinitions: {
|
|
33
|
+
applicative_account_base: import("../../config/options").StringOption;
|
|
34
|
+
max_app_accounts: import("../../config/options").NumberOption;
|
|
35
|
+
app_accounts_user_attribute: import("../../config/options").StringOption;
|
|
36
|
+
applicative_account_attribute: import("../../config/options").ArrayOption;
|
|
37
|
+
ldap_operational_attribute: import("../../config/options").ArrayOption;
|
|
38
|
+
};
|
|
32
39
|
name: string;
|
|
33
40
|
roles: Role[];
|
|
34
41
|
dependencies: {
|
|
35
42
|
onLdapChange: string;
|
|
36
43
|
};
|
|
44
|
+
private readonly settings;
|
|
37
45
|
private mailAttr;
|
|
38
46
|
private applicativeAccountBase;
|
|
39
47
|
private operationalAttributes;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import TwakePlugin from '../../abstract/twakePlugin';
|
|
2
2
|
import { type Role } from '../../abstract/plugin';
|
|
3
|
-
import {
|
|
3
|
+
import type { AttributesList, ModifyRequest } from '../../lib/ldapActions';
|
|
4
|
+
import { Hooks, MaybePromise } from '../../hooks';
|
|
4
5
|
/**
|
|
5
6
|
* Plugin to sync LDAP resources and users with Twake Calendar
|
|
6
7
|
*
|
|
@@ -10,7 +11,28 @@ import { Hooks } from '../../hooks';
|
|
|
10
11
|
* Also propagates user identity changes (email, first name, last name) to the
|
|
11
12
|
* Twake Calendar "registered users" via the WebAdmin API.
|
|
12
13
|
*/
|
|
14
|
+
/**
|
|
15
|
+
* The hooks of the `calendarResource` flat entity, which no flag of the
|
|
16
|
+
* core names: `ldapcalendarResourceadddone`, `…modifydone` and
|
|
17
|
+
* `…deletedone`.
|
|
18
|
+
*/
|
|
19
|
+
type CalendarResourceHooks = {
|
|
20
|
+
ldapcalendarResourceadddone?: (dn: string, entry: AttributesList) => MaybePromise<void>;
|
|
21
|
+
ldapcalendarResourcemodifydone?: (dn: string, changes: ModifyRequest, op: number) => MaybePromise<void>;
|
|
22
|
+
ldapcalendarResourcedeletedone?: (dn: string) => MaybePromise<void>;
|
|
23
|
+
};
|
|
13
24
|
export default class Calendar extends TwakePlugin {
|
|
25
|
+
static optionDefinitions: {
|
|
26
|
+
calendar_webadmin_url: import("../../config/options").StringOption;
|
|
27
|
+
calendar_webadmin_token: import("../../config/options").StringOption;
|
|
28
|
+
calendar_concurrency: import("../../config/options").NumberOption;
|
|
29
|
+
calendar_resource_base: import("../../config/options").StringOption;
|
|
30
|
+
calendar_resource_objectclass: import("../../config/options").StringOption;
|
|
31
|
+
calendar_resource_creator: import("../../config/options").StringOption;
|
|
32
|
+
calendar_resource_domain: import("../../config/options").StringOption;
|
|
33
|
+
calendar_firstname_attribute: import("../../config/options").StringOption;
|
|
34
|
+
calendar_lastname_attribute: import("../../config/options").StringOption;
|
|
35
|
+
};
|
|
14
36
|
name: string;
|
|
15
37
|
roles: Role[];
|
|
16
38
|
dependencies: {
|
|
@@ -23,7 +45,7 @@ export default class Calendar extends TwakePlugin {
|
|
|
23
45
|
private firstnameAttr;
|
|
24
46
|
private lastnameAttr;
|
|
25
47
|
constructor(server: import('../../bin').DM);
|
|
26
|
-
hooks: Hooks;
|
|
48
|
+
hooks: Hooks & CalendarResourceHooks;
|
|
27
49
|
/**
|
|
28
50
|
* Check if a LDAP entry is a calendar resource
|
|
29
51
|
*/
|
|
@@ -111,3 +133,4 @@ export default class Calendar extends TwakePlugin {
|
|
|
111
133
|
taskId: string;
|
|
112
134
|
} | null>;
|
|
113
135
|
}
|
|
136
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Twake Calendar plugin options, see `docs/plugin-development/options.md`.
|
|
3
|
+
*/
|
|
4
|
+
import type { Config } from '../../config/args';
|
|
5
|
+
import { type OptionsOf } from '../../config/options';
|
|
6
|
+
export declare const calendarOptions: {
|
|
7
|
+
calendar_webadmin_url: import("../../config/options").StringOption;
|
|
8
|
+
calendar_webadmin_token: import("../../config/options").StringOption;
|
|
9
|
+
calendar_concurrency: import("../../config/options").NumberOption;
|
|
10
|
+
calendar_resource_base: import("../../config/options").StringOption;
|
|
11
|
+
calendar_resource_objectclass: import("../../config/options").StringOption;
|
|
12
|
+
calendar_resource_creator: import("../../config/options").StringOption;
|
|
13
|
+
calendar_resource_domain: import("../../config/options").StringOption;
|
|
14
|
+
calendar_firstname_attribute: import("../../config/options").StringOption;
|
|
15
|
+
calendar_lastname_attribute: import("../../config/options").StringOption;
|
|
16
|
+
};
|
|
17
|
+
export type CalendarOptions = OptionsOf<typeof calendarOptions>;
|
|
18
|
+
/** The checked values for a caller that holds a Config instead of the plugin */
|
|
19
|
+
export declare function calendarOptionsOf(config: Config): CalendarOptions;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloudery provisioning options, see `docs/plugin-development/options.md`.
|
|
3
|
+
*/
|
|
4
|
+
import type { Config } from '../../config/args';
|
|
5
|
+
import { type OptionsOf } from '../../config/options';
|
|
6
|
+
export declare const clouderyOptions: {
|
|
7
|
+
cloudery_manager_url: import("../../config/options").StringOption;
|
|
8
|
+
cloudery_manager_token: import("../../config/options").StringOption;
|
|
9
|
+
cloudery_offer: import("../../config/options").StringOption;
|
|
10
|
+
cloudery_domain: import("../../config/options").StringOption;
|
|
11
|
+
cloudery_user_branch: import("../../config/options").StringOption;
|
|
12
|
+
cloudery_org_id_header: import("../../config/options").StringOption;
|
|
13
|
+
cloudery_org_role_header: import("../../config/options").StringOption;
|
|
14
|
+
cloudery_default_org_role: import("../../config/options").StringOption;
|
|
15
|
+
cloudery_fqdn_attribute: import("../../config/options").StringOption;
|
|
16
|
+
cloudery_org_id_attribute: import("../../config/options").StringOption;
|
|
17
|
+
cloudery_org_role_attribute: import("../../config/options").StringOption;
|
|
18
|
+
cloudery_phones_attribute: import("../../config/options").StringOption;
|
|
19
|
+
cloudery_invited_attribute: import("../../config/options").StringOption;
|
|
20
|
+
cloudery_default_locale: import("../../config/options").StringOption;
|
|
21
|
+
cloudery_workflow_poll_interval_ms: import("../../config/options").NumberOption;
|
|
22
|
+
cloudery_workflow_max_attempts: import("../../config/options").NumberOption;
|
|
23
|
+
};
|
|
24
|
+
export type ClouderyOptions = OptionsOf<typeof clouderyOptions>;
|
|
25
|
+
/** The checked values for a caller that holds a Config instead of the plugin */
|
|
26
|
+
export declare function clouderyOptionsOf(config: Config): ClouderyOptions;
|
|
@@ -2,6 +2,24 @@ import DmPlugin, { type Role } from '../../abstract/plugin';
|
|
|
2
2
|
import type { DM } from '../../bin';
|
|
3
3
|
import { Hooks } from '../../hooks';
|
|
4
4
|
export default class ClouderyProvision extends DmPlugin {
|
|
5
|
+
static optionDefinitions: {
|
|
6
|
+
cloudery_manager_url: import("../../config/options").StringOption;
|
|
7
|
+
cloudery_manager_token: import("../../config/options").StringOption;
|
|
8
|
+
cloudery_offer: import("../../config/options").StringOption;
|
|
9
|
+
cloudery_domain: import("../../config/options").StringOption;
|
|
10
|
+
cloudery_user_branch: import("../../config/options").StringOption;
|
|
11
|
+
cloudery_org_id_header: import("../../config/options").StringOption;
|
|
12
|
+
cloudery_org_role_header: import("../../config/options").StringOption;
|
|
13
|
+
cloudery_default_org_role: import("../../config/options").StringOption;
|
|
14
|
+
cloudery_fqdn_attribute: import("../../config/options").StringOption;
|
|
15
|
+
cloudery_org_id_attribute: import("../../config/options").StringOption;
|
|
16
|
+
cloudery_org_role_attribute: import("../../config/options").StringOption;
|
|
17
|
+
cloudery_phones_attribute: import("../../config/options").StringOption;
|
|
18
|
+
cloudery_invited_attribute: import("../../config/options").StringOption;
|
|
19
|
+
cloudery_default_locale: import("../../config/options").StringOption;
|
|
20
|
+
cloudery_workflow_poll_interval_ms: import("../../config/options").NumberOption;
|
|
21
|
+
cloudery_workflow_max_attempts: import("../../config/options").NumberOption;
|
|
22
|
+
};
|
|
5
23
|
name: string;
|
|
6
24
|
roles: Role[];
|
|
7
25
|
dependencies: {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cozy provisioning options, shared by `cozyProvision` and
|
|
3
|
+
* `clouderyProvision`. See `docs/plugin-development/options.md`.
|
|
4
|
+
*/
|
|
5
|
+
import type { Config } from '../../config/args';
|
|
6
|
+
import { type OptionsOf } from '../../config/options';
|
|
7
|
+
export declare const cozyOptions: {
|
|
8
|
+
cozy_admin_url: import("../../config/options").StringOption;
|
|
9
|
+
cozy_admin_user: import("../../config/options").StringOption;
|
|
10
|
+
cozy_admin_passphrase: import("../../config/options").StringOption;
|
|
11
|
+
cozy_org_id: import("../../config/options").StringOption;
|
|
12
|
+
cozy_org_domain: import("../../config/options").StringOption;
|
|
13
|
+
cozy_default_locale: import("../../config/options").StringOption;
|
|
14
|
+
cozy_context_name: import("../../config/options").StringOption;
|
|
15
|
+
cozy_apps: import("../../config/options").StringOption;
|
|
16
|
+
cozy_auth_exchange: import("../../config/options").StringOption;
|
|
17
|
+
cozy_b2b_exchange: import("../../config/options").StringOption;
|
|
18
|
+
cozy_user_created_routing_key: import("../../config/options").StringOption;
|
|
19
|
+
cozy_user_deleted_routing_key: import("../../config/options").StringOption;
|
|
20
|
+
};
|
|
21
|
+
export type CozyOptions = OptionsOf<typeof cozyOptions>;
|
|
22
|
+
/** The checked values for a caller that holds a Config instead of the plugin */
|
|
23
|
+
export declare function cozyOptionsOf(config: Config): CozyOptions;
|
|
@@ -2,6 +2,20 @@ import DmPlugin, { type Role } from '../../abstract/plugin';
|
|
|
2
2
|
import type { DM } from '../../bin';
|
|
3
3
|
import { Hooks } from '../../hooks';
|
|
4
4
|
export default class CozyProvision extends DmPlugin {
|
|
5
|
+
static optionDefinitions: {
|
|
6
|
+
cozy_admin_url: import("../../config/options").StringOption;
|
|
7
|
+
cozy_admin_user: import("../../config/options").StringOption;
|
|
8
|
+
cozy_admin_passphrase: import("../../config/options").StringOption;
|
|
9
|
+
cozy_org_id: import("../../config/options").StringOption;
|
|
10
|
+
cozy_org_domain: import("../../config/options").StringOption;
|
|
11
|
+
cozy_default_locale: import("../../config/options").StringOption;
|
|
12
|
+
cozy_context_name: import("../../config/options").StringOption;
|
|
13
|
+
cozy_apps: import("../../config/options").StringOption;
|
|
14
|
+
cozy_auth_exchange: import("../../config/options").StringOption;
|
|
15
|
+
cozy_b2b_exchange: import("../../config/options").StringOption;
|
|
16
|
+
cozy_user_created_routing_key: import("../../config/options").StringOption;
|
|
17
|
+
cozy_user_deleted_routing_key: import("../../config/options").StringOption;
|
|
18
|
+
};
|
|
5
19
|
name: string;
|
|
6
20
|
roles: Role[];
|
|
7
21
|
dependencies: {
|
|
@@ -11,6 +11,13 @@ import { type Role } from '../../abstract/plugin';
|
|
|
11
11
|
import type { DM } from '../../bin';
|
|
12
12
|
import { Hooks } from '../../hooks';
|
|
13
13
|
export default class Drive extends TwakePlugin {
|
|
14
|
+
static optionDefinitions: {
|
|
15
|
+
twake_drive_webadmin_url: import("../../config/options").StringOption;
|
|
16
|
+
twake_drive_webadmin_token: import("../../config/options").StringOption;
|
|
17
|
+
twake_drive_concurrency: import("../../config/options").NumberOption;
|
|
18
|
+
twake_drive_domain_attribute: import("../../config/options").StringOption;
|
|
19
|
+
twake_drive_default_domain_template: import("../../config/options").StringOption;
|
|
20
|
+
};
|
|
14
21
|
name: string;
|
|
15
22
|
roles: Role[];
|
|
16
23
|
dependencies: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Twake Drive plugin options, see `docs/plugin-development/options.md`.
|
|
3
|
+
*/
|
|
4
|
+
import type { Config } from '../../config/args';
|
|
5
|
+
import { type OptionsOf } from '../../config/options';
|
|
6
|
+
export declare const driveOptions: {
|
|
7
|
+
twake_drive_webadmin_url: import("../../config/options").StringOption;
|
|
8
|
+
twake_drive_webadmin_token: import("../../config/options").StringOption;
|
|
9
|
+
twake_drive_concurrency: import("../../config/options").NumberOption;
|
|
10
|
+
twake_drive_domain_attribute: import("../../config/options").StringOption;
|
|
11
|
+
twake_drive_default_domain_template: import("../../config/options").StringOption;
|
|
12
|
+
};
|
|
13
|
+
export type DriveOptions = OptionsOf<typeof driveOptions>;
|
|
14
|
+
/** The checked values for a caller that holds a Config instead of the plugin */
|
|
15
|
+
export declare function driveOptionsOf(config: Config): DriveOptions;
|
|
@@ -39,7 +39,11 @@ export declare function dnKey(dn: string): string;
|
|
|
39
39
|
export declare function parentOf(dn: string): string;
|
|
40
40
|
/**
|
|
41
41
|
* The entries one level under a DN pattern holding `{org}`, the organization
|
|
42
|
-
* captured as one RDN value:
|
|
42
|
+
* captured as one RDN value: an escaped comma stays inside it.
|
|
43
|
+
*
|
|
44
|
+
* A backslash and the character it escapes are read as one, and a comma ends
|
|
45
|
+
* the value, so each character of the value is followed one way whatever
|
|
46
|
+
* the DN holds.
|
|
43
47
|
*/
|
|
44
48
|
export declare function branchPattern(base: string): RegExp;
|
|
45
49
|
/**
|
|
@@ -49,7 +53,31 @@ export declare function branchPattern(base: string): RegExp;
|
|
|
49
53
|
export declare function movedInto(pattern: RegExp, dn: string, newDn: string): string | undefined;
|
|
50
54
|
/** The organization of an entry one level under a branch pattern. */
|
|
51
55
|
export declare function organizationIn(pattern: RegExp, dn: string): string | undefined;
|
|
56
|
+
export declare const TwakeOrganizationParams: import("@sinclair/typebox").TObject<{
|
|
57
|
+
id: import("@sinclair/typebox").TString;
|
|
58
|
+
}>;
|
|
59
|
+
export declare const OrganizationGroupParams: import("@sinclair/typebox").TObject<{
|
|
60
|
+
id: import("@sinclair/typebox").TString;
|
|
61
|
+
groupId: import("@sinclair/typebox").TString;
|
|
62
|
+
}>;
|
|
63
|
+
export declare const OrganizationGroupMemberParams: import("@sinclair/typebox").TObject<{
|
|
64
|
+
id: import("@sinclair/typebox").TString;
|
|
65
|
+
groupId: import("@sinclair/typebox").TString;
|
|
66
|
+
userId: import("@sinclair/typebox").TString;
|
|
67
|
+
}>;
|
|
52
68
|
export default class TwakeGroups extends LdapGroups {
|
|
69
|
+
static optionDefinitions: {
|
|
70
|
+
twake_group_base: import("../../config/options").StringOption;
|
|
71
|
+
twake_group_user_base: import("../../config/options").StringOption;
|
|
72
|
+
twake_group_organization_dn: import("../../config/options").StringOption;
|
|
73
|
+
twake_group_organization_status_attribute: import("../../config/options").StringOption;
|
|
74
|
+
twake_group_organization_deleted_value: import("../../config/options").StringOption;
|
|
75
|
+
twake_group_display_name_attribute: import("../../config/options").StringOption;
|
|
76
|
+
twake_group_color_attribute: import("../../config/options").StringOption;
|
|
77
|
+
twake_group_created_at_attribute: import("../../config/options").StringOption;
|
|
78
|
+
twake_group_max_page_limit: import("../../config/options").NumberOption;
|
|
79
|
+
twake_group_member_fields: import("../../config/options").JsonOption<{}>;
|
|
80
|
+
};
|
|
53
81
|
name: string;
|
|
54
82
|
protected readonly groupBase: string;
|
|
55
83
|
protected readonly userBase: string;
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module plugins/twake/instances
|
|
3
|
-
*
|
|
4
|
-
* Gives every account this server creates its workplace instance, once its
|
|
5
|
-
* entry is written, from the Cloudery or from the cozy-stack admin API. The
|
|
6
|
-
* address is written once the instance exists, then `user.created` is
|
|
7
|
-
* published and the entry marked. The event is sent at least once.
|
|
8
|
-
*
|
|
9
|
-
* See `docs/usage/plugins/integrations/instances.md`.
|
|
10
|
-
*/
|
|
11
1
|
import type { Express, Request } from 'express';
|
|
12
2
|
import DmPlugin, { type Role } from '../../abstract/plugin';
|
|
13
3
|
import type { DM } from '../../bin';
|
|
@@ -23,12 +13,55 @@ export interface WorkplaceCreated {
|
|
|
23
13
|
interface Account extends InstanceRequest {
|
|
24
14
|
twakeId: string;
|
|
25
15
|
}
|
|
16
|
+
export declare const EnsureInstanceBody: import("@sinclair/typebox").TObject<{
|
|
17
|
+
dn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
18
|
+
mail: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const EnsureInstanceResponse: import("@sinclair/typebox").TObject<{
|
|
21
|
+
state: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ready">, import("@sinclair/typebox").TLiteral<"pending">]>;
|
|
22
|
+
}>;
|
|
26
23
|
export default class TwakeInstances extends DmPlugin {
|
|
24
|
+
static optionDefinitions: {
|
|
25
|
+
twake_instance_dn: import("../../config/options").ArrayOption;
|
|
26
|
+
twake_instance_skip_attribute: import("../../config/options").StringOption;
|
|
27
|
+
twake_instance_skip_value: import("../../config/options").StringOption;
|
|
28
|
+
twake_instance_provider: import("../../config/options").StringOption;
|
|
29
|
+
twake_instance_id: import("../../config/options").StringOption;
|
|
30
|
+
twake_instance_fqdn_attribute: import("../../config/options").StringOption;
|
|
31
|
+
twake_instance_sent_attribute: import("../../config/options").StringOption;
|
|
32
|
+
twake_instance_locale: import("../../config/options").StringOption;
|
|
33
|
+
twake_instance_timeout: import("../../config/options").NumberOption;
|
|
34
|
+
twake_instance_cloudery_url: import("../../config/options").StringOption;
|
|
35
|
+
twake_instance_cloudery_token: import("../../config/options").StringOption;
|
|
36
|
+
twake_instance_cloudery_offer: import("../../config/options").StringOption;
|
|
37
|
+
twake_instance_cloudery_domain: import("../../config/options").StringOption;
|
|
38
|
+
twake_instance_cloudery_organization_offer: import("../../config/options").StringOption;
|
|
39
|
+
twake_instance_cozy_url: import("../../config/options").StringOption;
|
|
40
|
+
twake_instance_cozy_user: import("../../config/options").StringOption;
|
|
41
|
+
twake_instance_cozy_passphrase: import("../../config/options").StringOption;
|
|
42
|
+
twake_instance_cozy_domain: import("../../config/options").StringOption;
|
|
43
|
+
twake_instance_cozy_context: import("../../config/options").StringOption;
|
|
44
|
+
twake_instance_cozy_apps: import("../../config/options").StringOption;
|
|
45
|
+
twake_instance_cozy_org_id: import("../../config/options").StringOption;
|
|
46
|
+
twake_instance_cozy_org_domain: import("../../config/options").StringOption;
|
|
47
|
+
twake_instance_auth_exchange: import("../../config/options").StringOption;
|
|
48
|
+
twake_instance_b2b_exchange: import("../../config/options").StringOption;
|
|
49
|
+
twake_instance_user_created_key: import("../../config/options").StringOption;
|
|
50
|
+
twake_instance_organization_created_key: import("../../config/options").StringOption;
|
|
51
|
+
twake_instance_workplace_created_key: import("../../config/options").StringOption;
|
|
52
|
+
twake_instance_queue: import("../../config/options").StringOption;
|
|
53
|
+
twake_instance_organization_base: import("../../config/options").StringOption;
|
|
54
|
+
twake_instance_organization_id_attribute: import("../../config/options").StringOption;
|
|
55
|
+
twake_instance_organization_domain_attribute: import("../../config/options").StringOption;
|
|
56
|
+
twake_instance_organization_name_attribute: import("../../config/options").StringOption;
|
|
57
|
+
twake_instance_organization_fqdn_attribute: import("../../config/options").StringOption;
|
|
58
|
+
};
|
|
27
59
|
name: string;
|
|
28
60
|
roles: Role[];
|
|
29
61
|
dependencies: {
|
|
30
62
|
rabbitmq: string;
|
|
31
63
|
};
|
|
64
|
+
private readonly settings;
|
|
32
65
|
protected readonly patterns: RegExp[];
|
|
33
66
|
protected readonly provider: InstanceProvider;
|
|
34
67
|
protected readonly fqdnAttribute: string;
|