@nacre.work/api 0.6.0 → 0.8.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/dist/adapters.d.ts +29 -1
- package/dist/adapters.d.ts.map +1 -1
- package/dist/adapters.js +154 -13
- package/dist/adapters.js.map +1 -1
- package/dist/auth.d.ts +84 -4
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +74 -3
- package/dist/auth.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +2 -4
- package/dist/init.js.map +1 -1
- package/dist/main.js +4 -5
- package/dist/main.js.map +1 -1
- package/dist/oauth-store.d.ts +30 -5
- package/dist/oauth-store.d.ts.map +1 -1
- package/dist/oauth-store.js +64 -18
- package/dist/oauth-store.js.map +1 -1
- package/dist/rebuild-collection.js +2 -4
- package/dist/rebuild-collection.js.map +1 -1
- package/dist/server.d.ts +114 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +220 -14
- package/dist/server.js.map +1 -1
- package/package.json +2 -2
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Server } from 'node:http';
|
|
2
|
-
import { type AuditEvent, type AuditWriter, type Metadata, type ProtectedResourceMetadata } from '@nacre.work/core';
|
|
2
|
+
import { type AuditEvent, type AuditWriter, type Metadata, type ProtectedResourceMetadata, type Permission } from '@nacre.work/core';
|
|
3
3
|
import { type AuthContext, type VerifyOptions } from './auth.js';
|
|
4
4
|
import { type IdempotencyStore } from './idempotency.js';
|
|
5
5
|
import { type LimitPolicy, type RateLimiter, type Resource } from './limits.js';
|
|
@@ -67,6 +67,22 @@ export interface DocumentView {
|
|
|
67
67
|
readonly title: string | null;
|
|
68
68
|
readonly status: string;
|
|
69
69
|
readonly chunk_count: number;
|
|
70
|
+
/**
|
|
71
|
+
* Why indexing failed, for a document whose `status` is `failed`.
|
|
72
|
+
*
|
|
73
|
+
* The worker has written this to `documents.error` since it had a message
|
|
74
|
+
* worth writing, and no surface read it back — so `status: "failed"` with
|
|
75
|
+
* `chunk_count: 0` was the whole of what a caller could learn, and the
|
|
76
|
+
* reason lived where only somebody with the host could reach it.
|
|
77
|
+
*
|
|
78
|
+
* `null` for every other status, including a document that failed once and
|
|
79
|
+
* succeeded on a retry: the column keeps the last error, and reporting it
|
|
80
|
+
* beside `indexed` would describe a working document as a broken one.
|
|
81
|
+
*
|
|
82
|
+
* It follows the document's own permission, so rule 6 keeps it away from a
|
|
83
|
+
* caller holding `write` alone — the same as `source_url`.
|
|
84
|
+
*/
|
|
85
|
+
readonly error: string | null;
|
|
70
86
|
readonly updated_at: string;
|
|
71
87
|
/** What the caller tagged it with, and what `filters` reads back. */
|
|
72
88
|
readonly metadata: Metadata;
|
|
@@ -218,6 +234,24 @@ export interface Layer {
|
|
|
218
234
|
/** The cursor's sort key. Not serialized; it exists so paging is stable. */
|
|
219
235
|
readonly createdAt: string;
|
|
220
236
|
readonly description: string;
|
|
237
|
+
/**
|
|
238
|
+
* Live documents in the layer that indexing **failed** on.
|
|
239
|
+
*
|
|
240
|
+
* Beside `documentCount` rather than instead of it, because the two answer
|
|
241
|
+
* different questions and only one of them is actionable. A count of rows is
|
|
242
|
+
* the right definition for the first — counting only `indexed` would make a
|
|
243
|
+
* freshly ingested layer read zero while the worker catches up, so the number
|
|
244
|
+
* would swing on a state that resolves itself.
|
|
245
|
+
*
|
|
246
|
+
* `failed` does not resolve itself. It is the one status that waits for a
|
|
247
|
+
* person, which makes it the one that has to be *reported* rather than merely
|
|
248
|
+
* recorded — and until this existed a layer where every document had failed
|
|
249
|
+
* looked exactly like a healthy one, answering every search with nothing.
|
|
250
|
+
*
|
|
251
|
+
* Not per caller, on the same argument `documentCount` makes: a count that
|
|
252
|
+
* varied by who asked would describe somebody else's grants.
|
|
253
|
+
*/
|
|
254
|
+
readonly failedCount: number;
|
|
221
255
|
/**
|
|
222
256
|
* Live documents in the layer.
|
|
223
257
|
*
|
|
@@ -258,6 +292,84 @@ export interface Workspace {
|
|
|
258
292
|
*/
|
|
259
293
|
readonly layerCount: number;
|
|
260
294
|
readonly createdAt: string;
|
|
295
|
+
/**
|
|
296
|
+
* What **this** caller holds on this workspace, resolved for this request.
|
|
297
|
+
*
|
|
298
|
+
* Deliberately per-caller, which `layerCount` deliberately is not, and the
|
|
299
|
+
* difference is what each one would leak. A count that varied by who asked
|
|
300
|
+
* describes somebody else's grants; this describes only the asker's own, on
|
|
301
|
+
* an object they are already being shown.
|
|
302
|
+
*
|
|
303
|
+
* It exists because the admin UI had no way to ask "may I create a layer
|
|
304
|
+
* here?" other than reading a role — and the role is the wrong answer twice
|
|
305
|
+
* over: an `org_admin` is not the only principal who may (a grant of `admin`
|
|
306
|
+
* on the workspace is enough), and a caller who can *see* a workspace with
|
|
307
|
+
* `read` may not. So "New layer" was offered to people whose next click was
|
|
308
|
+
* a `404` that invariant 4 makes indistinguishable from a broken screen.
|
|
309
|
+
*
|
|
310
|
+
* A set rather than a level, on rule 6: permissions are unordered here, so
|
|
311
|
+
* `['write']` is a real answer and a ladder would have lost it.
|
|
312
|
+
*/
|
|
313
|
+
readonly permissions: readonly Permission[];
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* An embedding provider, as a caller sees it.
|
|
317
|
+
*
|
|
318
|
+
* **No endpoint and no credentials reference.** Both are in the table and
|
|
319
|
+
* neither is on this type: the endpoint names an internal host, the credentials
|
|
320
|
+
* reference names a slot in a secret store, and nothing a caller does with this
|
|
321
|
+
* list needs either. It exists so a layer can be pointed at a model, which
|
|
322
|
+
* takes an id — auditing the deployment's configuration is a different job with
|
|
323
|
+
* a different reader.
|
|
324
|
+
*/
|
|
325
|
+
export interface EmbeddingProvider {
|
|
326
|
+
readonly id: string;
|
|
327
|
+
readonly name: string;
|
|
328
|
+
readonly model: string;
|
|
329
|
+
readonly dimensions: number;
|
|
330
|
+
/** The installation default: the row belonging to no organization. */
|
|
331
|
+
readonly isDefault: boolean;
|
|
332
|
+
}
|
|
333
|
+
export type EmbeddingProviderOutcome = {
|
|
334
|
+
readonly kind: 'created';
|
|
335
|
+
readonly provider: EmbeddingProvider;
|
|
336
|
+
} | {
|
|
337
|
+
readonly kind: 'denied';
|
|
338
|
+
} | {
|
|
339
|
+
readonly kind: 'conflict';
|
|
340
|
+
};
|
|
341
|
+
export interface EmbeddingProviders {
|
|
342
|
+
/**
|
|
343
|
+
* This organization's providers and the installation default.
|
|
344
|
+
*
|
|
345
|
+
* Deliberately **not** `org_admin`. The caller who needs this is whoever may
|
|
346
|
+
* start a reindex, and that is `admin` on the *layer* — an organization role
|
|
347
|
+
* would hand them an empty picker and a 404 on the button, which is the
|
|
348
|
+
* defect the consent screen shipped with and this repository has now fixed
|
|
349
|
+
* twice.
|
|
350
|
+
*
|
|
351
|
+
* Widening it that far discloses nothing: a provider is installation
|
|
352
|
+
* configuration rather than tenant data, its model and dimensions are already
|
|
353
|
+
* implied by every layer's `vector_name`, and the endpoint is not on the
|
|
354
|
+
* type. The database narrows the rest — `org_isolation` shows a caller their
|
|
355
|
+
* own organization's rows and the global default, and never another
|
|
356
|
+
* tenant's.
|
|
357
|
+
*/
|
|
358
|
+
list(auth: AuthContext): Promise<readonly EmbeddingProvider[]>;
|
|
359
|
+
/**
|
|
360
|
+
* Add one, at `org_admin`.
|
|
361
|
+
*
|
|
362
|
+
* Creating a provider is installation configuration: it decides what a layer
|
|
363
|
+
* can be migrated onto, it can cost money, and — once an adapter can reach a
|
|
364
|
+
* hosted API — it decides where document text goes. That is an
|
|
365
|
+
* organization-wide act, unlike choosing among the ones that exist.
|
|
366
|
+
*/
|
|
367
|
+
create(auth: AuthContext, input: {
|
|
368
|
+
name: string;
|
|
369
|
+
endpoint: string;
|
|
370
|
+
model: string;
|
|
371
|
+
dimensions: number;
|
|
372
|
+
}): Promise<EmbeddingProviderOutcome>;
|
|
261
373
|
}
|
|
262
374
|
export type WorkspaceOutcome = {
|
|
263
375
|
readonly kind: 'created';
|
|
@@ -710,6 +822,7 @@ export interface ApiOptions {
|
|
|
710
822
|
/** Absent means the workspace paths answer 404, like any capability a surface lacks. */
|
|
711
823
|
readonly oauth?: OAuthServer;
|
|
712
824
|
readonly workspaces?: Workspaces;
|
|
825
|
+
readonly embeddingProviders?: EmbeddingProviders;
|
|
713
826
|
/** Layer reindex. Absent means the reindex paths answer 404. */
|
|
714
827
|
readonly reindex?: Reindex;
|
|
715
828
|
/** The reindex recall gate's query set. Absent means those paths answer 404. */
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,MAAM,EAAuB,MAAM,WAAW,CAAA;AAMhG,OAAO,EA0BL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,QAAQ,EAEb,KAAK,yBAAyB,EAC/B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAsC,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAA;AAEpG,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAC9E,OAAO,EAAoC,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AACjH,OAAO,KAAK,EAAE,KAAK,EAAU,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,EAEV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAoC,KAAK,MAAM,EAAkB,KAAK,KAAK,EAAiB,MAAM,iBAAiB,CAAA;AAS1H,OAAO,EAAY,KAAK,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACtE,YAAY,EAAE,IAAI,EA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C,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,eAAe,CAAC,EAAE,kBAAkB,CAAA;IAC7C,iFAAiF;IACjF,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;IAChC;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CAClC;AA+sBD,wBAAgB,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAuBrD"}
|
package/dist/server.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createHash, randomUUID, timingSafeEqual } from 'node:crypto';
|
|
|
4
4
|
// DOM, so the global URL is not typed here.
|
|
5
5
|
import { URL } from 'node:url';
|
|
6
6
|
import { logger, MetadataError, MultipartError, multipartBoundary, parseMultipart, queryAudit, parseFilters, parseMetadata, PROTECTED_RESOURCE_PATH, JWKS_PATH, AUTHORIZATION_SERVER_PATH, AUTHORIZE_PATH, CODE_TTL_MS, REGISTER_PATH, TOKEN_PATH, authorizationServerMetadata, consentRedirect, generateClientId, generateCode, redirectAllowed, verifierMatches, ADMIN_PREFIX, adminRoutes, withAuditSinks, TooBusy, } from '@nacre.work/core';
|
|
7
|
-
import { authenticate, rejectTenantOverride } from './auth.js';
|
|
7
|
+
import { administers, administersTenants, authenticate, rejectTenantOverride, } from './auth.js';
|
|
8
8
|
import { badRequest, internal, notFound, Problem } from './errors.js';
|
|
9
9
|
import { isConflict, isReplay } from './idempotency.js';
|
|
10
10
|
import { limitHeaders } from './limits.js';
|
|
@@ -38,6 +38,52 @@ class BodyTooLarge extends Error {
|
|
|
38
38
|
*/
|
|
39
39
|
const MAX_TOP_K = 50;
|
|
40
40
|
const isStringArray = (value) => Array.isArray(value) && value.every((v) => typeof v === 'string');
|
|
41
|
+
/**
|
|
42
|
+
* A delegation's narrowing, as `POST /v1/oauth/consent` accepts it.
|
|
43
|
+
*
|
|
44
|
+
* Two spellings of the same field, because a bare layer id is what an entry
|
|
45
|
+
* meant before a layer could carry a ceiling of its own — and it still means
|
|
46
|
+
* exactly that, "inherit the connection's ceiling". So the older form is the
|
|
47
|
+
* shorter spelling rather than a compatibility branch to be removed later.
|
|
48
|
+
*
|
|
49
|
+
* `INVALID` rather than `undefined` for a malformed value, because `undefined`
|
|
50
|
+
* is a real answer here: it is "no narrowing", and conflating the two would
|
|
51
|
+
* turn a typo into an application that reaches everything its person does.
|
|
52
|
+
*/
|
|
53
|
+
const INVALID = Symbol('invalid');
|
|
54
|
+
const readNarrowing = (value) => {
|
|
55
|
+
if (value === undefined)
|
|
56
|
+
return undefined;
|
|
57
|
+
if (!Array.isArray(value))
|
|
58
|
+
return INVALID;
|
|
59
|
+
const out = [];
|
|
60
|
+
for (const entry of value) {
|
|
61
|
+
if (typeof entry === 'string') {
|
|
62
|
+
out.push({ id: entry });
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (typeof entry !== 'object' || entry === null)
|
|
66
|
+
return INVALID;
|
|
67
|
+
const { id, permissions } = entry;
|
|
68
|
+
if (typeof id !== 'string')
|
|
69
|
+
return INVALID;
|
|
70
|
+
if (permissions === undefined) {
|
|
71
|
+
out.push({ id });
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
// Empty is refused rather than read as "no ceiling here". A layer the
|
|
75
|
+
// delegation may do nothing in is a layer that should not be in the
|
|
76
|
+
// narrowing at all, and the column's CHECK refuses one too — this is the
|
|
77
|
+
// same rule arriving as a 400 instead of as a constraint violation.
|
|
78
|
+
if (!isStringArray(permissions) ||
|
|
79
|
+
permissions.length === 0 ||
|
|
80
|
+
permissions.some((p) => !PERMISSIONS.includes(p))) {
|
|
81
|
+
return INVALID;
|
|
82
|
+
}
|
|
83
|
+
out.push({ id, permissions: permissions });
|
|
84
|
+
}
|
|
85
|
+
return out;
|
|
86
|
+
};
|
|
41
87
|
const boundedTopK = (value) => {
|
|
42
88
|
if (typeof value !== 'number' || !Number.isFinite(value))
|
|
43
89
|
return 10;
|
|
@@ -1644,6 +1690,113 @@ async function handle(req, res, options) {
|
|
|
1644
1690
|
}, requestId);
|
|
1645
1691
|
return;
|
|
1646
1692
|
}
|
|
1693
|
+
if (instance === '/v1/embedding-providers' && options.embeddingProviders !== undefined) {
|
|
1694
|
+
if (req.method === 'GET') {
|
|
1695
|
+
// Not paged. A deployment has a handful of these — one per model it
|
|
1696
|
+
// runs — and a cursor over three rows is machinery with nothing to do.
|
|
1697
|
+
// No audit event either, on the layer listing's rule: this is
|
|
1698
|
+
// configuration the caller can already infer from any layer.
|
|
1699
|
+
const items = await options.embeddingProviders.list(auth);
|
|
1700
|
+
send(res, 200, {
|
|
1701
|
+
items: items.map((p) => ({
|
|
1702
|
+
id: p.id,
|
|
1703
|
+
name: p.name,
|
|
1704
|
+
model: p.model,
|
|
1705
|
+
dimensions: p.dimensions,
|
|
1706
|
+
is_default: p.isDefault,
|
|
1707
|
+
})),
|
|
1708
|
+
}, requestId);
|
|
1709
|
+
return;
|
|
1710
|
+
}
|
|
1711
|
+
if (req.method === 'POST') {
|
|
1712
|
+
const body_ = (body ?? {});
|
|
1713
|
+
const name = body_.name;
|
|
1714
|
+
const endpoint = body_.endpoint;
|
|
1715
|
+
const model = body_.model;
|
|
1716
|
+
const dimensions = body_.dimensions;
|
|
1717
|
+
if (typeof name !== 'string' || name.trim() === '' ||
|
|
1718
|
+
typeof endpoint !== 'string' || endpoint.trim() === '' ||
|
|
1719
|
+
typeof model !== 'string' || model.trim() === '') {
|
|
1720
|
+
const problem = badRequest(instance, requestId, "'name', 'endpoint' and 'model' are required.");
|
|
1721
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
1722
|
+
return;
|
|
1723
|
+
}
|
|
1724
|
+
// The endpoint is parsed rather than stored as typed. `minio:9000` was
|
|
1725
|
+
// accepted by `new URL` once, as the scheme `minio:` with an empty
|
|
1726
|
+
// host, and the failure surfaced far from here — so a value that cannot
|
|
1727
|
+
// be an http(s) address is refused where the person can still fix it.
|
|
1728
|
+
let parsed;
|
|
1729
|
+
try {
|
|
1730
|
+
parsed = new URL(endpoint);
|
|
1731
|
+
}
|
|
1732
|
+
catch {
|
|
1733
|
+
const problem = badRequest(instance, requestId, "'endpoint' must be an absolute http(s) URL.");
|
|
1734
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
1735
|
+
return;
|
|
1736
|
+
}
|
|
1737
|
+
if ((parsed.protocol !== 'http:' && parsed.protocol !== 'https:') || parsed.host === '') {
|
|
1738
|
+
const problem = badRequest(instance, requestId, "'endpoint' must be an absolute http(s) URL.");
|
|
1739
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
1740
|
+
return;
|
|
1741
|
+
}
|
|
1742
|
+
// The load-bearing field. A layer's collection slot is created from it,
|
|
1743
|
+
// so a wrong number is a layer that accepts documents and fails every
|
|
1744
|
+
// one of them in the worker while the API answers `queued` — which is a
|
|
1745
|
+
// defect this repository has already had once, from the other side.
|
|
1746
|
+
if (typeof dimensions !== 'number' || !Number.isInteger(dimensions) || dimensions < 1 || dimensions > 16_384) {
|
|
1747
|
+
const problem = badRequest(instance, requestId, "'dimensions' must be a whole number between 1 and 16384, and must match what the model actually returns.");
|
|
1748
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
1749
|
+
return;
|
|
1750
|
+
}
|
|
1751
|
+
const outcome = await options.embeddingProviders.create(auth, {
|
|
1752
|
+
name: name.trim(),
|
|
1753
|
+
endpoint: endpoint.trim(),
|
|
1754
|
+
model: model.trim(),
|
|
1755
|
+
dimensions,
|
|
1756
|
+
});
|
|
1757
|
+
if (outcome.kind === 'denied') {
|
|
1758
|
+
await options.audit.write({
|
|
1759
|
+
orgId: auth.orgId,
|
|
1760
|
+
actor: `${auth.principal.type}:${auth.principal.id}`,
|
|
1761
|
+
action: 'embedding_provider.create',
|
|
1762
|
+
result: 'deny',
|
|
1763
|
+
detail: { name: name.trim() },
|
|
1764
|
+
requestId,
|
|
1765
|
+
});
|
|
1766
|
+
const problem = notFound(instance, requestId);
|
|
1767
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
1768
|
+
return;
|
|
1769
|
+
}
|
|
1770
|
+
if (outcome.kind === 'conflict') {
|
|
1771
|
+
const problem = new Problem({
|
|
1772
|
+
type: 'https://nacre.work/errors/conflict',
|
|
1773
|
+
title: 'Conflict',
|
|
1774
|
+
status: 409,
|
|
1775
|
+
detail: `A provider named '${name.trim()}' already exists in this organization.`,
|
|
1776
|
+
instance,
|
|
1777
|
+
requestId,
|
|
1778
|
+
});
|
|
1779
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
1780
|
+
return;
|
|
1781
|
+
}
|
|
1782
|
+
await options.audit.write({
|
|
1783
|
+
orgId: auth.orgId,
|
|
1784
|
+
actor: `${auth.principal.type}:${auth.principal.id}`,
|
|
1785
|
+
action: 'embedding_provider.create',
|
|
1786
|
+
result: 'allow',
|
|
1787
|
+
detail: { name: outcome.provider.name, model: outcome.provider.model },
|
|
1788
|
+
requestId,
|
|
1789
|
+
});
|
|
1790
|
+
send(res, 201, {
|
|
1791
|
+
id: outcome.provider.id,
|
|
1792
|
+
name: outcome.provider.name,
|
|
1793
|
+
model: outcome.provider.model,
|
|
1794
|
+
dimensions: outcome.provider.dimensions,
|
|
1795
|
+
is_default: outcome.provider.isDefault,
|
|
1796
|
+
}, requestId);
|
|
1797
|
+
return;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1647
1800
|
if (instance === '/v1/workspaces' && options.workspaces !== undefined) {
|
|
1648
1801
|
if (req.method === 'GET') {
|
|
1649
1802
|
const page = readPage(url.searchParams, instance, requestId);
|
|
@@ -1662,6 +1815,7 @@ async function handle(req, res, options) {
|
|
|
1662
1815
|
name: w.name,
|
|
1663
1816
|
layer_count: w.layerCount,
|
|
1664
1817
|
created_at: w.createdAt,
|
|
1818
|
+
permissions: w.permissions,
|
|
1665
1819
|
})),
|
|
1666
1820
|
next_cursor: nextCursor,
|
|
1667
1821
|
}, requestId);
|
|
@@ -1711,6 +1865,7 @@ async function handle(req, res, options) {
|
|
|
1711
1865
|
name: created.name,
|
|
1712
1866
|
layer_count: created.layerCount,
|
|
1713
1867
|
created_at: created.createdAt,
|
|
1868
|
+
permissions: created.permissions,
|
|
1714
1869
|
}, requestId);
|
|
1715
1870
|
return;
|
|
1716
1871
|
}
|
|
@@ -1732,6 +1887,7 @@ async function handle(req, res, options) {
|
|
|
1732
1887
|
workspace_id: l.workspaceId,
|
|
1733
1888
|
description: l.description,
|
|
1734
1889
|
document_count: l.documentCount,
|
|
1890
|
+
failed_count: l.failedCount,
|
|
1735
1891
|
})),
|
|
1736
1892
|
next_cursor: nextCursor,
|
|
1737
1893
|
}, requestId);
|
|
@@ -1799,6 +1955,7 @@ async function handle(req, res, options) {
|
|
|
1799
1955
|
workspace_id: created.workspaceId,
|
|
1800
1956
|
description: created.description,
|
|
1801
1957
|
document_count: created.documentCount,
|
|
1958
|
+
failed_count: created.failedCount,
|
|
1802
1959
|
}, requestId);
|
|
1803
1960
|
return;
|
|
1804
1961
|
}
|
|
@@ -1961,7 +2118,7 @@ async function handle(req, res, options) {
|
|
|
1961
2118
|
// about what a caller can tell apart — it is that a member must not
|
|
1962
2119
|
// reach module code at all, and "the module happened to have no matching
|
|
1963
2120
|
// route" is not a reason to be safe.
|
|
1964
|
-
if (auth
|
|
2121
|
+
if (!administersTenants(auth) && !administers(auth)) {
|
|
1965
2122
|
const problem = notFound(instance, requestId);
|
|
1966
2123
|
send(res, problem.status, problem.toJSON(), requestId);
|
|
1967
2124
|
return;
|
|
@@ -2156,7 +2313,7 @@ async function handle(req, res, options) {
|
|
|
2156
2313
|
// build; it is for the multi-tenancy module, which inherits this endpoint
|
|
2157
2314
|
// and where a platform administrator spans tenants. Writing the rule now
|
|
2158
2315
|
// costs three lines. Retrofitting it later means auditing every caller.
|
|
2159
|
-
if (auth
|
|
2316
|
+
if (!administers(auth) && !administersTenants(auth)) {
|
|
2160
2317
|
const problem = notFound(instance, requestId);
|
|
2161
2318
|
send(res, problem.status, problem.toJSON(), requestId);
|
|
2162
2319
|
return;
|
|
@@ -2189,7 +2346,7 @@ async function handle(req, res, options) {
|
|
|
2189
2346
|
// `administrativeOnly` is set here and never read from the request. A
|
|
2190
2347
|
// caller cannot widen their own view by omitting a parameter, which is
|
|
2191
2348
|
// the shape this would take if it were a query filter.
|
|
2192
|
-
{ ...query, administrativeOnly: auth
|
|
2349
|
+
{ ...query, administrativeOnly: administersTenants(auth) }, page);
|
|
2193
2350
|
// Reading the log is itself an access worth recording. It is the one
|
|
2194
2351
|
// action where leaving it out is self-serving: an administrator who can
|
|
2195
2352
|
// read who-read-what without that read appearing is a hole in exactly the
|
|
@@ -2357,7 +2514,7 @@ async function handle(req, res, options) {
|
|
|
2357
2514
|
// one from an org-scoped endpoint. Refused here *and* again at
|
|
2358
2515
|
// validation: this is the reachable path, the other is the one that holds
|
|
2359
2516
|
// if a token is ever minted some other way.
|
|
2360
|
-
if (delegating && auth
|
|
2517
|
+
if (delegating && administersTenants(auth)) {
|
|
2361
2518
|
const problem = notFound(instance, requestId);
|
|
2362
2519
|
send(res, problem.status, problem.toJSON(), requestId);
|
|
2363
2520
|
return;
|
|
@@ -2366,9 +2523,39 @@ async function handle(req, res, options) {
|
|
|
2366
2523
|
// is stored and read on the authentication path, and a slug is renameable
|
|
2367
2524
|
// — a narrowing that follows a rename is one that silently changes what a
|
|
2368
2525
|
// person approved.
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2526
|
+
//
|
|
2527
|
+
// Each entry is a layer id, or `{ id, permissions }` where the person set
|
|
2528
|
+
// a ceiling for that layer alone. A bare id means "inherit the
|
|
2529
|
+
// connection's ceiling", which is what every entry meant before per-layer
|
|
2530
|
+
// ceilings existed — so the older shape is still the shorter spelling of
|
|
2531
|
+
// the same thing rather than a compatibility branch.
|
|
2532
|
+
const narrowing = readNarrowing(consent['layers']);
|
|
2533
|
+
if (narrowing === INVALID) {
|
|
2534
|
+
const problem = badRequest(instance, requestId, "'layers' must be an array of layer ids, or of { id, permissions } objects " +
|
|
2535
|
+
'whose permissions are a non-empty subset of read, write and admin.');
|
|
2536
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
2537
|
+
return;
|
|
2538
|
+
}
|
|
2539
|
+
// The permission ceiling, which is the dimension a person reaches for
|
|
2540
|
+
// first. Validated here rather than left to the database, so a typo is a
|
|
2541
|
+
// 400 naming the field instead of a constraint violation as a 500.
|
|
2542
|
+
const ceiling = consent['permissions'];
|
|
2543
|
+
if (ceiling !== undefined && (!isStringArray(ceiling) || ceiling.some((p) => !PERMISSIONS.includes(p)))) {
|
|
2544
|
+
const problem = badRequest(instance, requestId, "'permissions' must be an array of 'read', 'write' or 'admin'.");
|
|
2545
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
2546
|
+
return;
|
|
2547
|
+
}
|
|
2548
|
+
if (delegating && isStringArray(ceiling) && ceiling.length === 0) {
|
|
2549
|
+
// Empty is not "no ceiling", it is a delegation that can do nothing —
|
|
2550
|
+
// a restriction nobody meant to write, and the database refuses one
|
|
2551
|
+
// too. Omitting the field is how a caller says there is no ceiling.
|
|
2552
|
+
const problem = badRequest(instance, requestId, "'permissions' cannot be empty. Omit it for a delegation with no restriction.");
|
|
2553
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
2554
|
+
return;
|
|
2555
|
+
}
|
|
2556
|
+
if (!delegating && ceiling !== undefined) {
|
|
2557
|
+
// An agent's reach is its grants, which are an administrator's to set.
|
|
2558
|
+
const problem = badRequest(instance, requestId, "'permissions' restricts a delegation, and this consent names an agent.");
|
|
2372
2559
|
send(res, problem.status, problem.toJSON(), requestId);
|
|
2373
2560
|
return;
|
|
2374
2561
|
}
|
|
@@ -2417,12 +2604,25 @@ async function handle(req, res, options) {
|
|
|
2417
2604
|
const readable = options.layers === undefined
|
|
2418
2605
|
? []
|
|
2419
2606
|
: (await options.layers.list(auth, { limit: 500, after: undefined })).items.map((l) => l.id);
|
|
2420
|
-
if (narrowing.some((
|
|
2607
|
+
if (narrowing.some((l) => !readable.includes(l.id))) {
|
|
2421
2608
|
const problem = notFound(instance, requestId);
|
|
2422
2609
|
send(res, problem.status, problem.toJSON(), requestId);
|
|
2423
2610
|
return;
|
|
2424
2611
|
}
|
|
2425
2612
|
}
|
|
2613
|
+
// A per-layer ceiling that the connection's ceiling excludes could never
|
|
2614
|
+
// take effect: `oauth_consents.permissions` gates the resolver before
|
|
2615
|
+
// rule 3, so the resolver would win and the entry would be a control that
|
|
2616
|
+
// does nothing. Refused here, naming both sets, rather than stored.
|
|
2617
|
+
if (delegating && isStringArray(ceiling)) {
|
|
2618
|
+
const allowed = ceiling;
|
|
2619
|
+
const outside = narrowing?.find((l) => l.permissions?.some((p) => !allowed.includes(p)));
|
|
2620
|
+
if (outside !== undefined) {
|
|
2621
|
+
const problem = badRequest(instance, requestId, `A layer may not be given more than the connection: ${outside.permissions?.join(', ') ?? ''} against a ceiling of ${ceiling.join(', ')}.`);
|
|
2622
|
+
send(res, problem.status, problem.toJSON(), requestId);
|
|
2623
|
+
return;
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2426
2626
|
// The standing connection first, then the code that points at it. That
|
|
2427
2627
|
// order matters: the code is exchanged for a refresh token hung on the
|
|
2428
2628
|
// connection, and a code with no connection would mint access nobody can
|
|
@@ -2430,7 +2630,7 @@ async function handle(req, res, options) {
|
|
|
2430
2630
|
const subject = delegating
|
|
2431
2631
|
? { actsAs: 'user', userId: auth.principal.id }
|
|
2432
2632
|
: { actsAs: 'service_account', serviceAccountId: serviceAccountId };
|
|
2433
|
-
const consentId = await options.oauth.consents.record(auth, clientId, subject, narrowing === undefined ? [] : narrowing);
|
|
2633
|
+
const consentId = await options.oauth.consents.record(auth, clientId, subject, narrowing === undefined ? [] : narrowing, isStringArray(ceiling) ? ceiling : undefined);
|
|
2434
2634
|
const code = generateCode();
|
|
2435
2635
|
const common = {
|
|
2436
2636
|
orgId: auth.orgId,
|
|
@@ -2462,7 +2662,13 @@ async function handle(req, res, options) {
|
|
|
2462
2662
|
client_name: client.clientName,
|
|
2463
2663
|
acts_as: subject.actsAs,
|
|
2464
2664
|
...(delegating
|
|
2465
|
-
? {
|
|
2665
|
+
? {
|
|
2666
|
+
delegation_id: consentId,
|
|
2667
|
+
layers: (narrowing ?? []).map((l) => l.id),
|
|
2668
|
+
// Recorded because it is the answer to "why can this
|
|
2669
|
+
// application not delete anything", asked six months later.
|
|
2670
|
+
permissions: isStringArray(ceiling) ? ceiling : 'no ceiling',
|
|
2671
|
+
}
|
|
2466
2672
|
: { service_account_id: serviceAccountId }),
|
|
2467
2673
|
},
|
|
2468
2674
|
requestId,
|
|
@@ -2484,7 +2690,7 @@ async function handle(req, res, options) {
|
|
|
2484
2690
|
// in the organization rather than an object inside a workspace, and there
|
|
2485
2691
|
// is no scope to check it against — someone holding admin on one layer
|
|
2486
2692
|
// must not be able to mint credentials.
|
|
2487
|
-
if (auth
|
|
2693
|
+
if (!administers(auth)) {
|
|
2488
2694
|
const problem = notFound(instance, requestId);
|
|
2489
2695
|
send(res, problem.status, problem.toJSON(), requestId);
|
|
2490
2696
|
return;
|
|
@@ -2549,7 +2755,7 @@ async function handle(req, res, options) {
|
|
|
2549
2755
|
}
|
|
2550
2756
|
const accountMatch = /^\/v1\/service-accounts\/([^/]+)$/.exec(instance);
|
|
2551
2757
|
if (req.method === 'DELETE' && accountMatch && options.serviceAccounts !== undefined) {
|
|
2552
|
-
if (auth
|
|
2758
|
+
if (!administers(auth)) {
|
|
2553
2759
|
const problem = notFound(instance, requestId);
|
|
2554
2760
|
send(res, problem.status, problem.toJSON(), requestId);
|
|
2555
2761
|
return;
|
|
@@ -2585,7 +2791,7 @@ async function handle(req, res, options) {
|
|
|
2585
2791
|
const principalPath = /^\/v1\/(users|groups)(\/.*)?$/.exec(instance);
|
|
2586
2792
|
if (principalPath !== null) {
|
|
2587
2793
|
const port = principalPath[1] === 'users' ? options.users : options.groups;
|
|
2588
|
-
if (port !== undefined && auth
|
|
2794
|
+
if (port !== undefined && !administers(auth)) {
|
|
2589
2795
|
await options.audit.write({
|
|
2590
2796
|
orgId: auth.orgId,
|
|
2591
2797
|
actor: `${auth.principal.type}:${auth.principal.id}`,
|