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.
- package/dist/abstract/ldapFlat.js +1 -1
- package/dist/lib/authz/base.js +1 -1
- package/dist/lib/entitySchema/validator.js +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/plugins/auth/auth.options.js +1 -1
- package/dist/plugins/auth/authzDynamic.js +1 -1
- package/dist/plugins/auth/openidconnect.js +1 -1
- package/dist/plugins/auth/trustedProxy.js +1 -1
- package/dist/plugins/ldap/departmentSync.js +1 -1
- package/dist/plugins/ldap/organizations.js +1 -1
- package/dist/plugins/scim/baseResolver.js +1 -1
- package/dist/src/abstract/ldapFlat.d.ts +6 -6
- package/dist/src/abstract/plugin.d.ts +11 -11
- package/dist/src/abstract/twakePlugin.d.ts +4 -4
- package/dist/src/bin/index.d.ts +10 -10
- package/dist/src/browser/ldap-browser/LdapBrowser.d.ts +1 -1
- package/dist/src/browser/ldap-browser/api/RawApiClient.d.ts +1 -1
- package/dist/src/browser/ldap-browser/components/EntryTree.d.ts +2 -2
- package/dist/src/browser/ldap-browser/components/EntryView.d.ts +2 -2
- package/dist/src/browser/ldap-browser/index.d.ts +4 -5
- package/dist/src/browser/ldap-browser/schema.d.ts +1 -1
- package/dist/src/browser/ldap-group-editor/LdapGroupEditor.d.ts +2 -2
- package/dist/src/browser/ldap-group-editor/api/GroupApiClient.d.ts +1 -1
- package/dist/src/browser/ldap-group-editor/components/CreateGroupModal.d.ts +2 -2
- package/dist/src/browser/ldap-group-editor/components/GroupPropertyEditor.d.ts +1 -1
- package/dist/src/browser/ldap-group-editor/components/MoveGroupModal.d.ts +1 -1
- package/dist/src/browser/ldap-group-editor/types.d.ts +1 -1
- package/dist/src/browser/ldap-resource-editor/api/ResourceApiClient.d.ts +2 -2
- package/dist/src/browser/ldap-resource-editor/index.d.ts +2 -2
- package/dist/src/browser/ldap-resource-editor/types.d.ts +1 -1
- package/dist/src/browser/ldap-tree-viewer/LdapTreeViewer.d.ts +1 -1
- package/dist/src/browser/ldap-tree-viewer/components/TreeNode.d.ts +2 -2
- package/dist/src/browser/ldap-tree-viewer/components/TreeRoot.d.ts +2 -2
- package/dist/src/browser/ldap-tree-viewer/index.d.ts +2 -3
- package/dist/src/browser/ldap-tree-viewer/store/actions.d.ts +2 -2
- package/dist/src/browser/ldap-tree-viewer/store/reducers.d.ts +2 -2
- package/dist/src/browser/ldap-unit-editor/LdapUnitEditor.d.ts +1 -1
- package/dist/src/browser/ldap-unit-editor/api/UnitApiClient.d.ts +1 -1
- package/dist/src/browser/ldap-unit-editor/components/MoveUnitModal.d.ts +1 -1
- package/dist/src/browser/ldap-unit-editor/components/UnitPropertyEditor.d.ts +1 -1
- package/dist/src/browser/ldap-unit-editor/types.d.ts +1 -1
- package/dist/src/browser/ldap-user-editor/LdapUserEditor.d.ts +2 -2
- package/dist/src/browser/ldap-user-editor/api/UserApiClient.d.ts +2 -2
- package/dist/src/browser/ldap-user-editor/components/MoveUserModal.d.ts +1 -1
- package/dist/src/browser/ldap-user-editor/components/PointerField.d.ts +2 -2
- package/dist/src/browser/ldap-user-editor/components/UserEditor.d.ts +1 -1
- package/dist/src/browser/ldap-user-editor/components/UserList.d.ts +1 -1
- package/dist/src/browser/ldap-user-editor/components/UserTree.d.ts +1 -1
- package/dist/src/browser/ldap-user-editor/index.d.ts +2 -3
- package/dist/src/browser/ldap-user-editor/types.d.ts +1 -1
- package/dist/src/browser/shared/components/Modal.d.ts +1 -1
- package/dist/src/browser/shared/index.d.ts +7 -7
- package/dist/src/browser/shared/utils/form.d.ts +1 -1
- package/dist/src/browser/shared/utils/schema.d.ts +1 -1
- package/dist/src/config/args.d.ts +3 -3
- package/dist/src/config/options.d.ts +2 -2
- package/dist/src/config/schema.d.ts +1 -1
- package/dist/src/hooks.d.ts +5 -5
- package/dist/src/lib/auth/base.d.ts +2 -2
- package/dist/src/lib/authz/base.d.ts +15 -20
- package/dist/src/lib/authz/composition.d.ts +4 -4
- package/dist/src/lib/entitySchema/validator.d.ts +23 -2
- package/dist/src/lib/expressFormatedResponses.d.ts +1 -1
- package/dist/src/lib/health.d.ts +1 -1
- package/dist/src/lib/hookBus.d.ts +1 -1
- package/dist/src/lib/ldap/schema.d.ts +2 -2
- package/dist/src/lib/ldapActions.d.ts +5 -5
- package/dist/src/lib/mailDomains.d.ts +1 -1
- package/dist/src/lib/parseConfig.d.ts +1 -1
- package/dist/src/lib/schemaFile.d.ts +1 -1
- package/dist/src/lib/staticFiles.d.ts +1 -1
- package/dist/src/lib/storage/store.d.ts +1 -1
- package/dist/src/lib/utils.d.ts +3 -3
- package/dist/src/logger/winston.d.ts +1 -1
- package/dist/src/plugins/auth/auth.options.d.ts +39 -38
- package/dist/src/plugins/auth/authzDynamic.d.ts +24 -11
- package/dist/src/plugins/auth/authzLinid1.d.ts +7 -7
- package/dist/src/plugins/auth/authzPerBranch.d.ts +8 -8
- package/dist/src/plugins/auth/authzPerRoute.d.ts +2 -2
- package/dist/src/plugins/auth/authzScope.d.ts +1 -1
- package/dist/src/plugins/auth/crowdsec.d.ts +4 -4
- package/dist/src/plugins/auth/fake.d.ts +3 -3
- package/dist/src/plugins/auth/hmac.d.ts +4 -4
- package/dist/src/plugins/auth/llng.d.ts +20 -5
- package/dist/src/plugins/auth/openidconnect.d.ts +29 -8
- package/dist/src/plugins/auth/rateLimit.d.ts +3 -3
- package/dist/src/plugins/auth/token.d.ts +3 -3
- package/dist/src/plugins/auth/totp.d.ts +5 -5
- package/dist/src/plugins/auth/trustedProxy.d.ts +16 -32
- package/dist/src/plugins/bcl.d.ts +4 -4
- package/dist/src/plugins/bcl.options.d.ts +3 -3
- package/dist/src/plugins/configApi.d.ts +1 -1
- package/dist/src/plugins/demo/helloworld.d.ts +1 -1
- package/dist/src/plugins/ldap/accountLifecycle.d.ts +1 -1
- package/dist/src/plugins/ldap/bulkImport.d.ts +5 -5
- package/dist/src/plugins/ldap/departmentSync.d.ts +14 -3
- package/dist/src/plugins/ldap/enterpriseRules.d.ts +7 -7
- package/dist/src/plugins/ldap/externalUsersInGroups.d.ts +6 -6
- package/dist/src/plugins/ldap/flatGeneric.d.ts +6 -6
- package/dist/src/plugins/ldap/groups.d.ts +8 -8
- package/dist/src/plugins/ldap/ldap.options.d.ts +45 -45
- package/dist/src/plugins/ldap/onChange.d.ts +4 -4
- package/dist/src/plugins/ldap/organization.d.ts +1 -1
- package/dist/src/plugins/ldap/organizations.d.ts +12 -12
- package/dist/src/plugins/ldap/passwordPolicy.d.ts +11 -11
- package/dist/src/plugins/ldap/raw.d.ts +8 -8
- package/dist/src/plugins/ldap/trash.d.ts +6 -6
- package/dist/src/plugins/metrics.d.ts +3 -3
- package/dist/src/plugins/metrics.options.d.ts +3 -3
- package/dist/src/plugins/rabbitmq.d.ts +4 -4
- package/dist/src/plugins/rabbitmq.options.d.ts +3 -3
- package/dist/src/plugins/scim/baseResolver.d.ts +3 -3
- package/dist/src/plugins/scim/bulk.d.ts +7 -7
- package/dist/src/plugins/scim/discovery.d.ts +4 -4
- package/dist/src/plugins/scim/errors.d.ts +3 -3
- package/dist/src/plugins/scim/filter.d.ts +1 -1
- package/dist/src/plugins/scim/groups.d.ts +8 -8
- package/dist/src/plugins/scim/list.d.ts +1 -1
- package/dist/src/plugins/scim/mapping.d.ts +2 -2
- package/dist/src/plugins/scim/patch.d.ts +2 -2
- package/dist/src/plugins/scim/scim.d.ts +30 -30
- package/dist/src/plugins/scim/scim.options.d.ts +27 -27
- package/dist/src/plugins/scim/users.d.ts +6 -6
- package/dist/src/plugins/static.d.ts +6 -6
- package/dist/src/plugins/static.options.d.ts +6 -6
- package/dist/src/plugins/storage/file.d.ts +2 -2
- package/dist/src/plugins/storage/ldap.d.ts +2 -2
- package/dist/src/plugins/storage/postgres.d.ts +2 -2
- package/dist/src/plugins/storage/valkey.d.ts +2 -2
- package/dist/src/plugins/storage.d.ts +13 -13
- package/dist/src/plugins/storage.options.d.ts +11 -11
- package/dist/src/plugins/twake/appAccounts.options.d.ts +6 -6
- package/dist/src/plugins/twake/appAccountsApi.d.ts +7 -7
- package/dist/src/plugins/twake/appAccountsConsistency.d.ts +9 -9
- package/dist/src/plugins/twake/calendar.d.ts +14 -14
- package/dist/src/plugins/twake/calendar.options.d.ts +11 -11
- package/dist/src/plugins/twake/calendarResources.d.ts +1 -1
- package/dist/src/plugins/twake/cloudery.options.d.ts +18 -18
- package/dist/src/plugins/twake/clouderyProvision.d.ts +19 -19
- package/dist/src/plugins/twake/cozy.options.d.ts +14 -14
- package/dist/src/plugins/twake/cozyProvision.d.ts +15 -15
- package/dist/src/plugins/twake/drive.d.ts +9 -9
- package/dist/src/plugins/twake/drive.options.d.ts +7 -7
- package/dist/src/plugins/twake/groups.d.ts +16 -16
- package/dist/src/plugins/twake/instances.d.ts +38 -38
- package/dist/src/plugins/twake/james.d.ts +18 -18
- package/dist/src/plugins/twake/james.options.d.ts +13 -13
- package/dist/src/plugins/twake/lifecycleAttributes.d.ts +2 -2
- package/dist/src/plugins/twake/lifecycleEvents.d.ts +13 -13
- package/dist/src/plugins/twake/migrationProxy.d.ts +11 -11
- package/dist/src/plugins/twake/migrationProxy.options.d.ts +8 -8
- package/dist/src/plugins/twake/spaces.d.ts +12 -12
- package/dist/src/plugins/twake/tombstone.d.ts +10 -10
- package/dist/src/plugins/twake/twakeGroups.options.d.ts +12 -12
- package/dist/src/plugins/twake/twakeInstances.options.d.ts +35 -35
- package/dist/src/plugins/twake/twakeLifecycle.options.d.ts +12 -12
- package/dist/src/plugins/twake/twakeSpaces.options.d.ts +11 -11
- package/dist/src/plugins/twake/twakeTombstone.options.d.ts +9 -9
- package/dist/src/plugins/weblogs.d.ts +1 -1
- package/docs/client-development/schemas/README.md +6 -1
- package/docs/development/contracts.md +22 -0
- package/docs/presentations/en.md +1 -1
- package/docs/presentations/fr.md +1 -1
- package/docs/usage/configuration.md +1 -0
- package/docs/usage/plugins/auth/authz-dynamic.md +3 -1
- package/docs/usage/plugins/auth/authz-linid1.md +10 -5
- package/docs/usage/plugins/auth/oidc.md +11 -0
- package/docs/usage/plugins/auth/trusted-proxy.md +11 -1
- package/docs/usage/upgrading.md +61 -0
- package/package.json +4 -3
- package/static/browser/ldap-user-editor.esm.js.map +1 -1
- package/static/browser/ldap-user-editor.js.map +1 -1
- package/static/browser/ldap-user-editor.min.js.map +1 -1
- package/static/browser/shared/utils/schema.js.map +1 -1
- package/static/browser/shared.esm.js.map +1 -1
- package/static/browser/shared.js.map +1 -1
- package/static/browser/shared.min.js.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AttributesList, AttributeValue, ModifyRequest } from '../ldapActions';
|
|
2
|
-
import type { Schema } from '../../config/schema';
|
|
1
|
+
import type { AttributesList, AttributeValue, ModifyRequest } from '../ldapActions.js';
|
|
2
|
+
import type { Schema } from '../../config/schema.js';
|
|
3
3
|
export interface EntityValidatorDeps {
|
|
4
4
|
/**
|
|
5
5
|
* Tells whether a DN names an entry. Asked as the server: a reference to
|
|
@@ -72,6 +72,27 @@ export declare class EntityValidator {
|
|
|
72
72
|
* option, the only one a write takes, written as the directory writes it.
|
|
73
73
|
*/
|
|
74
74
|
private schemaSpelling;
|
|
75
|
+
/**
|
|
76
|
+
* Refuse a fixed attribute a creation carries under an option. The schema
|
|
77
|
+
* forces its value under the attribute's own name, which leaves a subtype
|
|
78
|
+
* such as `l;lang-fr` as a second value of an attribute that cannot be
|
|
79
|
+
* changed. An alias or an OID (`localityName`, `2.5.4.7`) names the same
|
|
80
|
+
* attribute. A fixed attribute without a default is set at creation, so it
|
|
81
|
+
* keeps its options.
|
|
82
|
+
*
|
|
83
|
+
* @param values entry about to be created
|
|
84
|
+
* @throws BadRequestError for a fixed attribute with a default under an
|
|
85
|
+
* option
|
|
86
|
+
*/
|
|
87
|
+
private refuseFixedOptions;
|
|
88
|
+
/**
|
|
89
|
+
* The schema's definition of the attribute a name holds, through the
|
|
90
|
+
* schema's own key, an alias or an OID.
|
|
91
|
+
*
|
|
92
|
+
* @param field attribute name, option included
|
|
93
|
+
* @returns the definition, or undefined when the schema does not declare it
|
|
94
|
+
*/
|
|
95
|
+
private declaredAttribute;
|
|
75
96
|
/**
|
|
76
97
|
* Drop, in place, the keys a creation or an `add` carries with `null` or
|
|
77
98
|
* `undefined` under a name the schema does not declare. A declared
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Request, Response } from 'express';
|
|
2
2
|
import type winston from 'winston';
|
|
3
|
-
import { type Refusal } from './errors';
|
|
3
|
+
import { type Refusal } from './errors.js';
|
|
4
4
|
/**
|
|
5
5
|
* Install the logger, or remove it: a test restores the state it found,
|
|
6
6
|
* which before any `DM` is none.
|
package/dist/src/lib/health.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Express } from 'express';
|
|
2
|
-
import type { MaybePromise } from '../hooks';
|
|
2
|
+
import type { MaybePromise } from '../hooks.js';
|
|
3
3
|
/** What a plugin answers about the resources it depends on */
|
|
4
4
|
export type HealthStatus = 'ok' | 'degraded';
|
|
5
5
|
/** The paths of the two probes, served before authentication */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @see docs/plugin-development/hooks.md
|
|
11
11
|
*/
|
|
12
|
-
import type { Hooks } from '../hooks';
|
|
12
|
+
import type { Hooks } from '../hooks.js';
|
|
13
13
|
export type HookFn = Function;
|
|
14
14
|
/** A promise, or the value itself */
|
|
15
15
|
type Settled<T> = T extends Promise<infer P> ? P : T;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* write needs.
|
|
5
5
|
*/
|
|
6
6
|
import type { SearchOptions, SearchResult } from 'ldapts';
|
|
7
|
-
import type { AttributesList, ModifyRequest } from '../ldapActions';
|
|
8
|
-
import { SchemaIndex } from '../ldapSchema';
|
|
7
|
+
import type { AttributesList, ModifyRequest } from '../ldapActions.js';
|
|
8
|
+
import { SchemaIndex } from '../ldapSchema.js';
|
|
9
9
|
export interface SchemaLogger {
|
|
10
10
|
info(message: string): void;
|
|
11
11
|
warn(message: string): void;
|
|
@@ -6,11 +6,11 @@ import type { Request } from 'express';
|
|
|
6
6
|
import type { SearchResult, SearchOptions } from 'ldapts';
|
|
7
7
|
import type winston from 'winston';
|
|
8
8
|
import pLimit from 'p-limit';
|
|
9
|
-
import { type Config } from '../config/args';
|
|
10
|
-
import { type DM } from '../bin';
|
|
11
|
-
import type { Hooks } from '../hooks';
|
|
12
|
-
import { type ChangeContext } from './changeContext';
|
|
13
|
-
import type { SchemaIndex } from './ldapSchema';
|
|
9
|
+
import { type Config } from '../config/args.js';
|
|
10
|
+
import { type DM } from '../bin/index.js';
|
|
11
|
+
import type { Hooks } from '../hooks.js';
|
|
12
|
+
import { type ChangeContext } from './changeContext.js';
|
|
13
|
+
import type { SchemaIndex } from './ldapSchema.js';
|
|
14
14
|
export type AttributeValue = Buffer | Buffer[] | string[] | string;
|
|
15
15
|
export type AttributesList = Record<string, AttributeValue>;
|
|
16
16
|
export type LdapList = Record<string, AttributesList>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* each naming its domain in an attribute.
|
|
7
7
|
* @group Libraries
|
|
8
8
|
*/
|
|
9
|
-
import type { DM } from '../bin';
|
|
9
|
+
import type { DM } from '../bin/index.js';
|
|
10
10
|
/** Where mail domain entries live, and the attribute naming their domain */
|
|
11
11
|
export interface DomainBranch {
|
|
12
12
|
base: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Order: default < env < cli
|
|
4
4
|
* @author Xavier Guimard <xguimard@linagora.com>
|
|
5
5
|
*/
|
|
6
|
-
import type { Config } from '../config/args';
|
|
6
|
+
import type { Config } from '../config/args.js';
|
|
7
7
|
export type ConfigTemplate = ConfigEntry[];
|
|
8
8
|
export type ArrayKind = 'identifiers' | 'dns' | 'phrases';
|
|
9
9
|
export type ConfigEntry = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Config } from '../bin';
|
|
1
|
+
import type { Config } from '../bin/index.js';
|
|
2
2
|
/** Directory of the schemas shipped with LDAP-Rest, whatever --schemas-path says */
|
|
3
3
|
export declare const shippedSchemasPath: string;
|
|
4
4
|
/** Prefix of an `extends` naming a shipped schema, as `ldap-rest:twake/users.json` */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* announce it
|
|
4
4
|
* @module lib/staticFiles
|
|
5
5
|
*/
|
|
6
|
-
import type { DM } from '../bin';
|
|
6
|
+
import type { DM } from '../bin/index.js';
|
|
7
7
|
/** A static plugin, as another plugin asks it where it serves a file */
|
|
8
8
|
export interface StaticFiles {
|
|
9
9
|
schemaUrlOf(file: string): string | undefined;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* @group Libraries
|
|
27
27
|
*/
|
|
28
28
|
import type winston from 'winston';
|
|
29
|
-
import type { HealthStatus } from '../health';
|
|
29
|
+
import type { HealthStatus } from '../health.js';
|
|
30
30
|
/** What a backend keeps: a value, and when it stops counting. */
|
|
31
31
|
export interface StoredRecord {
|
|
32
32
|
value: string;
|
package/dist/src/lib/utils.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @author Xavier Guimard <xguimard@linagora.com>
|
|
4
4
|
*/
|
|
5
5
|
import type { Request, Response, NextFunction, RequestHandler } from 'express';
|
|
6
|
-
import type { Config } from '../bin';
|
|
7
|
-
import type { AttributeValue } from './ldapActions';
|
|
6
|
+
import type { Config } from '../bin/index.js';
|
|
7
|
+
import type { AttributeValue } from './ldapActions.js';
|
|
8
8
|
/**
|
|
9
9
|
* Get a compiled RegExp from cache, or compile and cache it
|
|
10
10
|
* This avoids recompiling the same regex patterns repeatedly
|
|
@@ -22,7 +22,7 @@ export declare function getCompiledRegex(pattern: string, flags?: string): RegEx
|
|
|
22
22
|
* @returns The escaped string safe for use in RegExp
|
|
23
23
|
*/
|
|
24
24
|
export declare function escapeRegex(str: string): string;
|
|
25
|
-
export { hookOwner, recordHookOwner, runAsHookOwner } from './hookBus';
|
|
25
|
+
export { hookOwner, recordHookOwner, runAsHookOwner } from './hookBus.js';
|
|
26
26
|
export declare const transformSchemas: (schemas: string | Buffer, config: Config) => string;
|
|
27
27
|
/**
|
|
28
28
|
* Escape special characters in LDAP filter values according to RFC 4515
|
|
@@ -2,81 +2,82 @@
|
|
|
2
2
|
* Authentication and authorization plugin options, see
|
|
3
3
|
* `docs/plugin-development/options.md`.
|
|
4
4
|
*/
|
|
5
|
-
import type { AuthConfig, Config } from '../../config/args';
|
|
6
|
-
import { type OptionsOf } from '../../config/options';
|
|
5
|
+
import type { AuthConfig, Config } from '../../config/args.js';
|
|
6
|
+
import { type OptionsOf } from '../../config/options.js';
|
|
7
7
|
export declare const tokenOptions: {
|
|
8
|
-
auth_token: import("../../config/options").ArrayOption;
|
|
8
|
+
auth_token: import("../../config/options.js").ArrayOption;
|
|
9
9
|
};
|
|
10
10
|
export type TokenOptions = OptionsOf<typeof tokenOptions>;
|
|
11
11
|
export declare const fakeOptions: {
|
|
12
|
-
auth_fake_user: import("../../config/options").StringOption;
|
|
12
|
+
auth_fake_user: import("../../config/options.js").StringOption;
|
|
13
13
|
};
|
|
14
14
|
export type FakeOptions = OptionsOf<typeof fakeOptions>;
|
|
15
15
|
export declare const totpOptions: {
|
|
16
|
-
auth_totp: import("../../config/options").ArrayOption;
|
|
17
|
-
auth_totp_window: import("../../config/options").NumberOption;
|
|
18
|
-
auth_totp_step: import("../../config/options").NumberOption;
|
|
16
|
+
auth_totp: import("../../config/options.js").ArrayOption;
|
|
17
|
+
auth_totp_window: import("../../config/options.js").NumberOption;
|
|
18
|
+
auth_totp_step: import("../../config/options.js").NumberOption;
|
|
19
19
|
};
|
|
20
20
|
export type TotpOptions = OptionsOf<typeof totpOptions>;
|
|
21
21
|
export declare const hmacOptions: {
|
|
22
|
-
auth_hmac: import("../../config/options").ArrayOption;
|
|
23
|
-
auth_hmac_window: import("../../config/options").NumberOption;
|
|
22
|
+
auth_hmac: import("../../config/options.js").ArrayOption;
|
|
23
|
+
auth_hmac_window: import("../../config/options.js").NumberOption;
|
|
24
24
|
};
|
|
25
25
|
export type HmacOptions = OptionsOf<typeof hmacOptions>;
|
|
26
26
|
export declare const llngOptions: {
|
|
27
|
-
llng_ini: import("../../config/options").StringOption;
|
|
28
|
-
llng_username_header: import("../../config/options").StringOption;
|
|
27
|
+
llng_ini: import("../../config/options.js").StringOption;
|
|
28
|
+
llng_username_header: import("../../config/options.js").StringOption;
|
|
29
29
|
};
|
|
30
30
|
export type LlngOptions = OptionsOf<typeof llngOptions>;
|
|
31
31
|
export declare const perRouteOptions: {
|
|
32
|
-
authz_per_route: import("../../config/options").ArrayOption;
|
|
32
|
+
authz_per_route: import("../../config/options.js").ArrayOption;
|
|
33
33
|
};
|
|
34
34
|
export type PerRouteOptions = OptionsOf<typeof perRouteOptions>;
|
|
35
35
|
export declare const perBranchOptions: {
|
|
36
|
-
authz_per_branch_config: import("../../config/options").JsonOption<AuthConfig>;
|
|
37
|
-
authz_per_branch_cache_ttl: import("../../config/options").NumberOption;
|
|
38
|
-
ldap_group_member_attribute: import("../../config/options").StringOption;
|
|
36
|
+
authz_per_branch_config: import("../../config/options.js").JsonOption<AuthConfig>;
|
|
37
|
+
authz_per_branch_cache_ttl: import("../../config/options.js").NumberOption;
|
|
38
|
+
ldap_group_member_attribute: import("../../config/options.js").StringOption;
|
|
39
39
|
};
|
|
40
40
|
export type PerBranchOptions = OptionsOf<typeof perBranchOptions>;
|
|
41
41
|
export declare const dynamicOptions: {
|
|
42
|
-
authz_dynamic_bypass: import("../../config/options").ArrayOption;
|
|
43
|
-
authz_dynamic_base: import("../../config/options").StringOption;
|
|
44
|
-
authz_dynamic_cache_ttl: import("../../config/options").NumberOption;
|
|
45
|
-
authz_dynamic_token_attribute: import("../../config/options").StringOption;
|
|
46
|
-
authz_dynamic_config_attribute: import("../../config/options").StringOption;
|
|
47
|
-
authz_dynamic_tenant_attribute: import("../../config/options").StringOption;
|
|
48
|
-
authz_dynamic_reload_endpoint: import("../../config/options").BooleanOption;
|
|
42
|
+
authz_dynamic_bypass: import("../../config/options.js").ArrayOption;
|
|
43
|
+
authz_dynamic_base: import("../../config/options.js").StringOption;
|
|
44
|
+
authz_dynamic_cache_ttl: import("../../config/options.js").NumberOption;
|
|
45
|
+
authz_dynamic_token_attribute: import("../../config/options.js").StringOption;
|
|
46
|
+
authz_dynamic_config_attribute: import("../../config/options.js").StringOption;
|
|
47
|
+
authz_dynamic_tenant_attribute: import("../../config/options.js").StringOption;
|
|
48
|
+
authz_dynamic_reload_endpoint: import("../../config/options.js").BooleanOption;
|
|
49
49
|
};
|
|
50
50
|
export type DynamicOptions = OptionsOf<typeof dynamicOptions>;
|
|
51
51
|
export declare const linid1Options: {
|
|
52
|
-
authz_local_admin_attribute: import("../../config/options").StringOption;
|
|
53
|
-
authz_global_branch: import("../../config/options").ArrayOption;
|
|
54
|
-
authz_global_write_branch: import("../../config/options").ArrayOption;
|
|
55
|
-
authz_global_organization: import("../../config/options").StringOption;
|
|
52
|
+
authz_local_admin_attribute: import("../../config/options.js").StringOption;
|
|
53
|
+
authz_global_branch: import("../../config/options.js").ArrayOption;
|
|
54
|
+
authz_global_write_branch: import("../../config/options.js").ArrayOption;
|
|
55
|
+
authz_global_organization: import("../../config/options.js").StringOption;
|
|
56
56
|
};
|
|
57
57
|
export type Linid1Options = OptionsOf<typeof linid1Options>;
|
|
58
58
|
export declare const openidconnectOptions: {
|
|
59
|
-
oidc_server: import("../../config/options").StringOption;
|
|
60
|
-
oidc_username_claim: import("../../config/options").StringOption;
|
|
61
|
-
oidc_client_id: import("../../config/options").StringOption;
|
|
62
|
-
oidc_client_secret: import("../../config/options").StringOption;
|
|
63
|
-
base_url: import("../../config/options").StringOption;
|
|
59
|
+
oidc_server: import("../../config/options.js").StringOption;
|
|
60
|
+
oidc_username_claim: import("../../config/options.js").StringOption;
|
|
61
|
+
oidc_client_id: import("../../config/options.js").StringOption;
|
|
62
|
+
oidc_client_secret: import("../../config/options.js").StringOption;
|
|
63
|
+
base_url: import("../../config/options.js").StringOption;
|
|
64
|
+
oidc_logout_origins: import("../../config/options.js").ArrayOption;
|
|
64
65
|
};
|
|
65
66
|
export type OpenidconnectOptions = OptionsOf<typeof openidconnectOptions>;
|
|
66
67
|
export declare const rateLimitOptions: {
|
|
67
|
-
rate_limit_window_ms: import("../../config/options").NumberOption;
|
|
68
|
-
rate_limit_max: import("../../config/options").NumberOption;
|
|
68
|
+
rate_limit_window_ms: import("../../config/options.js").NumberOption;
|
|
69
|
+
rate_limit_max: import("../../config/options.js").NumberOption;
|
|
69
70
|
};
|
|
70
71
|
export type RateLimitOptions = OptionsOf<typeof rateLimitOptions>;
|
|
71
72
|
export declare const crowdsecOptions: {
|
|
72
|
-
crowdsec_url: import("../../config/options").StringOption;
|
|
73
|
-
crowdsec_api_key: import("../../config/options").StringOption;
|
|
74
|
-
crowdsec_cache_ttl: import("../../config/options").NumberOption;
|
|
73
|
+
crowdsec_url: import("../../config/options.js").StringOption;
|
|
74
|
+
crowdsec_api_key: import("../../config/options.js").StringOption;
|
|
75
|
+
crowdsec_cache_ttl: import("../../config/options.js").NumberOption;
|
|
75
76
|
};
|
|
76
77
|
export type CrowdsecOptions = OptionsOf<typeof crowdsecOptions>;
|
|
77
78
|
export declare const trustedProxyOptions: {
|
|
78
|
-
trusted_proxy: import("../../config/options").ArrayOption;
|
|
79
|
-
trusted_proxy_auth_header: import("../../config/options").StringOption;
|
|
79
|
+
trusted_proxy: import("../../config/options.js").ArrayOption;
|
|
80
|
+
trusted_proxy_auth_header: import("../../config/options.js").StringOption;
|
|
80
81
|
};
|
|
81
82
|
export type TrustedProxyOptions = OptionsOf<typeof trustedProxyOptions>;
|
|
82
83
|
/** The checked values for a caller that holds a Config instead of the plugin */
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
* `ou=users,ou=acme`).
|
|
26
26
|
*/
|
|
27
27
|
import type { Express, Response } from 'express';
|
|
28
|
-
import { type Role } from '../../abstract/plugin';
|
|
29
|
-
import type { DM } from '../../bin';
|
|
30
|
-
import AuthBase, { type DmRequest } from '../../lib/auth/base';
|
|
31
|
-
import type { Hooks } from '../../hooks';
|
|
28
|
+
import { type Role } from '../../abstract/plugin.js';
|
|
29
|
+
import type { DM } from '../../bin/index.js';
|
|
30
|
+
import AuthBase, { type DmRequest } from '../../lib/auth/base.js';
|
|
31
|
+
import type { Hooks } from '../../hooks.js';
|
|
32
32
|
export interface BranchAcl {
|
|
33
33
|
dn: string;
|
|
34
34
|
read?: boolean;
|
|
@@ -52,13 +52,13 @@ export interface AuthzDynamicRequest extends DmRequest {
|
|
|
52
52
|
}
|
|
53
53
|
export default class AuthzDynamic extends AuthBase {
|
|
54
54
|
static optionDefinitions: {
|
|
55
|
-
authz_dynamic_bypass: import("../../config/options").ArrayOption;
|
|
56
|
-
authz_dynamic_base: import("../../config/options").StringOption;
|
|
57
|
-
authz_dynamic_cache_ttl: import("../../config/options").NumberOption;
|
|
58
|
-
authz_dynamic_token_attribute: import("../../config/options").StringOption;
|
|
59
|
-
authz_dynamic_config_attribute: import("../../config/options").StringOption;
|
|
60
|
-
authz_dynamic_tenant_attribute: import("../../config/options").StringOption;
|
|
61
|
-
authz_dynamic_reload_endpoint: import("../../config/options").BooleanOption;
|
|
55
|
+
authz_dynamic_bypass: import("../../config/options.js").ArrayOption;
|
|
56
|
+
authz_dynamic_base: import("../../config/options.js").StringOption;
|
|
57
|
+
authz_dynamic_cache_ttl: import("../../config/options.js").NumberOption;
|
|
58
|
+
authz_dynamic_token_attribute: import("../../config/options.js").StringOption;
|
|
59
|
+
authz_dynamic_config_attribute: import("../../config/options.js").StringOption;
|
|
60
|
+
authz_dynamic_tenant_attribute: import("../../config/options.js").StringOption;
|
|
61
|
+
authz_dynamic_reload_endpoint: import("../../config/options.js").BooleanOption;
|
|
62
62
|
};
|
|
63
63
|
name: string;
|
|
64
64
|
roles: Role[];
|
|
@@ -80,6 +80,19 @@ export default class AuthzDynamic extends AuthBase {
|
|
|
80
80
|
* does not poison the cache — the previous snapshot stays in use.
|
|
81
81
|
*/
|
|
82
82
|
reload(): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Read one ACL flag of a token's JSON.
|
|
85
|
+
*
|
|
86
|
+
* Only the boolean `true` grants the permission: every string is truthy,
|
|
87
|
+
* `"false"`, `"no"` and `"0"` included.
|
|
88
|
+
*
|
|
89
|
+
* @param value flag as the token's JSON holds it
|
|
90
|
+
* @param flag flag name, for the warning
|
|
91
|
+
* @param branch branch the flag applies to
|
|
92
|
+
* @param tokenDn DN of the token entry
|
|
93
|
+
* @returns whether the permission is granted
|
|
94
|
+
*/
|
|
95
|
+
private aclFlag;
|
|
83
96
|
/**
|
|
84
97
|
* Ensure the cache is fresh (blocks if reloading).
|
|
85
98
|
*
|
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
* Grants permissions to users referenced in organization's twakeLocalAdminLink
|
|
7
7
|
* @group Plugins
|
|
8
8
|
*/
|
|
9
|
-
import type { DM } from '../../bin';
|
|
10
|
-
import type { BranchPermissions } from '../../config/args';
|
|
11
|
-
import AuthzBase from '../../lib/authz/base';
|
|
9
|
+
import type { DM } from '../../bin/index.js';
|
|
10
|
+
import type { BranchPermissions } from '../../config/args.js';
|
|
11
|
+
import AuthzBase from '../../lib/authz/base.js';
|
|
12
12
|
interface CachedPermissions {
|
|
13
13
|
branches: Map<string, BranchPermissions>;
|
|
14
14
|
timestamp: number;
|
|
15
15
|
}
|
|
16
16
|
export default class AuthzLinid1 extends AuthzBase {
|
|
17
17
|
static optionDefinitions: {
|
|
18
|
-
authz_local_admin_attribute: import("../../config/options").StringOption;
|
|
19
|
-
authz_global_branch: import("../../config/options").ArrayOption;
|
|
20
|
-
authz_global_write_branch: import("../../config/options").ArrayOption;
|
|
21
|
-
authz_global_organization: import("../../config/options").StringOption;
|
|
18
|
+
authz_local_admin_attribute: import("../../config/options.js").StringOption;
|
|
19
|
+
authz_global_branch: import("../../config/options.js").ArrayOption;
|
|
20
|
+
authz_global_write_branch: import("../../config/options.js").ArrayOption;
|
|
21
|
+
authz_global_organization: import("../../config/options.js").StringOption;
|
|
22
22
|
};
|
|
23
23
|
name: string;
|
|
24
24
|
permissionsCache: Map<string, CachedPermissions>;
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
* Supports user and group-based permissions with configurable defaults
|
|
7
7
|
* @group Plugins
|
|
8
8
|
*/
|
|
9
|
-
import type { DM } from '../../bin';
|
|
10
|
-
import type { Hooks } from '../../hooks';
|
|
11
|
-
import type { AuthConfig, BranchPermissions } from '../../config/args';
|
|
12
|
-
import type { DmRequest } from '../../lib/auth/base';
|
|
13
|
-
import AuthzBase from '../../lib/authz/base';
|
|
9
|
+
import type { DM } from '../../bin/index.js';
|
|
10
|
+
import type { Hooks } from '../../hooks.js';
|
|
11
|
+
import type { AuthConfig, BranchPermissions } from '../../config/args.js';
|
|
12
|
+
import type { DmRequest } from '../../lib/auth/base.js';
|
|
13
|
+
import AuthzBase from '../../lib/authz/base.js';
|
|
14
14
|
interface CachedGroups {
|
|
15
15
|
groups: string[];
|
|
16
16
|
timestamp: number;
|
|
17
17
|
}
|
|
18
18
|
export default class AuthzPerBranch extends AuthzBase {
|
|
19
19
|
static optionDefinitions: {
|
|
20
|
-
authz_per_branch_config: import("../../config/options").JsonOption<AuthConfig>;
|
|
21
|
-
authz_per_branch_cache_ttl: import("../../config/options").NumberOption;
|
|
22
|
-
ldap_group_member_attribute: import("../../config/options").StringOption;
|
|
20
|
+
authz_per_branch_config: import("../../config/options.js").JsonOption<AuthConfig>;
|
|
21
|
+
authz_per_branch_cache_ttl: import("../../config/options.js").NumberOption;
|
|
22
|
+
ldap_group_member_attribute: import("../../config/options.js").StringOption;
|
|
23
23
|
};
|
|
24
24
|
name: string;
|
|
25
25
|
authConfig?: AuthConfig;
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* @author Xavier Guimard <xguimard@linagora.com>
|
|
9
9
|
*/
|
|
10
10
|
import type { Express } from 'express';
|
|
11
|
-
import DmPlugin, { type Role } from '../../abstract/plugin';
|
|
11
|
+
import DmPlugin, { type Role } from '../../abstract/plugin.js';
|
|
12
12
|
export declare function globToRegex(glob: string): RegExp;
|
|
13
13
|
export default class AuthzPerRoute extends DmPlugin {
|
|
14
14
|
static optionDefinitions: {
|
|
15
|
-
authz_per_route: import("../../config/options").ArrayOption;
|
|
15
|
+
authz_per_route: import("../../config/options.js").ArrayOption;
|
|
16
16
|
};
|
|
17
17
|
name: string;
|
|
18
18
|
roles: Role[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Express } from 'express';
|
|
2
|
-
import DmPlugin, { type Role } from '../../abstract/plugin';
|
|
2
|
+
import DmPlugin, { type Role } from '../../abstract/plugin.js';
|
|
3
3
|
export declare const ScopeResponse: import("@sinclair/typebox").TObject<{
|
|
4
4
|
user: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
5
5
|
unrestricted: import("@sinclair/typebox").TBoolean;
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
* @author Xavier Guimard <xguimard@linagora.com>
|
|
15
15
|
*/
|
|
16
16
|
import type { Express } from 'express';
|
|
17
|
-
import DmPlugin, { Role } from '../../abstract/plugin';
|
|
17
|
+
import DmPlugin, { Role } from '../../abstract/plugin.js';
|
|
18
18
|
export default class CrowdSec extends DmPlugin {
|
|
19
19
|
static optionDefinitions: {
|
|
20
|
-
crowdsec_url: import("../../config/options").StringOption;
|
|
21
|
-
crowdsec_api_key: import("../../config/options").StringOption;
|
|
22
|
-
crowdsec_cache_ttl: import("../../config/options").NumberOption;
|
|
20
|
+
crowdsec_url: import("../../config/options.js").StringOption;
|
|
21
|
+
crowdsec_api_key: import("../../config/options.js").StringOption;
|
|
22
|
+
crowdsec_cache_ttl: import("../../config/options.js").NumberOption;
|
|
23
23
|
};
|
|
24
24
|
name: string;
|
|
25
25
|
roles: Role[];
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* @group Plugins
|
|
8
8
|
*/
|
|
9
9
|
import type { Response } from 'express';
|
|
10
|
-
import AuthBase, { type DmRequest } from '../../lib/auth/base';
|
|
11
|
-
import type { Role } from '../../abstract/plugin';
|
|
10
|
+
import AuthBase, { type DmRequest } from '../../lib/auth/base.js';
|
|
11
|
+
import type { Role } from '../../abstract/plugin.js';
|
|
12
12
|
export default class AuthFake extends AuthBase {
|
|
13
13
|
static optionDefinitions: {
|
|
14
|
-
auth_fake_user: import("../../config/options").StringOption;
|
|
14
|
+
auth_fake_user: import("../../config/options.js").StringOption;
|
|
15
15
|
};
|
|
16
16
|
name: string;
|
|
17
17
|
roles: Role[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Response } from 'express';
|
|
2
|
-
import AuthBase, { type DmRequest } from '../../lib/auth/base';
|
|
3
|
-
import type { Role } from '../../abstract/plugin';
|
|
2
|
+
import AuthBase, { type DmRequest } from '../../lib/auth/base.js';
|
|
3
|
+
import type { Role } from '../../abstract/plugin.js';
|
|
4
4
|
export default class AuthHmac extends AuthBase {
|
|
5
5
|
static optionDefinitions: {
|
|
6
|
-
auth_hmac: import("../../config/options").ArrayOption;
|
|
7
|
-
auth_hmac_window: import("../../config/options").NumberOption;
|
|
6
|
+
auth_hmac: import("../../config/options.js").ArrayOption;
|
|
7
|
+
auth_hmac_window: import("../../config/options.js").NumberOption;
|
|
8
8
|
};
|
|
9
9
|
protected knownIdentities(): string[];
|
|
10
10
|
protected identitySource(): string;
|
|
@@ -7,13 +7,28 @@
|
|
|
7
7
|
* This plugin enables authentication and authorization using Lemonldap::NG.
|
|
8
8
|
*/
|
|
9
9
|
import type { Express, Response } from 'express';
|
|
10
|
-
import AuthBase, { DmRequest } from '../../lib/auth/base';
|
|
11
|
-
import type { Role } from '../../abstract/plugin';
|
|
12
|
-
|
|
10
|
+
import AuthBase, { DmRequest } from '../../lib/auth/base.js';
|
|
11
|
+
import type { Role } from '../../abstract/plugin.js';
|
|
12
|
+
/**
|
|
13
|
+
* The part of `lemonldap-ng-handler` this plugin uses. The ambient
|
|
14
|
+
* declaration in src/types/lemonldap-ng-handler.d.ts gives the module the
|
|
15
|
+
* same shape for the build; this interface is what the published declaration
|
|
16
|
+
* names, so a consumer without the package still sees it.
|
|
17
|
+
*/
|
|
18
|
+
interface LlngHandler {
|
|
19
|
+
init(args: {
|
|
20
|
+
configStorage?: {
|
|
21
|
+
confFile?: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
type?: string;
|
|
25
|
+
}): Promise<unknown>;
|
|
26
|
+
run(req: DmRequest, res: Response, next: () => void): void;
|
|
27
|
+
}
|
|
13
28
|
export default class AuthLLNG extends AuthBase {
|
|
14
29
|
static optionDefinitions: {
|
|
15
|
-
llng_ini: import("../../config/options").StringOption;
|
|
16
|
-
llng_username_header: import("../../config/options").StringOption;
|
|
30
|
+
llng_ini: import("../../config/options.js").StringOption;
|
|
31
|
+
llng_username_header: import("../../config/options.js").StringOption;
|
|
17
32
|
};
|
|
18
33
|
name: string;
|
|
19
34
|
roles: Role[];
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { Express, Response } from 'express';
|
|
2
2
|
import type { ConfigParams } from 'express-openid-connect';
|
|
3
|
-
import AuthBase, { DmRequest } from '../../lib/auth/base';
|
|
4
|
-
import { type Role } from '../../abstract/plugin';
|
|
5
|
-
import { DM } from '../../bin';
|
|
3
|
+
import AuthBase, { DmRequest } from '../../lib/auth/base.js';
|
|
4
|
+
import { type Role } from '../../abstract/plugin.js';
|
|
5
|
+
import { DM } from '../../bin/index.js';
|
|
6
6
|
export default class OpenIDConnect extends AuthBase {
|
|
7
7
|
static optionDefinitions: {
|
|
8
|
-
oidc_server: import("../../config/options").StringOption;
|
|
9
|
-
oidc_username_claim: import("../../config/options").StringOption;
|
|
10
|
-
oidc_client_id: import("../../config/options").StringOption;
|
|
11
|
-
oidc_client_secret: import("../../config/options").StringOption;
|
|
12
|
-
base_url: import("../../config/options").StringOption;
|
|
8
|
+
oidc_server: import("../../config/options.js").StringOption;
|
|
9
|
+
oidc_username_claim: import("../../config/options.js").StringOption;
|
|
10
|
+
oidc_client_id: import("../../config/options.js").StringOption;
|
|
11
|
+
oidc_client_secret: import("../../config/options.js").StringOption;
|
|
12
|
+
base_url: import("../../config/options.js").StringOption;
|
|
13
|
+
oidc_logout_origins: import("../../config/options.js").ArrayOption;
|
|
13
14
|
};
|
|
14
15
|
name: string;
|
|
15
16
|
configApiKey: string;
|
|
@@ -78,6 +79,26 @@ export default class OpenIDConnect extends AuthBase {
|
|
|
78
79
|
* @param app the express application
|
|
79
80
|
*/
|
|
80
81
|
api(app: Express): void;
|
|
82
|
+
/**
|
|
83
|
+
* Origins a logout may come from: `--base-url`, and the consoles named in
|
|
84
|
+
* `--oidc-logout-origins` when they are served elsewhere.
|
|
85
|
+
*/
|
|
86
|
+
private logoutOrigins;
|
|
87
|
+
/**
|
|
88
|
+
* Whether a browser reports the request as coming from another site.
|
|
89
|
+
*
|
|
90
|
+
* `/logout` is a `GET` a link reaches, so a page on another site can end
|
|
91
|
+
* the session without a token. The origin is what tells the caller's own
|
|
92
|
+
* link apart from someone else's. `Sec-Fetch-Site` answers where a browser
|
|
93
|
+
* sends it; `Origin` and `Referer` cover the others, and name the console
|
|
94
|
+
* when it is served from another origin. A client sending none of them — a
|
|
95
|
+
* script, a server — is not a browser navigating from another site, and is
|
|
96
|
+
* let through.
|
|
97
|
+
*
|
|
98
|
+
* @param req incoming request
|
|
99
|
+
* @returns true when the request comes from another site
|
|
100
|
+
*/
|
|
101
|
+
private crossSite;
|
|
81
102
|
/**
|
|
82
103
|
* Read the session, then require one.
|
|
83
104
|
*
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* @author Xavier Guimard <xguimard@linagora.com>
|
|
14
14
|
*/
|
|
15
15
|
import type { Express } from 'express';
|
|
16
|
-
import DmPlugin, { type Role } from '../../abstract/plugin';
|
|
16
|
+
import DmPlugin, { type Role } from '../../abstract/plugin.js';
|
|
17
17
|
export default class RateLimit extends DmPlugin {
|
|
18
18
|
static optionDefinitions: {
|
|
19
|
-
rate_limit_window_ms: import("../../config/options").NumberOption;
|
|
20
|
-
rate_limit_max: import("../../config/options").NumberOption;
|
|
19
|
+
rate_limit_window_ms: import("../../config/options.js").NumberOption;
|
|
20
|
+
rate_limit_max: import("../../config/options.js").NumberOption;
|
|
21
21
|
};
|
|
22
22
|
name: string;
|
|
23
23
|
roles: Role[];
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* @group Plugins
|
|
7
7
|
*/
|
|
8
8
|
import type { Response } from 'express';
|
|
9
|
-
import AuthBase, { type DmRequest } from '../../lib/auth/base';
|
|
10
|
-
import type { Role } from '../../abstract/plugin';
|
|
9
|
+
import AuthBase, { type DmRequest } from '../../lib/auth/base.js';
|
|
10
|
+
import type { Role } from '../../abstract/plugin.js';
|
|
11
11
|
export default class AuthToken extends AuthBase {
|
|
12
12
|
static optionDefinitions: {
|
|
13
|
-
auth_token: import("../../config/options").ArrayOption;
|
|
13
|
+
auth_token: import("../../config/options.js").ArrayOption;
|
|
14
14
|
};
|
|
15
15
|
protected knownIdentities(): string[];
|
|
16
16
|
protected identitySource(): string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Response } from 'express';
|
|
2
|
-
import AuthBase, { type DmRequest } from '../../lib/auth/base';
|
|
3
|
-
import type { Role } from '../../abstract/plugin';
|
|
2
|
+
import AuthBase, { type DmRequest } from '../../lib/auth/base.js';
|
|
3
|
+
import type { Role } from '../../abstract/plugin.js';
|
|
4
4
|
export default class AuthTotp extends AuthBase {
|
|
5
5
|
static optionDefinitions: {
|
|
6
|
-
auth_totp: import("../../config/options").ArrayOption;
|
|
7
|
-
auth_totp_window: import("../../config/options").NumberOption;
|
|
8
|
-
auth_totp_step: import("../../config/options").NumberOption;
|
|
6
|
+
auth_totp: import("../../config/options.js").ArrayOption;
|
|
7
|
+
auth_totp_window: import("../../config/options.js").NumberOption;
|
|
8
|
+
auth_totp_step: import("../../config/options.js").NumberOption;
|
|
9
9
|
};
|
|
10
10
|
protected knownIdentities(): string[];
|
|
11
11
|
protected identitySource(): string;
|