veryfront 0.1.1206 → 0.1.1208
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/esm/cli/templates/manifest.js +1 -1
- package/esm/deno.js +1 -1
- package/esm/src/agent/streaming/lifecycle/watchdog-compat-adapter.d.ts.map +1 -1
- package/esm/src/agent/streaming/lifecycle/watchdog-compat-adapter.js +7 -1
- package/esm/src/config/schemas/config.schema.d.ts +18 -2
- package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
- package/esm/src/config/schemas/config.schema.js +28 -1
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/platform/environment.d.ts.map +1 -1
- package/esm/src/platform/environment.js +7 -1
- package/esm/src/proxy/asset-handler.d.ts.map +1 -1
- package/esm/src/proxy/asset-handler.js +29 -15
- package/esm/src/release-assets/manifest-cache.d.ts.map +1 -1
- package/esm/src/release-assets/manifest-cache.js +21 -3
- package/esm/src/routing/api/handler.d.ts.map +1 -1
- package/esm/src/routing/api/handler.js +29 -2
- package/esm/src/routing/api/module-loader/loader.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/loader.js +4 -2
- package/esm/src/routing/api/route-executor.d.ts.map +1 -1
- package/esm/src/routing/api/route-executor.js +3 -5
- package/esm/src/security/http/base-handler.d.ts.map +1 -1
- package/esm/src/security/http/base-handler.js +0 -1
- package/esm/src/security/http/config.d.ts +0 -3
- package/esm/src/security/http/config.d.ts.map +1 -1
- package/esm/src/security/http/config.js +2 -8
- package/esm/src/security/http/csp-directives.d.ts +28 -0
- package/esm/src/security/http/csp-directives.d.ts.map +1 -0
- package/esm/src/security/http/csp-directives.js +67 -0
- package/esm/src/security/http/response/builder.d.ts +0 -1
- package/esm/src/security/http/response/builder.d.ts.map +1 -1
- package/esm/src/security/http/response/builder.js +0 -2
- package/esm/src/security/http/response/fluent-methods.d.ts +0 -1
- package/esm/src/security/http/response/fluent-methods.d.ts.map +1 -1
- package/esm/src/security/http/response/fluent-methods.js +1 -1
- package/esm/src/security/http/response/security-handler.d.ts +11 -3
- package/esm/src/security/http/response/security-handler.d.ts.map +1 -1
- package/esm/src/security/http/response/security-handler.js +144 -70
- package/esm/src/security/http/response/static-helpers.d.ts +0 -2
- package/esm/src/security/http/response/static-helpers.d.ts.map +1 -1
- package/esm/src/security/http/response/types.d.ts +0 -1
- package/esm/src/security/http/response/types.d.ts.map +1 -1
- package/esm/src/security/sandbox/isolation-capability.d.ts +31 -0
- package/esm/src/security/sandbox/isolation-capability.d.ts.map +1 -0
- package/esm/src/security/sandbox/isolation-capability.js +38 -0
- package/esm/src/security/sandbox/worker-pool.d.ts +8 -0
- package/esm/src/security/sandbox/worker-pool.d.ts.map +1 -1
- package/esm/src/security/sandbox/worker-pool.js +45 -1
- package/esm/src/server/handlers/request/api/security-headers.d.ts.map +1 -1
- package/esm/src/server/handlers/request/api/security-headers.js +2 -2
- package/esm/src/server/production-server.d.ts +11 -0
- package/esm/src/server/production-server.d.ts.map +1 -1
- package/esm/src/server/production-server.js +10 -0
- package/esm/src/server/runtime-handler/handler-context-builder.d.ts +1 -4
- package/esm/src/server/runtime-handler/handler-context-builder.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/handler-context-builder.js +1 -3
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +2 -3
- package/esm/src/server/runtime-handler/project-runtime-context.d.ts +0 -1
- package/esm/src/server/runtime-handler/project-runtime-context.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/project-runtime-context.js +0 -1
- package/esm/src/server/unhandled-rejection-guard.d.ts +39 -0
- package/esm/src/server/unhandled-rejection-guard.d.ts.map +1 -0
- package/esm/src/server/unhandled-rejection-guard.js +119 -0
- package/esm/src/types/server.d.ts +6 -2
- package/esm/src/types/server.d.ts.map +1 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +8 -8
|
@@ -20,13 +20,36 @@ const ASSET_PATH_PREFIX = "/_vf/assets/";
|
|
|
20
20
|
const ASSET_PATH_RE = /^\/_vf\/assets\/([0-9a-f]{64})\.(js|css)$/;
|
|
21
21
|
const DEFAULT_UPSTREAM_TIMEOUT_MS = 10_000;
|
|
22
22
|
const MAX_UPSTREAM_TIMEOUT_MS = 30_000;
|
|
23
|
-
/**
|
|
24
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Count and byte bounds for completed immutable asset snapshots.
|
|
25
|
+
*
|
|
26
|
+
* The byte budget is the binding limit. The entry count only exists so a
|
|
27
|
+
* pathological run of tiny assets cannot grow the map without end; sized so a
|
|
28
|
+
* pod serving several projects keeps whole module graphs resident, because
|
|
29
|
+
* evicting one holds the next page load hostage to a cold-load round trip.
|
|
30
|
+
*/
|
|
31
|
+
const MAX_CACHED_ASSETS = 2_000;
|
|
25
32
|
const MAX_CACHED_ASSET_BYTES = 32 * 1024 * 1024;
|
|
26
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Concurrent upstream fetches. This is the one real resource: each in-flight
|
|
35
|
+
* load buffers a whole asset in memory, so peak bytes is this count times
|
|
36
|
+
* RELEASE_ASSET_MAX_SIZE_BYTES.
|
|
37
|
+
*
|
|
38
|
+
* Excess demand queues rather than failing. A page's module graph is a fan-out
|
|
39
|
+
* this proxy itself produced by serving the HTML, so shedding it would reject
|
|
40
|
+
* the predictable consequence of our own response — and browser `import()`
|
|
41
|
+
* never retries, which turns one shed asset into a dead page. Callers are
|
|
42
|
+
* already bounded by their own deadline (`timeoutMs`) and the producer ceiling
|
|
43
|
+
* (`MAX_UPSTREAM_TIMEOUT_MS`); a saturated proxy therefore shows up as latency
|
|
44
|
+
* and finally an honest 504.
|
|
45
|
+
*
|
|
46
|
+
* A 503 is still reachable, but only from the semaphore's own
|
|
47
|
+
* `DEFAULT_PERMIT_SEMAPHORE_MAX_QUEUE_SIZE` backstop. That threshold is two
|
|
48
|
+
* orders of magnitude above one page's module graph, so reaching it means a
|
|
49
|
+
* genuine flood rather than a project being shed for the size of the document
|
|
50
|
+
* this proxy just served.
|
|
51
|
+
*/
|
|
27
52
|
const MAX_CONCURRENT_COLD_LOADS = 4;
|
|
28
|
-
const MAX_QUEUED_COLD_LOADS = 16;
|
|
29
|
-
const MAX_COLD_LOAD_WAITERS = 64;
|
|
30
53
|
class ReleaseAssetNotFoundError extends Error {
|
|
31
54
|
constructor() {
|
|
32
55
|
super("Release asset was not found upstream");
|
|
@@ -62,11 +85,8 @@ const assetCache = new LRUCache({
|
|
|
62
85
|
maxSizeBytes: MAX_CACHED_ASSET_BYTES,
|
|
63
86
|
estimateSizeOf: (asset) => asset.bytes.byteLength + asset.contentType.length * 2 + 64,
|
|
64
87
|
});
|
|
65
|
-
const coldLoadAdmission = new PermitSemaphore(MAX_CONCURRENT_COLD_LOADS
|
|
66
|
-
maxQueueSize: MAX_QUEUED_COLD_LOADS,
|
|
67
|
-
});
|
|
88
|
+
const coldLoadAdmission = new PermitSemaphore(MAX_CONCURRENT_COLD_LOADS);
|
|
68
89
|
const inflightAssetLoads = new Map();
|
|
69
|
-
let coldLoadWaiters = 0;
|
|
70
90
|
/** True when the path is owned by the release asset prefix. */
|
|
71
91
|
export function isReleaseAssetPath(pathname) {
|
|
72
92
|
return pathname.startsWith(ASSET_PATH_PREFIX);
|
|
@@ -305,9 +325,6 @@ export async function handleReleaseAssetRequest(req, url, options) {
|
|
|
305
325
|
}
|
|
306
326
|
if (req.signal.aborted)
|
|
307
327
|
return clientClosedRequest();
|
|
308
|
-
if (coldLoadWaiters >= MAX_COLD_LOAD_WAITERS)
|
|
309
|
-
return serviceUnavailable();
|
|
310
|
-
coldLoadWaiters++;
|
|
311
328
|
try {
|
|
312
329
|
const task = getOrCreateInflightAssetLoad(hash, upstreamUrl, doFetch);
|
|
313
330
|
const asset = await waitForInflightAssetLoad(task, req.signal, timeoutMs);
|
|
@@ -326,9 +343,6 @@ export async function handleReleaseAssetRequest(req, url, options) {
|
|
|
326
343
|
return serviceUnavailable();
|
|
327
344
|
return badGateway();
|
|
328
345
|
}
|
|
329
|
-
finally {
|
|
330
|
-
coldLoadWaiters--;
|
|
331
|
-
}
|
|
332
346
|
}
|
|
333
347
|
/** Clear the in-memory asset cache (tests / memory pressure). */
|
|
334
348
|
export function clearReleaseAssetProxyCache() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-cache.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/manifest-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQH,OAAO,
|
|
1
|
+
{"version":3,"file":"manifest-cache.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/manifest-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQH,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAwC9B,iEAAiE;AACjE,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAOD,wEAAwE;AACxE,MAAM,WAAW,gCAAgC;IAC/C,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CAC9B;AAED,yEAAyE;AACzE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,CACE,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAAC;CACpD;AAED,uDAAuD;AACvD,MAAM,MAAM,kCAAkC,GAAG,MAAM,IAAI,CAAC;AAmC5D;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,2BAA2B,GACnC,kCAAkC,CA0BpC;AAED;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAG3E;AAED,yEAAyE;AACzE,wBAAgB,6BAA6B,IAAI,OAAO,CAKvD;AA2CD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,oBAAoB,GAAG,IAAI,CAyC7B;AAsDD;;;GAGG;AACH,wBAAsB,8BAA8B,CAClD,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAMtC;AAED;;;;GAIG;AACH,wBAAsB,yCAAyC,CAC7D,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAEtC;AA8MD,6EAA6E;AAC7E,wBAAgB,gCAAgC,IAAI,IAAI,CAOvD;AAED,uEAAuE;AACvE,wBAAgB,8BAA8B,IAAI,IAAI,CAGrD"}
|
|
@@ -28,7 +28,7 @@ import { registerLRUCache } from "../cache/index.js";
|
|
|
28
28
|
import { getHostEnv } from "../platform/compat/process.js";
|
|
29
29
|
import { markRequestProfilePhase, profilePhase } from "../observability/index.js";
|
|
30
30
|
import { RELEASE_ASSET_MANIFEST_ENV_FLAG, RELEASE_ASSET_MANIFEST_LIMITS } from "./constants.js";
|
|
31
|
-
import { parseReadyReleaseAssetManifestResponse, } from "./manifest-schema.js";
|
|
31
|
+
import { describeReadyReleaseAssetManifestRejection, parseReadyReleaseAssetManifestResponse, } from "./manifest-schema.js";
|
|
32
32
|
import { hasControlCharacters } from "./string-validation.js";
|
|
33
33
|
const logger = serverLogger.component("release-asset-manifest");
|
|
34
34
|
/** Bound on cached manifests (per releaseId:manifestVersion). */
|
|
@@ -334,10 +334,28 @@ function fetchManifest(releaseId) {
|
|
|
334
334
|
return manifest;
|
|
335
335
|
}
|
|
336
336
|
else {
|
|
337
|
-
|
|
337
|
+
// Classify on what the publisher claimed, not on the derived `state`.
|
|
338
|
+
// A response that says `ready` with an unusable `manifest_version` is
|
|
339
|
+
// normalized to "invalid" above, so keying on `state` would route the
|
|
340
|
+
// envelope-level rejections to debug — silencing exactly the reasons
|
|
341
|
+
// this diagnostic exists to surface.
|
|
342
|
+
if (rawState === "ready") {
|
|
338
343
|
markManifestDecision("fetch_ready_invalid");
|
|
339
|
-
|
|
344
|
+
// A manifest the publisher calls ready but this build cannot read is
|
|
345
|
+
// an operator problem, not a wait: browser modules are refused for
|
|
346
|
+
// the whole release until someone acts. Say why. Without this the
|
|
347
|
+
// only signal is a 503 and a timing mark, which cannot distinguish
|
|
348
|
+
// framework version skew from a corrupt payload.
|
|
349
|
+
logger.error("Release manifest is ready upstream but failed validation", {
|
|
350
|
+
releaseId,
|
|
351
|
+
reason: describeReadyReleaseAssetManifestRejection(result, releaseId),
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
340
355
|
markManifestDecision(`fetch_${manifestState}`);
|
|
356
|
+
// Any other state is the release legitimately not being ready yet.
|
|
357
|
+
logger.debug("Release manifest is not ready", { releaseId, state: manifestState });
|
|
358
|
+
}
|
|
341
359
|
markManifestDecision("fetch_not_ready");
|
|
342
360
|
evictReadyManifests(releaseId, active.token);
|
|
343
361
|
cacheNonReadyManifest(releaseId, active.token);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/api/handler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWlD,OAAO,EAAE,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AAc;CAW7B;AAED,OAAO,EACL,UAAU,EACV,SAAS,EACT,mBAAmB,IAAI,WAAW,EAClC,YAAY,IAAI,IAAI,EACpB,QAAQ,EACR,gBAAgB,IAAI,QAAQ,EAC5B,YAAY,GACb,MAAM,yCAAyC,CAAC"}
|
|
@@ -11,7 +11,8 @@ import { loadHandlerModule, prepareHandlerModule } from "./module-loader/loader.
|
|
|
11
11
|
import { discoverAppRoutes, discoverPagesRoutes } from "./route-discovery.js";
|
|
12
12
|
import { executeAppRoute, executePagesRoute, executePreparedAppRoute, executePreparedPagesRoute, } from "./route-executor.js";
|
|
13
13
|
import { withSpan } from "../../observability/tracing/otlp-setup.js";
|
|
14
|
-
import { evictWorkerScopeIfPresent, isWorkerIsolationEnabled, } from "../../security/sandbox/worker-pool.js";
|
|
14
|
+
import { evictWorkerScopeIfPresent, isHostRealmApiExecution, isWorkerIsolationEnabled, } from "../../security/sandbox/worker-pool.js";
|
|
15
|
+
import { isIsolatedApiPreparationSupported, ISOLATED_API_PREPARATION_UNSUPPORTED_REASON, } from "../../security/sandbox/isolation-capability.js";
|
|
15
16
|
import { createApplicationRequest } from "../../security/http/application-request.js";
|
|
16
17
|
import { isHostProjectCodeExecutionAllowed, isSharedProjectRuntime, } from "../../security/project-locality.js";
|
|
17
18
|
/** Max entries in the loaded-handler LRU cache */
|
|
@@ -162,7 +163,33 @@ export class APIRouteHandler {
|
|
|
162
163
|
config: this.corsConfig ?? undefined,
|
|
163
164
|
}) ?? unavailable;
|
|
164
165
|
}
|
|
165
|
-
const useHostRealm = allowHostProjectCodeExecution
|
|
166
|
+
const useHostRealm = isHostRealmApiExecution(allowHostProjectCodeExecution);
|
|
167
|
+
// Only the isolated path is left and this build cannot prepare a module
|
|
168
|
+
// for it, so every continuation dead-ends in loadRoute and is flattened
|
|
169
|
+
// to "Handler not found" below. Name the flag instead. Gated on
|
|
170
|
+
// !useHostRealm so a dedicated-but-ungranted runtime, which skips the
|
|
171
|
+
// shared-runtime 503 above, also gets a typed answer.
|
|
172
|
+
if (!useHostRealm && !isIsolatedApiPreparationSupported()) {
|
|
173
|
+
const isolationRequested = isWorkerIsolationEnabled();
|
|
174
|
+
logger.error("API route unservable under the configured execution posture", {
|
|
175
|
+
pathname,
|
|
176
|
+
reason: ISOLATED_API_PREPARATION_UNSUPPORTED_REASON,
|
|
177
|
+
workerIsolationApi: isolationRequested,
|
|
178
|
+
allowHostProjectCodeExecution,
|
|
179
|
+
});
|
|
180
|
+
const unservable = createErrorResponseFromDefinition(PROJECT_EXECUTION_UNAVAILABLE, {
|
|
181
|
+
detail: isolationRequested
|
|
182
|
+
? "WORKER_ISOLATION_API is set but this runtime cannot prepare isolated API route source"
|
|
183
|
+
: "Host project code execution is not granted and this runtime cannot prepare isolated API route source",
|
|
184
|
+
instance: pathname,
|
|
185
|
+
});
|
|
186
|
+
unservable.headers.set("cache-control", "no-store");
|
|
187
|
+
return await applyCORSHeaders({
|
|
188
|
+
request,
|
|
189
|
+
response: unservable,
|
|
190
|
+
config: this.corsConfig ?? undefined,
|
|
191
|
+
}) ?? unservable;
|
|
192
|
+
}
|
|
166
193
|
const { route, errorMessage } = await this.loadRoute(match, useHostRealm);
|
|
167
194
|
if (!route) {
|
|
168
195
|
const msg = errorMessage ?? "Handler not found";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/routing/api/module-loader/loader.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAkBrF,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/routing/api/module-loader/loader.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAkBrF,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,2CAA2C,CAAC;AAWnD,OAAO,EACL,iCAAiC,EACjC,gCAAgC,EAChC,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,0CAA0C,EAC1C,qCAAqC,EACrC,6BAA6B,EAC7B,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CA8B1F;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAgD9F;AA0DD;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAIlE;AAgcD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAWrB"}
|
|
@@ -16,6 +16,7 @@ import { isWithinDirectory } from "../../../security/path-validation.js";
|
|
|
16
16
|
import { generateCompiledBinaryRequireShim, NODE_BUILTINS, readProjectDependencies, rewriteExternalImports, } from "./external-import-rewriter.js";
|
|
17
17
|
import { MAX_WORKER_MODULE_SOURCE_BYTES, } from "../../../security/sandbox/worker-types.js";
|
|
18
18
|
import { isExplicitHostProjectCodeExecutionAllowed } from "../../../security/project-locality.js";
|
|
19
|
+
import { isIsolatedApiPreparationSupported, ISOLATED_API_PREPARATION_UNSUPPORTED_REASON, } from "../../../security/sandbox/isolation-capability.js";
|
|
19
20
|
import { createProjectSourceSnapshot, ProjectBoundaryViolationError, } from "./project-source-snapshot.js";
|
|
20
21
|
export { generateCompiledBinaryRequireShim, getNodeExternalPackagesToResolve, loadVeryfrontExportsMap, resolveEsmUserDependencies, resolveNodePackageToFileUrl, rewriteCompiledBinaryUserDependencyImports, rewriteCompiledBinaryVeryfrontImports, rewriteDenoNodeBuiltinImports, rewriteDenoNpmDependencyImports, rewriteNodeExternalImports, } from "./external-import-rewriter.js";
|
|
21
22
|
const logger = serverLogger.component("api");
|
|
@@ -51,10 +52,11 @@ export function prepareHandlerModule(options) {
|
|
|
51
52
|
return withSpan("api.prepareHandlerModule", async () => {
|
|
52
53
|
const { projectDir, modulePath, adapter, config } = options;
|
|
53
54
|
validateModulePath(modulePath, projectDir);
|
|
54
|
-
|
|
55
|
+
// Fail-closed backstop. API ownership reports a typed 503 before this.
|
|
56
|
+
if (!isIsolatedApiPreparationSupported()) {
|
|
55
57
|
throw toError(createError({
|
|
56
58
|
type: "api",
|
|
57
|
-
message:
|
|
59
|
+
message: ISOLATED_API_PREPARATION_UNSUPPORTED_REASON,
|
|
58
60
|
}));
|
|
59
61
|
}
|
|
60
62
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-executor.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/api/route-executor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMzD,OAAO,KAAK,EACV,QAAQ,EAIT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"route-executor.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/api/route-executor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMzD,OAAO,KAAK,EACV,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAelC,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EAIvB,MAAM,wCAAwC,CAAC;AAgBh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AO,CAAC,QAAQ,CAAC,CAWnB;AAED,wBAAsB,2BAA2B,CAC/C,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,OAAO,EAAE,IAAI,CAAC,6BAA6B,EAAE,gBAAgB,CAAC,GAC7D,OAAO,CAAC,MAAM,EAAE,CAAC,CAiCnB;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,cAAc,EACxB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,QAAQ,CAAC,CAmEnB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,EACvB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,QAAQ,CAAC,CAyEnB"}
|
|
@@ -6,7 +6,7 @@ import { createAppRouteMethodNotAllowed, createPagesRouteMethodNotAllowed, } fro
|
|
|
6
6
|
import { isAbsolute, join } from "../../platform/compat/path/index.js";
|
|
7
7
|
import { withSpan } from "../../observability/tracing/otlp-setup.js";
|
|
8
8
|
import { serverLogger as logger } from "../../utils/index.js";
|
|
9
|
-
import { getWorkerPool,
|
|
9
|
+
import { getWorkerPool, isHostRealmApiExecution } from "../../security/sandbox/worker-pool.js";
|
|
10
10
|
import { resolveWorkerGeneration, snapshotWorkerGenerationIdentity, } from "../../security/sandbox/worker-generation.js";
|
|
11
11
|
import { deserializeWorkerError } from "../../security/sandbox/worker-error-boundary.js";
|
|
12
12
|
import { MAX_WORKER_BODY_BYTES, } from "../../security/sandbox/worker-types.js";
|
|
@@ -844,8 +844,7 @@ export async function resolvePreparedRouteMethods(requestedMethod, options) {
|
|
|
844
844
|
export function executeAppRoute(handler, request, match, pathname, _adapter, options) {
|
|
845
845
|
const routeOptions = snapshotExecuteRouteOptions(options);
|
|
846
846
|
const isLocalProject = routeOptions.isLocalProject === true;
|
|
847
|
-
const isolationRequired =
|
|
848
|
-
!routeOptions.allowHostProjectCodeExecution;
|
|
847
|
+
const isolationRequired = !isHostRealmApiExecution(routeOptions.allowHostProjectCodeExecution);
|
|
849
848
|
// Routes without an explicit host-execution capability require prepared
|
|
850
849
|
// worker execution. Local development projects retain the legacy capability.
|
|
851
850
|
if (isolationRequired) {
|
|
@@ -885,8 +884,7 @@ export function executeAppRoute(handler, request, match, pathname, _adapter, opt
|
|
|
885
884
|
export function executePagesRoute(handler, request, match, pathname, adapter, projectDir, options) {
|
|
886
885
|
const routeOptions = snapshotExecuteRouteOptions(options);
|
|
887
886
|
const isLocalProject = routeOptions.isLocalProject === true;
|
|
888
|
-
const isolationRequired =
|
|
889
|
-
!routeOptions.allowHostProjectCodeExecution;
|
|
887
|
+
const isolationRequired = !isHostRealmApiExecution(routeOptions.allowHostProjectCodeExecution);
|
|
890
888
|
const isolatedProjectDir = routeOptions.projectDir ?? projectDir;
|
|
891
889
|
// Routes without an explicit host-execution capability require prepared
|
|
892
890
|
// worker execution. Local development projects retain the legacy capability.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-handler.d.ts","sourceRoot":"","sources":["../../../../src/src/security/http/base-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,eAAe,EACf,aAAa,EACb,YAAY,EACb,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,6CAA6C,CAAC;AAErG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAKhF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,qBAAqB,EAAE,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,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K,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,IAAI;IAKhG,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIzE,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIzE,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;IAIjD,SAAS,CAAC,QAAQ,IAAI,aAAa;IAInC,SAAS,CAAC,OAAO,CACf,QAAQ,EAAE,QAAQ,GAAG,wBAAwB,EAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,aAAa;IAMhB,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAC1B,GAAG,EAAE,cAAc,EACnB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,GAAE;QACP,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,0BAA0B,CAAC,EAAE,iCAAiC,CAAC;KAC3D,GACL,OAAO,CAAC,CAAC,CAAC;CA4Gd"}
|
|
@@ -48,7 +48,6 @@ export class BaseHandler {
|
|
|
48
48
|
return new ResponseBuilder({
|
|
49
49
|
securityConfig: ctx.securityConfig ?? undefined,
|
|
50
50
|
isDev: isExplicitlyLocalProject(ctx),
|
|
51
|
-
cspUserHeader: ctx.cspUserHeader,
|
|
52
51
|
adapter: ctx.adapter,
|
|
53
52
|
nonce,
|
|
54
53
|
isVeryfrontDomain: ctx.parsedDomain?.allowIframeEmbed ?? false,
|
|
@@ -3,7 +3,6 @@ import type { SecurityConfig } from "../../types/index.js";
|
|
|
3
3
|
import type { VeryfrontConfig } from "../../config/index.js";
|
|
4
4
|
export interface DerivedSecurityContext {
|
|
5
5
|
securityConfig: SecurityConfig;
|
|
6
|
-
cspUserHeader: string | null;
|
|
7
6
|
}
|
|
8
7
|
export interface DeriveSecurityContextOptions {
|
|
9
8
|
/**
|
|
@@ -48,7 +47,6 @@ export declare class SecurityConfigLoader {
|
|
|
48
47
|
private configOverride?;
|
|
49
48
|
private productionRuntime;
|
|
50
49
|
private securityConfig;
|
|
51
|
-
private cspUserHeader;
|
|
52
50
|
private isLoaded;
|
|
53
51
|
private loadPromise;
|
|
54
52
|
constructor(projectDir: string, adapter: RuntimeAdapter, configOverride?: VeryfrontConfig | undefined, productionRuntime?: boolean);
|
|
@@ -56,7 +54,6 @@ export declare class SecurityConfigLoader {
|
|
|
56
54
|
private load;
|
|
57
55
|
private applyConfig;
|
|
58
56
|
getSecurityConfig(): SecurityConfig | null;
|
|
59
|
-
getCspUserHeader(): string | null;
|
|
60
57
|
getCorsConfig(): SecurityConfig["cors"];
|
|
61
58
|
buildCsp(isDev: boolean, nonce?: string): string;
|
|
62
59
|
getSecurityHeader(headerName: string, defaultValue: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/src/security/http/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQ7D,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/src/security/http/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MA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VeryfrontConfig } from "../../config/index.js";
|
|
2
2
|
import { serverLogger } from "../../utils/index.js";
|
|
3
|
-
import { buildCSP, generateNonce
|
|
3
|
+
import { buildCSP, generateNonce } from "./response/security-handler.js";
|
|
4
4
|
import { isProduction } from "../../platform/environment.js";
|
|
5
5
|
const logger = serverLogger.component("security-config-loader");
|
|
6
6
|
const MAX_SECURITY_CONFIG_DEPTH = 32;
|
|
@@ -231,7 +231,6 @@ export function deriveSecurityContext(cfg, options = {}) {
|
|
|
231
231
|
const securityConfig = Object.freeze(normalized);
|
|
232
232
|
return Object.freeze({
|
|
233
233
|
securityConfig,
|
|
234
|
-
cspUserHeader: serializeCSPDirectives(securityConfig.csp),
|
|
235
234
|
});
|
|
236
235
|
}
|
|
237
236
|
export class SecurityConfigLoader {
|
|
@@ -240,7 +239,6 @@ export class SecurityConfigLoader {
|
|
|
240
239
|
configOverride;
|
|
241
240
|
productionRuntime;
|
|
242
241
|
securityConfig = null;
|
|
243
|
-
cspUserHeader = null;
|
|
244
242
|
isLoaded = false;
|
|
245
243
|
loadPromise = null;
|
|
246
244
|
constructor(projectDir, adapter, configOverride, productionRuntime = false) {
|
|
@@ -285,20 +283,16 @@ export class SecurityConfigLoader {
|
|
|
285
283
|
"Consider explicitly configuring security.cors and security.csrf.");
|
|
286
284
|
}
|
|
287
285
|
this.securityConfig = security;
|
|
288
|
-
this.cspUserHeader = derived.cspUserHeader;
|
|
289
286
|
this.isLoaded = true;
|
|
290
287
|
}
|
|
291
288
|
getSecurityConfig() {
|
|
292
289
|
return this.securityConfig;
|
|
293
290
|
}
|
|
294
|
-
getCspUserHeader() {
|
|
295
|
-
return this.cspUserHeader;
|
|
296
|
-
}
|
|
297
291
|
getCorsConfig() {
|
|
298
292
|
return this.securityConfig?.cors;
|
|
299
293
|
}
|
|
300
294
|
buildCsp(isDev, nonce = generateNonce()) {
|
|
301
|
-
return buildCSP(isDev, nonce, this.
|
|
295
|
+
return buildCSP(isDev, nonce, this.securityConfig, this.adapter);
|
|
302
296
|
}
|
|
303
297
|
getSecurityHeader(headerName, defaultValue) {
|
|
304
298
|
const configKey = headerName.toLowerCase();
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical Content-Security-Policy directive names.
|
|
3
|
+
*
|
|
4
|
+
* Kept as a leaf module so both the policy builder and the config validator
|
|
5
|
+
* read the same list. A project that misspells a directive is told at config
|
|
6
|
+
* load rather than discovering it as a silently missing protection in
|
|
7
|
+
* production — an unrecognized directive name is ignored by browsers, so
|
|
8
|
+
* without this check `fontSource: [...]` would look configured and do nothing.
|
|
9
|
+
*
|
|
10
|
+
* @module security/http/csp-directives
|
|
11
|
+
*/
|
|
12
|
+
/** Every directive a project may name in `security.csp`. */
|
|
13
|
+
export declare const CSP_DIRECTIVE_NAMES: readonly string[];
|
|
14
|
+
/**
|
|
15
|
+
* A short, representative sample for error messages. Listing all 28 directives
|
|
16
|
+
* buries the fix; these are the ones projects actually reach for.
|
|
17
|
+
*/
|
|
18
|
+
export declare const EXAMPLE_CSP_DIRECTIVES: readonly string[];
|
|
19
|
+
/**
|
|
20
|
+
* Normalize a configured key to its directive name.
|
|
21
|
+
*
|
|
22
|
+
* `fontSrc` and `font-src` address the same directive; projects may write
|
|
23
|
+
* either, and camelCase matches the surrounding config style.
|
|
24
|
+
*/
|
|
25
|
+
export declare function toCspDirectiveName(key: string): string;
|
|
26
|
+
/** True when a configured key names a real CSP directive. */
|
|
27
|
+
export declare function isCspDirectiveName(key: string): boolean;
|
|
28
|
+
//# sourceMappingURL=csp-directives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csp-directives.d.ts","sourceRoot":"","sources":["../../../../src/src/security/http/csp-directives.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EA6B/C,CAAC;AAIH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAMlD,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEvD"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical Content-Security-Policy directive names.
|
|
3
|
+
*
|
|
4
|
+
* Kept as a leaf module so both the policy builder and the config validator
|
|
5
|
+
* read the same list. A project that misspells a directive is told at config
|
|
6
|
+
* load rather than discovering it as a silently missing protection in
|
|
7
|
+
* production — an unrecognized directive name is ignored by browsers, so
|
|
8
|
+
* without this check `fontSource: [...]` would look configured and do nothing.
|
|
9
|
+
*
|
|
10
|
+
* @module security/http/csp-directives
|
|
11
|
+
*/
|
|
12
|
+
/** Every directive a project may name in `security.csp`. */
|
|
13
|
+
export const CSP_DIRECTIVE_NAMES = Object.freeze([
|
|
14
|
+
"base-uri",
|
|
15
|
+
"block-all-mixed-content",
|
|
16
|
+
"child-src",
|
|
17
|
+
"connect-src",
|
|
18
|
+
"default-src",
|
|
19
|
+
"fenced-frame-src",
|
|
20
|
+
"font-src",
|
|
21
|
+
"form-action",
|
|
22
|
+
"frame-ancestors",
|
|
23
|
+
"frame-src",
|
|
24
|
+
"img-src",
|
|
25
|
+
"manifest-src",
|
|
26
|
+
"media-src",
|
|
27
|
+
"object-src",
|
|
28
|
+
"prefetch-src",
|
|
29
|
+
"report-to",
|
|
30
|
+
"report-uri",
|
|
31
|
+
"require-trusted-types-for",
|
|
32
|
+
"sandbox",
|
|
33
|
+
"script-src",
|
|
34
|
+
"script-src-attr",
|
|
35
|
+
"script-src-elem",
|
|
36
|
+
"style-src",
|
|
37
|
+
"style-src-attr",
|
|
38
|
+
"style-src-elem",
|
|
39
|
+
"trusted-types",
|
|
40
|
+
"upgrade-insecure-requests",
|
|
41
|
+
"worker-src",
|
|
42
|
+
]);
|
|
43
|
+
const CSP_DIRECTIVE_NAME_SET = new Set(CSP_DIRECTIVE_NAMES);
|
|
44
|
+
/**
|
|
45
|
+
* A short, representative sample for error messages. Listing all 28 directives
|
|
46
|
+
* buries the fix; these are the ones projects actually reach for.
|
|
47
|
+
*/
|
|
48
|
+
export const EXAMPLE_CSP_DIRECTIVES = Object.freeze([
|
|
49
|
+
"styleSrc",
|
|
50
|
+
"fontSrc",
|
|
51
|
+
"imgSrc",
|
|
52
|
+
"connectSrc",
|
|
53
|
+
"frameSrc",
|
|
54
|
+
]);
|
|
55
|
+
/**
|
|
56
|
+
* Normalize a configured key to its directive name.
|
|
57
|
+
*
|
|
58
|
+
* `fontSrc` and `font-src` address the same directive; projects may write
|
|
59
|
+
* either, and camelCase matches the surrounding config style.
|
|
60
|
+
*/
|
|
61
|
+
export function toCspDirectiveName(key) {
|
|
62
|
+
return key.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
|
|
63
|
+
}
|
|
64
|
+
/** True when a configured key names a real CSP directive. */
|
|
65
|
+
export function isCspDirectiveName(key) {
|
|
66
|
+
return CSP_DIRECTIVE_NAME_SET.has(toCspDirectiveName(key));
|
|
67
|
+
}
|
|
@@ -10,7 +10,6 @@ export declare class ResponseBuilder implements FluentMethodsContext, ResponseMe
|
|
|
10
10
|
securityConfig: SecurityConfig | null;
|
|
11
11
|
isDev: boolean;
|
|
12
12
|
nonce: string;
|
|
13
|
-
cspUserHeader: string | null;
|
|
14
13
|
adapter: import("../../../platform/adapters/base.js").RuntimeAdapter | undefined;
|
|
15
14
|
isVeryfrontDomain: boolean;
|
|
16
15
|
constructor(config?: ResponseBuilderConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../../src/src/security/http/response/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,KAAK,aA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Aa,qCAA+B;IAC5C,YAAY,oCAA8B;IAC1C,SAAS,iCAA2B;IACpC,QAAQ,gCAA0B;IAClC,WAAW,mCAA6B;IACxC,UAAU,kCAA4B;IACtC,SAAS,iCAA2B;IACpC,eAAe,uCAAiC;IAEhD,IAAI,8BAAwB;IAC5B,IAAI,8BAAwB;IAC5B,IAAI,8BAAwB;IAC5B,UAAU,oCAA8B;IACxC,eAAe,yCAAmC;IAClD,KAAK,+BAAyB;IAC9B,WAAW,qCAA+B;IAE1C,MAAM,CAAC,KAAK,6BAAuB;IACnC,MAAM,CAAC,IAAI,4BAAsB;IACjC,MAAM,CAAC,IAAI,4BAAsB;IACjC,MAAM,CAAC,SAAS,iCAA2B;IAC3C,MAAM,CAAC,MAAM,8BAAwB;CACtC;AASD,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,eAAe,CAErF"}
|
|
@@ -8,14 +8,12 @@ export class ResponseBuilder {
|
|
|
8
8
|
securityConfig;
|
|
9
9
|
isDev;
|
|
10
10
|
nonce;
|
|
11
|
-
cspUserHeader;
|
|
12
11
|
adapter;
|
|
13
12
|
isVeryfrontDomain;
|
|
14
13
|
constructor(config) {
|
|
15
14
|
this.securityConfig = config?.securityConfig ?? null;
|
|
16
15
|
this.isDev = config?.isDev ?? false;
|
|
17
16
|
this.nonce = config?.nonce ?? generateNonce();
|
|
18
|
-
this.cspUserHeader = config?.cspUserHeader ?? null;
|
|
19
17
|
this.adapter = config?.adapter;
|
|
20
18
|
this.isVeryfrontDomain = config?.isVeryfrontDomain ?? false;
|
|
21
19
|
}
|
|
@@ -8,7 +8,6 @@ export interface FluentMethodsContext {
|
|
|
8
8
|
securityConfig: SecurityConfig | null;
|
|
9
9
|
isDev: boolean;
|
|
10
10
|
nonce: string;
|
|
11
|
-
cspUserHeader: string | null;
|
|
12
11
|
adapter: import("../../../platform/adapters/base.js").RuntimeAdapter | undefined;
|
|
13
12
|
isVeryfrontDomain: boolean;
|
|
14
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluent-methods.d.ts","sourceRoot":"","sources":["../../../../../src/src/security/http/response/fluent-methods.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEhF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"fluent-methods.d.ts","sourceRoot":"","sources":["../../../../../src/src/security/http/response/fluent-methods.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEhF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,oCAAoC,EAAE,cAAc,GAAG,SAAS,CAAC;IACjF,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,gDAAgD;AAChD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,oBAAoB,EACrD,IAAI,EAAE,CAAC,EACP,GAAG,EAAE,OAAO,EACZ,UAAU,CAAC,EAAE,OAAO,GAAG,cAAc,GACpC,CAAC,CAOH;AAED,wCAAwC;AACxC,wBAAsB,aAAa,CAAC,CAAC,SAAS,oBAAoB,EAChE,IAAI,EAAE,CAAC,EACP,GAAG,EAAE,OAAO,GACX,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,CAAC,SAAS,oBAAoB,EACzD,IAAI,EAAE,CAAC,EACP,MAAM,CAAC,EAAE,cAAc,EACvB,GAAG,CAAC,EAAE,OAAO,GACZ,CAAC,CAcH;AAED,oDAAoD;AACpD,wBAAgB,SAAS,CAAC,CAAC,SAAS,oBAAoB,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,GAAG,CAAC,CAa7F;AAED,sBAAsB;AACtB,wBAAgB,QAAQ,CAAC,CAAC,SAAS,oBAAoB,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAGjF;AAED,yBAAyB;AACzB,wBAAgB,WAAW,CAAC,CAAC,SAAS,oBAAoB,EACxD,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5C,CAAC,CAUH;AAED,0BAA0B;AAC1B,wBAAgB,UAAU,CAAC,CAAC,SAAS,oBAAoB,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,CAGrF;AAED,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,CAAC,SAAS,oBAAoB,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAU1E;AAED,4CAA4C;AAC5C,wBAAgB,SAAS,CAAC,CAAC,SAAS,oBAAoB,EACtD,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GACzB,CAAC,CAKH"}
|
|
@@ -25,7 +25,7 @@ export async function withCORSAsync(req) {
|
|
|
25
25
|
}
|
|
26
26
|
/** Apply security headers (CSP, COOP, CORP, COEP) and optionally set CSRF cookie */
|
|
27
27
|
export function withSecurity(config, req) {
|
|
28
|
-
applySecurityHeaders(this.headers, this.isDev, this.nonce,
|
|
28
|
+
applySecurityHeaders(this.headers, this.isDev, this.nonce, config ?? this.securityConfig, this.adapter, this.isVeryfrontDomain);
|
|
29
29
|
if (req) {
|
|
30
30
|
const secConfig = config ?? this.securityConfig;
|
|
31
31
|
applyCsrfCookie(req, this.headers, secConfig?.csrf);
|
|
@@ -8,8 +8,16 @@ import type { SecurityConfig } from "./types.js";
|
|
|
8
8
|
export declare const SECURITY_POLICY_RESPONSE_HEADER_NAMES: readonly ["content-security-policy", "cross-origin-embedder-policy", "cross-origin-opener-policy", "cross-origin-resource-policy", "referrer-policy", "strict-transport-security", "x-content-type-options", "x-frame-options", "x-xss-protection"];
|
|
9
9
|
export declare function isSecurityPolicyResponseHeaderName(name: string): boolean;
|
|
10
10
|
export declare function generateNonce(): string;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Build the served policy: the platform floor with project sources merged in.
|
|
13
|
+
*
|
|
14
|
+
* The floor is enforced, not opt-in — hosting means a project that never
|
|
15
|
+
* configures anything still gets a baseline. Project configuration can only
|
|
16
|
+
* add to it, or drop the baseline class of a directive with `null`. Producing
|
|
17
|
+
* a policy that omits required sources needs `VERYFRONT_CSP`, an ops-level
|
|
18
|
+
* decision that is deliberately unreachable from project config.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildCSP(isDev: boolean, nonce: string, config?: SecurityConfig | null, adapter?: RuntimeAdapter, isVeryfrontDomain?: boolean): string;
|
|
13
21
|
export declare function getSecurityHeader(headerName: string, defaultValue: string, config?: SecurityConfig | null, adapter?: RuntimeAdapter): string;
|
|
14
|
-
export declare function applySecurityHeaders(headers: Headers, isDev: boolean, nonce: string,
|
|
22
|
+
export declare function applySecurityHeaders(headers: Headers, isDev: boolean, nonce: string, config?: SecurityConfig | null, adapter?: RuntimeAdapter, isVeryfrontDomain?: boolean): void;
|
|
15
23
|
//# sourceMappingURL=security-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-handler.d.ts","sourceRoot":"","sources":["../../../../../src/src/security/http/response/security-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"security-handler.d.ts","sourceRoot":"","sources":["../../../../../src/src/security/http/response/security-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAUzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAKjD;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,qPAYjD,CAAC;AAMF,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExE;AAQD,wBAAgB,aAAa,IAAI,MAAM,CAItC;AAwKD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,EAC9B,OAAO,CAAC,EAAE,cAAc,EACxB,iBAAiB,CAAC,EAAE,OAAO,GAC1B,MAAM,CAWR;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,MAAM,CAMR;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,EAC9B,OAAO,CAAC,EAAE,cAAc,EACxB,iBAAiB,CAAC,EAAE,OAAO,GAC1B,IAAI,CAqFN"}
|