@sasjs/api 0.18.0 → 0.19.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/build/browser.js +717 -18
- package/build/cjs/admin/service.js +209 -0
- package/build/cjs/authconfig/service.js +139 -0
- package/build/cjs/corpus/admin.js +101 -0
- package/build/cjs/corpus/authconfig.js +47 -0
- package/build/cjs/corpus/directory.js +31 -0
- package/build/cjs/corpus/runner.js +13 -0
- package/build/cjs/directory/service.js +116 -0
- package/build/cjs/host/dispatch.js +39 -0
- package/build/cjs/identity/memory-store.js +4 -1
- package/build/cjs/index.js +8 -2
- package/build/cjs/info/service.js +13 -8
- package/build/cjs/routes/generated.js +56 -0
- package/build/cjs/routes/overlay.js +86 -12
- package/build/esm/admin/service.d.ts +123 -0
- package/build/esm/admin/service.d.ts.map +1 -0
- package/build/esm/admin/service.js +201 -0
- package/build/esm/authconfig/service.d.ts +92 -0
- package/build/esm/authconfig/service.d.ts.map +1 -0
- package/build/esm/authconfig/service.js +134 -0
- package/build/esm/corpus/admin.d.ts +22 -0
- package/build/esm/corpus/admin.d.ts.map +1 -0
- package/build/esm/corpus/admin.js +98 -0
- package/build/esm/corpus/authconfig.d.ts +31 -0
- package/build/esm/corpus/authconfig.d.ts.map +1 -0
- package/build/esm/corpus/authconfig.js +44 -0
- package/build/esm/corpus/directory.d.ts +20 -0
- package/build/esm/corpus/directory.d.ts.map +1 -0
- package/build/esm/corpus/directory.js +28 -0
- package/build/esm/corpus/runner.d.ts.map +1 -1
- package/build/esm/corpus/runner.js +13 -0
- package/build/esm/directory/service.d.ts +71 -0
- package/build/esm/directory/service.d.ts.map +1 -0
- package/build/esm/directory/service.js +112 -0
- package/build/esm/host/dispatch.d.ts +18 -0
- package/build/esm/host/dispatch.d.ts.map +1 -1
- package/build/esm/host/dispatch.js +39 -0
- package/build/esm/identity/memory-store.d.ts.map +1 -1
- package/build/esm/identity/memory-store.js +4 -1
- package/build/esm/identity/types.d.ts +5 -0
- package/build/esm/identity/types.d.ts.map +1 -1
- package/build/esm/index.d.ts +3 -0
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +3 -0
- package/build/esm/info/service.d.ts +14 -6
- package/build/esm/info/service.d.ts.map +1 -1
- package/build/esm/info/service.js +12 -7
- package/build/esm/routes/generated.d.ts.map +1 -1
- package/build/esm/routes/generated.js +56 -0
- package/build/esm/routes/overlay.d.ts.map +1 -1
- package/build/esm/routes/overlay.js +86 -12
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The directory the corpus host answers with.
|
|
3
|
+
*
|
|
4
|
+
* One user and one group that the default identity fixture does not already
|
|
5
|
+
* hold (`admin`/`user2` and `Admins`/`DCGroup` are in it), so the case pins the
|
|
6
|
+
* counts of what an import creates rather than what it found.
|
|
7
|
+
*/
|
|
8
|
+
export const CORPUS_DIRECTORY = {
|
|
9
|
+
users: async () => [{ username: 'alice', displayName: 'Alice' }],
|
|
10
|
+
groups: async () => [{ name: 'analysts' }]
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The directory corpus.
|
|
14
|
+
*
|
|
15
|
+
* `401` and `500` are host-only - the administrator middleware and the
|
|
16
|
+
* directory's own failures - so the one documented status this package answers
|
|
17
|
+
* is `200`, carrying what it created. The import's own rules (existing accounts
|
|
18
|
+
* untouched, membership, refusals) are pinned in `spec/directory.spec`.
|
|
19
|
+
*/
|
|
20
|
+
export const DIRECTORY_CORPUS = [
|
|
21
|
+
{
|
|
22
|
+
id: 'directory-imports-the-missing-accounts',
|
|
23
|
+
route: 'POST /SASjsApi/authConfig/synchroniseWithLDAP',
|
|
24
|
+
description: 'imports the users and groups the store does not hold, and counts them',
|
|
25
|
+
request: {},
|
|
26
|
+
expect: { status: 200, body: { userCount: 1, groupCount: 1 } }
|
|
27
|
+
}
|
|
28
|
+
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/corpus/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/corpus/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAoBnD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;IAC9B,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,UAAU,KAAG,QAyClD,CAAA;AA2BD;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAClB,UAAU,UAAU,EACpB,WAAU,QAAgC,KACzC,OAAO,CAAC,UAAU,CAepB,CAAA"}
|
|
@@ -8,6 +8,12 @@ import { createSessionService } from '../session/service.js';
|
|
|
8
8
|
import { createRuntimeService } from '../runtime/service.js';
|
|
9
9
|
import { MemorySessionRunner } from '../runtime/memory-runner.js';
|
|
10
10
|
import { BROWSER_INFO, createInfoService } from '../info/service.js';
|
|
11
|
+
import { createAuthConfigService } from '../authconfig/service.js';
|
|
12
|
+
import { createAdminService } from '../admin/service.js';
|
|
13
|
+
import { createDirectoryService } from '../directory/service.js';
|
|
14
|
+
import { CORPUS_AUTH_CONFIG } from './authconfig.js';
|
|
15
|
+
import { CORPUS_DIAGNOSTICS, CORPUS_LOG, CORPUS_LOG_TAIL } from './admin.js';
|
|
16
|
+
import { CORPUS_DIRECTORY } from './directory.js';
|
|
11
17
|
import { MemoryIdentityStore } from '../identity/memory-store.js';
|
|
12
18
|
import { DEFAULT_IDENTITY } from '../identity/fixture.js';
|
|
13
19
|
import { isApiError } from '../types.js';
|
|
@@ -36,6 +42,13 @@ export const servicesFor = (testCase) => {
|
|
|
36
42
|
? new RefusingDriveStore(testCase.seed || {})
|
|
37
43
|
: new MemoryDriveStore(testCase.seed || {})),
|
|
38
44
|
info: createInfoService(BROWSER_INFO),
|
|
45
|
+
authConfig: createAuthConfigService(CORPUS_AUTH_CONFIG),
|
|
46
|
+
admin: createAdminService({
|
|
47
|
+
diagnostics: async () => CORPUS_DIAGNOSTICS,
|
|
48
|
+
logs: async () => [CORPUS_LOG],
|
|
49
|
+
logTail: async (fileName) => fileName === CORPUS_LOG.name ? CORPUS_LOG_TAIL : undefined
|
|
50
|
+
}),
|
|
51
|
+
directory: createDirectoryService(identity, CORPUS_DIRECTORY),
|
|
39
52
|
identity: createIdentityService(identity),
|
|
40
53
|
records: createRecordService(identity),
|
|
41
54
|
registry: new MemoryAppStreamRegistry(),
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The directory import: what a host's LDAP answer means for its records.
|
|
3
|
+
*
|
|
4
|
+
* `POST /SASjsApi/authConfig/synchroniseWithLDAP` asks a host to pull its
|
|
5
|
+
* directory into the accounts the API knows. The directory connection is the
|
|
6
|
+
* host's - an LDAP client, a bind, a set of base DNs - and this file cannot
|
|
7
|
+
* have one. What it owns is the import:
|
|
8
|
+
*
|
|
9
|
+
* - a user or group that already exists is left untouched, matched by the
|
|
10
|
+
* name the API keys on (`username`, group `name`), which is what the
|
|
11
|
+
* document states and what makes the call repeatable: a second run imports
|
|
12
|
+
* nothing rather than duplicating the directory;
|
|
13
|
+
* - what it creates is marked with the provider (`ldap` by default), so a
|
|
14
|
+
* host can tell a directory-managed account from a local one - including
|
|
15
|
+
* the groups, which is why `NewGroup` carries the field;
|
|
16
|
+
* - membership travels both ways in a directory answer (a group lists its
|
|
17
|
+
* members, and a user lists its groups), so both are read and the union is
|
|
18
|
+
* applied to the groups this call created. An existing group is not
|
|
19
|
+
* touched: importing is not reconciling, and a caller who expects a
|
|
20
|
+
* deprovisioning sync has asked for a different operation;
|
|
21
|
+
* - a directory answer that names the same username twice, or a user with no
|
|
22
|
+
* username, is refused rather than half-imported.
|
|
23
|
+
*
|
|
24
|
+
* sasjs/server's own implementation deletes every provider-managed account and
|
|
25
|
+
* re-imports; that is its store's policy and it is deliberately not generalised
|
|
26
|
+
* here. The document's description - "Users and groups that already exist are
|
|
27
|
+
* left untouched" - is what this service implements.
|
|
28
|
+
*/
|
|
29
|
+
import type { IdentityStore } from '../identity/types.js';
|
|
30
|
+
export interface DirectoryUser {
|
|
31
|
+
username: string;
|
|
32
|
+
displayName: string;
|
|
33
|
+
/** Groups the directory says this user belongs to, by group name. */
|
|
34
|
+
groups?: string[];
|
|
35
|
+
}
|
|
36
|
+
export interface DirectoryGroup {
|
|
37
|
+
name: string;
|
|
38
|
+
/** Members the directory says this group holds, by username. */
|
|
39
|
+
members?: string[];
|
|
40
|
+
}
|
|
41
|
+
/** One look at the directory, as the host read it. */
|
|
42
|
+
export interface DirectorySource {
|
|
43
|
+
users(): Promise<DirectoryUser[]>;
|
|
44
|
+
groups(): Promise<DirectoryGroup[]>;
|
|
45
|
+
}
|
|
46
|
+
export interface DirectorySyncResult {
|
|
47
|
+
/** How many accounts this call created; existing ones are not counted. */
|
|
48
|
+
userCount: number;
|
|
49
|
+
/** How many groups this call created. */
|
|
50
|
+
groupCount: number;
|
|
51
|
+
}
|
|
52
|
+
export interface DirectoryService {
|
|
53
|
+
synchronise(): Promise<DirectorySyncResult>;
|
|
54
|
+
}
|
|
55
|
+
export interface DirectoryServiceOptions {
|
|
56
|
+
/**
|
|
57
|
+
* The `authProvider` stamped on what the import creates. `ldap` is the
|
|
58
|
+
* provider this route names; a host with a second directory can state its own.
|
|
59
|
+
*/
|
|
60
|
+
provider?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The import, over the host's store.
|
|
64
|
+
*
|
|
65
|
+
* `IdentityStore` is the port rather than `RecordService`, because the records
|
|
66
|
+
* routes require a password (a local account has one to set) and a
|
|
67
|
+
* provider-managed account does not: the host's directory is where it
|
|
68
|
+
* authenticates, and `passwordMatches` answers for it.
|
|
69
|
+
*/
|
|
70
|
+
export declare const createDirectoryService: (store: IdentityStore, source: DirectorySource, options?: DirectoryServiceOptions) => DirectoryService;
|
|
71
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/directory/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,KAAK,EAEV,aAAa,EAEd,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC9B,KAAK,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAAA;IACjC,MAAM,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAAA;CACpC;AAED,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAA;IACjB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAC5C;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AA4DD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,aAAa,EACpB,QAAQ,eAAe,EACvB,UAAS,uBAA4B,KACpC,gBAsFF,CAAA"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
const isNonEmptyString = (value) => typeof value === 'string' && value.length > 0;
|
|
2
|
+
/**
|
|
3
|
+
* The users, checked before anything is written.
|
|
4
|
+
*
|
|
5
|
+
* A duplicate or nameless entry is refused before the first write, so a bad
|
|
6
|
+
* directory answer cannot leave the store half-imported.
|
|
7
|
+
*/
|
|
8
|
+
const usersOf = (users) => {
|
|
9
|
+
if (!Array.isArray(users))
|
|
10
|
+
throw new Error('The directory answer has no users array.');
|
|
11
|
+
const seen = new Set();
|
|
12
|
+
for (const user of users) {
|
|
13
|
+
if (!isNonEmptyString(user?.username) ||
|
|
14
|
+
!isNonEmptyString(user?.displayName))
|
|
15
|
+
throw new Error(`The directory answer carries a user without a username or displayName: ${JSON.stringify(user)}. Both are what the API keys an account on, so the import cannot guess them.`);
|
|
16
|
+
if (seen.has(user.username))
|
|
17
|
+
throw new Error(`The directory answer names ${user.username} twice. A directory that returns one account twice is a filter problem, and importing it would hide that.`);
|
|
18
|
+
seen.add(user.username);
|
|
19
|
+
}
|
|
20
|
+
return users;
|
|
21
|
+
};
|
|
22
|
+
const groupsOf = (groups) => {
|
|
23
|
+
if (!Array.isArray(groups))
|
|
24
|
+
throw new Error('The directory answer has no groups array.');
|
|
25
|
+
const seen = new Set();
|
|
26
|
+
for (const group of groups) {
|
|
27
|
+
if (!isNonEmptyString(group?.name))
|
|
28
|
+
throw new Error(`The directory answer carries a group without a name: ${JSON.stringify(group)}.`);
|
|
29
|
+
if (seen.has(group.name))
|
|
30
|
+
throw new Error(`The directory answer names the group ${group.name} twice, which would apply its members twice.`);
|
|
31
|
+
seen.add(group.name);
|
|
32
|
+
}
|
|
33
|
+
return groups;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The import, over the host's store.
|
|
37
|
+
*
|
|
38
|
+
* `IdentityStore` is the port rather than `RecordService`, because the records
|
|
39
|
+
* routes require a password (a local account has one to set) and a
|
|
40
|
+
* provider-managed account does not: the host's directory is where it
|
|
41
|
+
* authenticates, and `passwordMatches` answers for it.
|
|
42
|
+
*/
|
|
43
|
+
export const createDirectoryService = (store, source, options = {}) => {
|
|
44
|
+
const provider = options.provider || 'ldap';
|
|
45
|
+
return {
|
|
46
|
+
async synchronise() {
|
|
47
|
+
const directoryUsers = usersOf(await source.users());
|
|
48
|
+
const directoryGroups = groupsOf(await source.groups());
|
|
49
|
+
const existingUsers = await store.users();
|
|
50
|
+
const existingGroups = await store.groups();
|
|
51
|
+
const userByName = new Map(existingUsers.map((user) => [user.username, user]));
|
|
52
|
+
const groupByName = new Map(existingGroups.map((group) => [group.name, group]));
|
|
53
|
+
// ------------------------------------------------------------- users
|
|
54
|
+
const imported = [];
|
|
55
|
+
for (const user of directoryUsers) {
|
|
56
|
+
if (userByName.has(user.username))
|
|
57
|
+
continue;
|
|
58
|
+
const created = await store.createUser({
|
|
59
|
+
username: user.username,
|
|
60
|
+
displayName: user.displayName,
|
|
61
|
+
isAdmin: false,
|
|
62
|
+
isActive: true,
|
|
63
|
+
authProvider: provider
|
|
64
|
+
});
|
|
65
|
+
userByName.set(created.username, created);
|
|
66
|
+
imported.push(created);
|
|
67
|
+
}
|
|
68
|
+
// ------------------------------------------------------------ groups
|
|
69
|
+
const importedGroups = [];
|
|
70
|
+
for (const group of directoryGroups) {
|
|
71
|
+
if (groupByName.has(group.name))
|
|
72
|
+
continue;
|
|
73
|
+
const created = await store.createGroup({
|
|
74
|
+
name: group.name,
|
|
75
|
+
description: '',
|
|
76
|
+
isActive: true,
|
|
77
|
+
authProvider: provider
|
|
78
|
+
});
|
|
79
|
+
groupByName.set(created.name, created);
|
|
80
|
+
importedGroups.push(created);
|
|
81
|
+
}
|
|
82
|
+
// -------------------------------------------------------- membership
|
|
83
|
+
//
|
|
84
|
+
// Only the groups this call created are touched, so a second run is a
|
|
85
|
+
// no-op and an existing group keeps whatever its administrator set. The
|
|
86
|
+
// union of both directions: a group lists members, and a user lists the
|
|
87
|
+
// groups it belongs to.
|
|
88
|
+
const membersOf = new Map();
|
|
89
|
+
const note = (groupName, username) => {
|
|
90
|
+
const members = membersOf.get(groupName) || new Set();
|
|
91
|
+
members.add(username);
|
|
92
|
+
membersOf.set(groupName, members);
|
|
93
|
+
};
|
|
94
|
+
for (const group of directoryGroups)
|
|
95
|
+
for (const member of group.members || [])
|
|
96
|
+
note(group.name, member);
|
|
97
|
+
for (const user of directoryUsers)
|
|
98
|
+
for (const groupName of user.groups || [])
|
|
99
|
+
note(groupName, user.username);
|
|
100
|
+
for (const group of importedGroups)
|
|
101
|
+
for (const username of membersOf.get(group.name) || []) {
|
|
102
|
+
const user = userByName.get(username);
|
|
103
|
+
// a member the store does not know is not an error: the directory may
|
|
104
|
+
// hold accounts this API was never asked to import, and inventing them
|
|
105
|
+
// would be importing a user the directory did not name
|
|
106
|
+
if (user)
|
|
107
|
+
await store.addToGroup(group.uid, user.uid);
|
|
108
|
+
}
|
|
109
|
+
return { userCount: imported.length, groupCount: importedGroups.length };
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
};
|
|
@@ -6,6 +6,9 @@ import type { RuntimeService } from '../runtime/service.js';
|
|
|
6
6
|
import type { AppStreamRegistry } from '../drive/registry.js';
|
|
7
7
|
import type { CodeService } from '../code/service.js';
|
|
8
8
|
import type { InfoService } from '../info/service.js';
|
|
9
|
+
import type { AuthConfigService } from '../authconfig/service.js';
|
|
10
|
+
import type { AdminService } from '../admin/service.js';
|
|
11
|
+
import type { DirectoryService } from '../directory/service.js';
|
|
9
12
|
import type { Subject } from '../identity/types.js';
|
|
10
13
|
export interface ApiRequest {
|
|
11
14
|
query?: Record<string, string | undefined>;
|
|
@@ -55,6 +58,21 @@ export interface Services {
|
|
|
55
58
|
* the host is the only one that knows its values.
|
|
56
59
|
*/
|
|
57
60
|
info?: InfoService;
|
|
61
|
+
/**
|
|
62
|
+
* The provider configuration an administrator may read. Absent, `GET
|
|
63
|
+
* /SASjsApi/authConfig` answers 501: the values are the host's environment.
|
|
64
|
+
*/
|
|
65
|
+
authConfig?: AuthConfigService;
|
|
66
|
+
/**
|
|
67
|
+
* What the host is doing - diagnostics, log files, log tails. Absent, the
|
|
68
|
+
* three Admin reports answer 501: a browser build has no process to describe.
|
|
69
|
+
*/
|
|
70
|
+
admin?: AdminService;
|
|
71
|
+
/**
|
|
72
|
+
* A directory to import accounts from. Absent, the LDAP import answers 501:
|
|
73
|
+
* the connection is the host's.
|
|
74
|
+
*/
|
|
75
|
+
directory?: DirectoryService;
|
|
58
76
|
drive: DriveService;
|
|
59
77
|
/**
|
|
60
78
|
* Users, clients and tokens. A host without one answers 501 for the identity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../src/host/dispatch.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAwBnD,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG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,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC,CAAA;IAC9D;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,mBAAmB;IACnB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;CAC/B;AAED,MAAM,WAAW,QAAQ;IACvB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,KAAK,EAAE,YAAY,CAAA;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,yFAAyF;IACzF,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC7B;AA2CD,eAAO,MAAM,QAAQ,GACnB,UAAU,QAAQ,EAClB,SAAS,MAAM,EACf,UAAS,UAAe,KACvB,OAAO,CAAC,WAAW,CAwoBrB,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,cAAc,EAAE,MAAM,EA6DlC,CAAA"}
|
|
@@ -191,6 +191,40 @@ export const dispatch = async (services, routeId, request = {}) => {
|
|
|
191
191
|
throw new ApiError(501, `This host has no info service, so it cannot answer ${routeId}.`);
|
|
192
192
|
return { status: 200, body: await services.info.info() };
|
|
193
193
|
}
|
|
194
|
+
// ------------------------------------------------- a host's own reports
|
|
195
|
+
//
|
|
196
|
+
// The administrator middleware is the host's (sasjs/server mounts
|
|
197
|
+
// authenticateAccessToken and verifyAdmin ahead of all of these), which is
|
|
198
|
+
// why their 401 is marked host-only in the overlay. The package answers a
|
|
199
|
+
// body, and for a log tail the refusals that belong to the name rule.
|
|
200
|
+
case 'GET /SASjsApi/admin/diagnostics': {
|
|
201
|
+
if (!services.admin)
|
|
202
|
+
throw new ApiError(501, `This host has no admin service, so it cannot answer ${routeId}.`);
|
|
203
|
+
return { status: 200, body: await services.admin.diagnostics() };
|
|
204
|
+
}
|
|
205
|
+
case 'GET /SASjsApi/admin/logs': {
|
|
206
|
+
if (!services.admin)
|
|
207
|
+
throw new ApiError(501, `This host has no admin service, so it cannot answer ${routeId}.`);
|
|
208
|
+
return { status: 200, body: { files: await services.admin.logs() } };
|
|
209
|
+
}
|
|
210
|
+
case 'GET /SASjsApi/admin/logs/{fileName}': {
|
|
211
|
+
if (!services.admin)
|
|
212
|
+
throw new ApiError(501, `This host has no admin service, so it cannot answer ${routeId}.`);
|
|
213
|
+
return {
|
|
214
|
+
status: 200,
|
|
215
|
+
body: await services.admin.logTail(String(params.fileName ?? ''), query.lines)
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
case 'GET /SASjsApi/authConfig': {
|
|
219
|
+
if (!services.authConfig)
|
|
220
|
+
throw new ApiError(501, `This host has no auth-config service, so it cannot answer ${routeId}.`);
|
|
221
|
+
return { status: 200, body: await services.authConfig.authConfig() };
|
|
222
|
+
}
|
|
223
|
+
case 'POST /SASjsApi/authConfig/synchroniseWithLDAP': {
|
|
224
|
+
if (!services.directory)
|
|
225
|
+
throw new ApiError(501, `This host has no directory service, so it cannot answer ${routeId}.`);
|
|
226
|
+
return { status: 200, body: await services.directory.synchronise() };
|
|
227
|
+
}
|
|
194
228
|
case 'GET /SASjsApi/drive/file': {
|
|
195
229
|
const file = await drive.read(String(query._filePath || ''));
|
|
196
230
|
return { status: 200, contents: file.contents };
|
|
@@ -514,6 +548,11 @@ export const dispatch = async (services, routeId, request = {}) => {
|
|
|
514
548
|
/** Whether a route is one `dispatch` can answer today. */
|
|
515
549
|
export const HANDLED_ROUTES = [
|
|
516
550
|
'GET /SASjsApi/info',
|
|
551
|
+
'GET /SASjsApi/admin/diagnostics',
|
|
552
|
+
'GET /SASjsApi/admin/logs',
|
|
553
|
+
'GET /SASjsApi/admin/logs/{fileName}',
|
|
554
|
+
'GET /SASjsApi/authConfig',
|
|
555
|
+
'POST /SASjsApi/authConfig/synchroniseWithLDAP',
|
|
517
556
|
'POST /SASjsApi/drive/deploy/upload',
|
|
518
557
|
'DELETE /SASjsApi/drive/deploy',
|
|
519
558
|
'GET /SASjsApi/stp/execute',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-store.d.ts","sourceRoot":"","sources":["../../../src/identity/memory-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,aAAa,EACb,OAAO,EACP,OAAO,EACP,SAAS,EACT,UAAU,EACX,MAAM,YAAY,CAAA;AACnB,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,cAAc,CAAA;AA+DrB;;;;;GAKG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACvD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA4B;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyC;IACnE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA8C;IAC7E,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA0C;IACxE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoC;IAC9D,OAAO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AO,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAOrC,eAAe,CACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAOrC,WAAW,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAIlD,cAAc,CAClB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAI1C,gBAAgB,CACpB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,wBAAwB,CAAC;IAa9B,oBAAoB,CACxB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAO1C,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5C,OAAO,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAI1C,YAAY,CAChB,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,oBAAoB,CAAC;CASjC"}
|
|
@@ -307,7 +307,10 @@ export class MemoryIdentityStore {
|
|
|
307
307
|
name: input.name,
|
|
308
308
|
description: input.description,
|
|
309
309
|
isActive: input.isActive,
|
|
310
|
-
users: []
|
|
310
|
+
users: [],
|
|
311
|
+
...(input.authProvider === undefined
|
|
312
|
+
? {}
|
|
313
|
+
: { authProvider: input.authProvider })
|
|
311
314
|
};
|
|
312
315
|
this.groupList.set(group.uid, group);
|
|
313
316
|
return group;
|
|
@@ -168,6 +168,11 @@ export interface NewGroup {
|
|
|
168
168
|
name: string;
|
|
169
169
|
description: string;
|
|
170
170
|
isActive: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Set when an external provider manages the group - the directory import
|
|
173
|
+
* marks the groups it creates, so a host can tell them apart from local ones.
|
|
174
|
+
*/
|
|
175
|
+
authProvider?: string;
|
|
171
176
|
}
|
|
172
177
|
export interface NewPermission {
|
|
173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OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
|
package/build/esm/index.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ export { createIdentityService } from './identity/service.js';
|
|
|
31
31
|
export { createRecordService, sanitiseDisplayName } from './identity/records.js';
|
|
32
32
|
export { CODE_CORPUS } from './corpus/code.js';
|
|
33
33
|
export { INFO_CORPUS } from './corpus/info.js';
|
|
34
|
+
export { ADMIN_CORPUS } from './corpus/admin.js';
|
|
35
|
+
export { AUTH_CONFIG_CORPUS } from './corpus/authconfig.js';
|
|
36
|
+
export { DIRECTORY_CORPUS } from './corpus/directory.js';
|
|
34
37
|
export { BROWSER_INFO, createInfoService, normaliseInfo } from './info/service.js';
|
|
35
38
|
export type { InfoResponse, InfoService } from './info/service.js';
|
|
36
39
|
export type { AuthorizedRoutesResponse, GroupDetailsResponse, GroupResponse, PermissionResponse, RecordServiceOptions, RecordService, UserDetailsResponse, UserResponse } from './identity/records.js';
|
package/build/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc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AE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC3E,OAAO,EACL,aAAa,EACb,eAAe,EACf,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
|
package/build/esm/index.js
CHANGED
|
@@ -27,6 +27,9 @@ export { createIdentityService } from './identity/service.js';
|
|
|
27
27
|
export { createRecordService, sanitiseDisplayName } from './identity/records.js';
|
|
28
28
|
export { CODE_CORPUS } from './corpus/code.js';
|
|
29
29
|
export { INFO_CORPUS } from './corpus/info.js';
|
|
30
|
+
export { ADMIN_CORPUS } from './corpus/admin.js';
|
|
31
|
+
export { AUTH_CONFIG_CORPUS } from './corpus/authconfig.js';
|
|
32
|
+
export { DIRECTORY_CORPUS } from './corpus/directory.js';
|
|
30
33
|
export { BROWSER_INFO, createInfoService, normaliseInfo } from './info/service.js';
|
|
31
34
|
export { MemoryIdentityStore } from './identity/memory-store.js';
|
|
32
35
|
export { DEFAULT_IDENTITY, IDENTITY_FORMAT, parseIdentity } from './identity/fixture.js';
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
*/
|
|
33
33
|
export interface InfoResponse {
|
|
34
34
|
/**
|
|
35
|
-
* Which mode the host runs in, from `MODE` -
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* Which mode the host runs in, from `MODE` - and the two words the document
|
|
36
|
+
* states, `ModeType` (`server`, `desktop`). Typed as a string because that is
|
|
37
|
+
* the JSON type; the service refuses anything outside the enum, and a spec
|
|
38
|
+
* reads the enum out of `spec/swagger.yaml` so the two cannot drift.
|
|
39
39
|
*/
|
|
40
40
|
mode: string;
|
|
41
41
|
/**
|
|
42
|
-
* The host's CORS setting, from `CORS
|
|
43
|
-
*
|
|
42
|
+
* The host's CORS setting, from `CORS` - the document's `CorsType` (`enable`,
|
|
43
|
+
* `disable`), enforced the same way.
|
|
44
44
|
*/
|
|
45
45
|
cors: string;
|
|
46
46
|
/** The plain HTTP listener's port, or `null` when it is disabled. */
|
|
@@ -81,6 +81,14 @@ export interface InfoService {
|
|
|
81
81
|
* site is served by whoever serves the site.
|
|
82
82
|
*/
|
|
83
83
|
export declare const BROWSER_INFO: InfoResponse;
|
|
84
|
+
/**
|
|
85
|
+
* The two enums the document states for this body, from the `ModeType` and
|
|
86
|
+
* `CorsType` schemas sasjs/server publishes (v4.16.2). `spec/info.spec.ts`
|
|
87
|
+
* reads them back out of `spec/swagger.yaml` and fails if these lists and the
|
|
88
|
+
* document disagree in either direction.
|
|
89
|
+
*/
|
|
90
|
+
export declare const MODES: string[];
|
|
91
|
+
export declare const CORS_VALUES: string[];
|
|
84
92
|
/**
|
|
85
93
|
* The configuration, checked and put in the document's order.
|
|
86
94
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/info/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,0EAA0E;I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,CAAA;AAC1C,eAAO,MAAM,WAAW,UAAwB,CAAA;AA6ChD;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,YAAY,KAAG,YAoEpD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,YAAY,GAAG,CAAC,MAAM,YAAY,CAAC,KAC1C,WAQF,CAAA"}
|
|
@@ -57,6 +57,14 @@ const FIELDS = [
|
|
|
57
57
|
];
|
|
58
58
|
/** The properties the document makes required; `oidcProviderName` is not one. */
|
|
59
59
|
const REQUIRED_FIELDS = FIELDS.filter((field) => field !== 'oidcProviderName');
|
|
60
|
+
/**
|
|
61
|
+
* The two enums the document states for this body, from the `ModeType` and
|
|
62
|
+
* `CorsType` schemas sasjs/server publishes (v4.16.2). `spec/info.spec.ts`
|
|
63
|
+
* reads them back out of `spec/swagger.yaml` and fails if these lists and the
|
|
64
|
+
* document disagree in either direction.
|
|
65
|
+
*/
|
|
66
|
+
export const MODES = ['server', 'desktop'];
|
|
67
|
+
export const CORS_VALUES = ['enable', 'disable'];
|
|
60
68
|
const isNonEmptyString = (value) => typeof value === 'string' && value.length > 0;
|
|
61
69
|
/**
|
|
62
70
|
* A port the document can carry: an integer in range, or `null`.
|
|
@@ -103,14 +111,11 @@ export const normaliseInfo = (config) => {
|
|
|
103
111
|
if (!Object.prototype.hasOwnProperty.call(config, key))
|
|
104
112
|
throw new Error(`The info configuration does not state \`${key}\`, which the document requires. A client validating the response refuses an answer that omits it.`);
|
|
105
113
|
const mode = config.mode;
|
|
106
|
-
if (!
|
|
107
|
-
throw new Error(`The info configuration states mode as ${JSON.stringify(mode)}; the document states
|
|
108
|
-
// the document states `cors` as a string and the server passes `CORS` through
|
|
109
|
-
// verbatim, so any word is accepted here. sasjs/server#593 types both as
|
|
110
|
-
// enums; the refusal tightens with the release that publishes them.
|
|
114
|
+
if (!MODES.includes(mode))
|
|
115
|
+
throw new Error(`The info configuration states mode as ${JSON.stringify(mode)}; the document states the ModeType enum - ${MODES.map((value) => `\`${value}\``).join(' or ')}.`);
|
|
111
116
|
const cors = config.cors;
|
|
112
|
-
if (!
|
|
113
|
-
throw new Error(`The info configuration states cors as ${JSON.stringify(cors)}; the document states the
|
|
117
|
+
if (!CORS_VALUES.includes(cors))
|
|
118
|
+
throw new Error(`The info configuration states cors as ${JSON.stringify(cors)}; the document states the CorsType enum - ${CORS_VALUES.map((value) => `\`${value}\``).join(' or ')}.`);
|
|
114
119
|
const version = config.version;
|
|
115
120
|
if (!isNonEmptyString(version) || version.trim() === '')
|
|
116
121
|
throw new Error(`The info configuration states version as ${JSON.stringify(version)}; the document states the release that produced the build, such as \`v3.2.2 (4a26a3d)\`.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../src/routes/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,gBAAgB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../src/routes/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAshE5C,CAAA"}
|
|
@@ -26,6 +26,14 @@ export const GENERATED_ROUTES = [
|
|
|
26
26
|
{
|
|
27
27
|
status: 200,
|
|
28
28
|
description: 'Ok'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
status: 401,
|
|
32
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
status: 500,
|
|
36
|
+
description: 'The diagnostics could not be read'
|
|
29
37
|
}
|
|
30
38
|
]
|
|
31
39
|
},
|
|
@@ -41,6 +49,14 @@ export const GENERATED_ROUTES = [
|
|
|
41
49
|
{
|
|
42
50
|
status: 200,
|
|
43
51
|
description: 'Ok'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
status: 401,
|
|
55
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
status: 500,
|
|
59
|
+
description: 'The log folder could not be listed'
|
|
44
60
|
}
|
|
45
61
|
]
|
|
46
62
|
},
|
|
@@ -69,6 +85,22 @@ export const GENERATED_ROUTES = [
|
|
|
69
85
|
{
|
|
70
86
|
status: 200,
|
|
71
87
|
description: 'Ok'
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
status: 400,
|
|
91
|
+
description: 'Invalid log file name.'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
status: 401,
|
|
95
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
status: 404,
|
|
99
|
+
description: 'Log file not found.'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
status: 500,
|
|
103
|
+
description: 'The log file could not be read'
|
|
72
104
|
}
|
|
73
105
|
]
|
|
74
106
|
},
|
|
@@ -206,6 +238,18 @@ export const GENERATED_ROUTES = [
|
|
|
206
238
|
{
|
|
207
239
|
status: 200,
|
|
208
240
|
description: 'Ok'
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
status: 401,
|
|
244
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
status: 403,
|
|
248
|
+
description: 'Not Allowed while in Desktop Mode.'
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
status: 500,
|
|
252
|
+
description: 'The provider configuration could not be read'
|
|
209
253
|
}
|
|
210
254
|
]
|
|
211
255
|
},
|
|
@@ -221,6 +265,18 @@ export const GENERATED_ROUTES = [
|
|
|
221
265
|
{
|
|
222
266
|
status: 200,
|
|
223
267
|
description: 'Ok'
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
status: 401,
|
|
271
|
+
description: 'Unauthorized, or an administrator account is required. The mount point in routes/api/index.ts applies both checks before this handler runs.'
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
status: 403,
|
|
275
|
+
description: 'Not Allowed while in Desktop Mode.'
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
status: 500,
|
|
279
|
+
description: 'The directory could not be synchronised'
|
|
224
280
|
}
|
|
225
281
|
]
|
|
226
282
|
},
|