@synopackageland/cli 0.53.1 → 0.53.3
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/CHANGELOG.md +10 -0
- package/dist/runtime/approval-diff.d.ts +5 -0
- package/dist/runtime/approval-diff.js +19 -4
- package/dist/standalone/daemon-ingress.d.ts +1 -11
- package/dist/standalone/daemon-ingress.js +2 -15
- package/dist/standalone/inspect-spk.d.ts +2 -0
- package/dist/standalone/inspect-spk.js +17 -7
- package/dist/standalone/resource.d.ts +7 -0
- package/dist/standalone/resource.js +34 -3
- package/docs/daemon.md +3 -2
- package/docs/path-ingress.md +22 -0
- package/package.json +1 -1
- package/skills/reference/approval-upgrades.md +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.53.3 (2026-11-10)
|
|
4
|
+
|
|
5
|
+
- Accept exact released Portal ingress resource contracts when inspecting an approval baseline, including daemon and identity gateway SPKs built before their Portal `www` registration was introduced. Current SPKs still require the current resource contract; extra workers, duplicate registrations, changed file paths and invalid payload or executor pins still fail inspection.
|
|
6
|
+
- Include archived DSM `resource_changes` in build/inspect approval JSON and text. Adding an ingress registration, including Portal `www` on ports 80/443, reports `permissions: expanded` and `retention: required` even when executor policy and tasks are unchanged; other resource changes require review.
|
|
7
|
+
|
|
8
|
+
## 0.53.2 (2026-11-10)
|
|
9
|
+
|
|
10
|
+
- Enable identity gateway path ingress on the Application Portal default web server (80/443) when the App declares `portal`, including custom paths, OIDC, header login, entry gates and upstream API/share routes. All path ingress resources share the same Portal registration rule and nginx files; Apps without a portal or path ingress and dedicated-port listeners retain their behavior.
|
|
11
|
+
- Let `inspect` recognize the fixed ingress ownership check before Portal lifecycle hooks, while retaining exact resource and conflict-check validation.
|
|
12
|
+
|
|
3
13
|
## 0.53.1 (2026-11-10)
|
|
4
14
|
|
|
5
15
|
- Fix daemon RPCs returning 404 when an App with `daemon.ingress` opens through its Application Portal alias on DSM's default web server (80/443). The build now also enables `daemon/ingress-nginx.conf` as `nginx-static-config` `type: www` for Apps that declare `portal`; the location, socket, headers and limits are the same file as on the DSM ports. Apps without `portal`, and Apps without `daemon.ingress`, keep an unchanged `conf/resource`.
|
|
@@ -30,6 +30,11 @@ export interface ApprovalDifference {
|
|
|
30
30
|
old: unknown;
|
|
31
31
|
new: unknown;
|
|
32
32
|
}>;
|
|
33
|
+
resource_changes?: Array<{
|
|
34
|
+
path: string;
|
|
35
|
+
old: unknown;
|
|
36
|
+
new: unknown;
|
|
37
|
+
}>;
|
|
33
38
|
reason: string;
|
|
34
39
|
}
|
|
35
40
|
export declare function approvalDiff(old: ApprovalInventory | undefined, next: ApprovalInventory | undefined): ApprovalDifference;
|
|
@@ -47,6 +47,22 @@ function noApproval(r) {
|
|
|
47
47
|
function notRequired() {
|
|
48
48
|
return { retention: 'not-required', permissions: 'unchanged', executor_only: false, task_template_changed: false, root_programs: [], policy_changes: [], reason: 'No SDK administrator approval is required: this verified package has no executor or approval-requiring capability.' };
|
|
49
49
|
}
|
|
50
|
+
/** Resource registration changes are authority changes, even with identical executor pins. */
|
|
51
|
+
function resourceDiff(old, next, diff) {
|
|
52
|
+
if (!next.dsm.ok || next.findings.length || !old.synopkgland || !next.synopkgland || old.package !== next.package || old.arch !== next.arch)
|
|
53
|
+
return diff;
|
|
54
|
+
const resource_changes = changes(old.resources ?? {}, next.resources ?? {});
|
|
55
|
+
if (!resource_changes.length)
|
|
56
|
+
return diff;
|
|
57
|
+
const ingress = (r) => (r.resources?.['web-config']?.['nginx-static-config']?.enable ?? []);
|
|
58
|
+
const previous = new Set(ingress(old).map(canonical));
|
|
59
|
+
const expanded = ingress(next).some(entry => !previous.has(canonical(entry)));
|
|
60
|
+
return { ...diff, resource_changes, retention: 'required', executor_only: false,
|
|
61
|
+
permissions: expanded || diff.permissions === 'expanded' ? 'expanded' : 'review-required',
|
|
62
|
+
reason: expanded
|
|
63
|
+
? 'Administrator review and reapproval are required: nginx-static-config gained an ingress registration (including Portal www on ports 80/443). Unchanged executor pins do not approve wider access.'
|
|
64
|
+
: 'Administrator review and reapproval are required for changed DSM resource registrations.' };
|
|
65
|
+
}
|
|
50
66
|
export async function spkApprovalDiff(current, baseline, report) {
|
|
51
67
|
const nextReport = report ?? await inspectAnySpk(current);
|
|
52
68
|
if (!baseline)
|
|
@@ -55,11 +71,10 @@ export async function spkApprovalDiff(current, baseline, report) {
|
|
|
55
71
|
const old = await inspectAnySpk(baseline, { baseline: true });
|
|
56
72
|
if (!old.dsm.ok || old.findings.length)
|
|
57
73
|
throw new Error('[APPROVAL_BASELINE_INVALID] Baseline SPK failed inspection: ' + [...old.findings, ...old.dsm.errors.map(e => e.message)].join('; '));
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return approvalDiff(inventory(old), next);
|
|
74
|
+
const diff = old.package === nextReport.package && old.arch === nextReport.arch && noApproval(old) && noApproval(nextReport) ? notRequired() : approvalDiff(inventory(old), next);
|
|
75
|
+
return resourceDiff(old, nextReport, diff);
|
|
61
76
|
}
|
|
62
77
|
export function formatApprovalDiff(d) {
|
|
63
78
|
const short = (s) => s?.slice(0, 12) ?? '—';
|
|
64
|
-
return ['Approval: ' + d.reason, 'Permissions: ' + d.permissions, ...d.root_programs.map(p => `Root program ${p.name}: ${short(p.old)} → ${short(p.new)}`), ...d.policy_changes.map(c => `Policy ${c.path}: ${JSON.stringify(c.old)} → ${JSON.stringify(c.new)}`), `Task template: ${d.task_template_changed === null ? 'unknown' : d.task_template_changed ? 'changed' : 'unchanged'}`, `Executor-only handover: ${d.executor_only ? 'eligible under the INFO anchor' : 'not established'}`].join('\n');
|
|
79
|
+
return ['Approval: ' + d.reason, 'Permissions: ' + d.permissions, ...d.root_programs.map(p => `Root program ${p.name}: ${short(p.old)} → ${short(p.new)}`), ...d.policy_changes.map(c => `Policy ${c.path}: ${JSON.stringify(c.old)} → ${JSON.stringify(c.new)}`), ...(d.resource_changes ?? []).map(c => `Resource ${c.path}: ${JSON.stringify(c.old)} → ${JSON.stringify(c.new)}`), `Task template: ${d.task_template_changed === null ? 'unknown' : d.task_template_changed ? 'changed' : 'unchanged'}`, `Executor-only handover: ${d.executor_only ? 'eligible under the INFO anchor' : 'not established'}`].join('\n');
|
|
65
80
|
}
|
|
@@ -14,17 +14,7 @@ export declare function daemonIngressMinDsmProblem(osMinVer: string | undefined)
|
|
|
14
14
|
export declare const daemonIngressSocket: (pkg: string) => string;
|
|
15
15
|
/** What the daemon learns: where to listen and which path prefix it serves. */
|
|
16
16
|
export declare function ingressEnv(pkg: string, ingress: DaemonIngress): Record<string, string>;
|
|
17
|
-
|
|
18
|
-
* DSM's web-config worker includes a `type: dsm` file only in the DSM server
|
|
19
|
-
* blocks (ports 5000/5001 and the DSM custom domain). An Application Portal
|
|
20
|
-
* alias such as `https://<nas>/<alias>/` lives in the default server (80/443),
|
|
21
|
-
* which includes only `type: www` files, so the App loaded there would get 404
|
|
22
|
-
* from its own daemon. With a portal the same location is also enabled for the
|
|
23
|
-
* default server; the path and proxy rules stay identical. The portal mustache
|
|
24
|
-
* cannot carry it: DSM renders that inside the alias location, where nginx
|
|
25
|
-
* refuses a location outside `/<alias>/`.
|
|
26
|
-
*/
|
|
27
|
-
export declare function daemonIngressResource(portal?: boolean): Record<string, unknown>;
|
|
17
|
+
export declare function daemonIngressResource(): Record<string, unknown>;
|
|
28
18
|
/**
|
|
29
19
|
* Included in DSM's own server blocks, and with a portal in the default
|
|
30
20
|
* server too. Streaming responses (SSE) pass
|
|
@@ -38,21 +38,8 @@ function checkedIngressPath(pkg, ingress) {
|
|
|
38
38
|
export function ingressEnv(pkg, ingress) {
|
|
39
39
|
return { SYNOPKGLAND_INGRESS_PATH: checkedIngressPath(pkg, ingress), SYNOPKGLAND_INGRESS_SOCKET: daemonIngressSocket(pkg) };
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* blocks (ports 5000/5001 and the DSM custom domain). An Application Portal
|
|
44
|
-
* alias such as `https://<nas>/<alias>/` lives in the default server (80/443),
|
|
45
|
-
* which includes only `type: www` files, so the App loaded there would get 404
|
|
46
|
-
* from its own daemon. With a portal the same location is also enabled for the
|
|
47
|
-
* default server; the path and proxy rules stay identical. The portal mustache
|
|
48
|
-
* cannot carry it: DSM renders that inside the alias location, where nginx
|
|
49
|
-
* refuses a location outside `/<alias>/`.
|
|
50
|
-
*/
|
|
51
|
-
export function daemonIngressResource(portal = false) {
|
|
52
|
-
return { "nginx-static-config": { enable: [
|
|
53
|
-
{ type: "dsm", relpath: DAEMON_INGRESS_CONFIG },
|
|
54
|
-
...(portal ? [{ type: "www", relpath: DAEMON_INGRESS_CONFIG }] : []),
|
|
55
|
-
] } };
|
|
41
|
+
export function daemonIngressResource() {
|
|
42
|
+
return { "nginx-static-config": { enable: [{ type: "dsm", relpath: DAEMON_INGRESS_CONFIG }] } };
|
|
56
43
|
}
|
|
57
44
|
/**
|
|
58
45
|
* Included in DSM's own server blocks, and with a portal in the default
|
|
@@ -13,6 +13,8 @@ import type { EntryMode } from "./manifest.js";
|
|
|
13
13
|
import { type UninstallCleanupItem } from "../runtime/uninstall-cleanup.js";
|
|
14
14
|
export type SpkKind = "native-go" | "native-python" | "native-node" | "native-rust" | "binary" | "container" | "native-layout";
|
|
15
15
|
export interface SpkInspection {
|
|
16
|
+
/** Declaration-checked DSM worker registrations, preserved as archived. */
|
|
17
|
+
resources?: Record<string, unknown>;
|
|
16
18
|
publicUi?: PublicUiReport;
|
|
17
19
|
/** Archived DSM language -> native section -> sorted keys (no text values). */
|
|
18
20
|
nativeTexts?: Record<string, Record<string, string[]>>;
|
|
@@ -46,7 +46,7 @@ import { readUninstallRecord, stateItemTexts } from "./uninstall.js";
|
|
|
46
46
|
import { DSM_LANGS } from "./i18n.js";
|
|
47
47
|
import { BACKGROUND_UNIT_DIR, BACKGROUND_WORKER_PAYLOAD, BRIDGE_WORKER_ARGS, backgroundUnitName, renderBackgroundUnit, } from "./background.js";
|
|
48
48
|
import { matchesComposeWorkerResource } from '../build-spk/resource-worker.js';
|
|
49
|
-
import { renderStandaloneResource } from "./resource.js";
|
|
49
|
+
import { matchesStandaloneResource, renderStandaloneResource } from "./resource.js";
|
|
50
50
|
import { recoverSharedFolder, renderUpgradeWizardFiles, sharedFolderInstallSteps, SHARED_FOLDER_MARKER, } from "./shared-folder.js";
|
|
51
51
|
import { renderInstallWizardFiles, integrationWizardSteps, renderNativeInstallWizard, } from "../build-spk/install-wizard.js";
|
|
52
52
|
import { renderDelegateScopeSteps, } from "../build-spk/delegate-scope.js";
|
|
@@ -270,7 +270,7 @@ export async function inspectSpk(spkPath, expectedKind, options = {}) {
|
|
|
270
270
|
!isDsmAtLeast(info.os_min_ver, PORTAL_MIN_DSM)) {
|
|
271
271
|
findings.push(`INFO os_min_ver "${info.os_min_ver}" is below the DSM ${PORTAL_MIN_DSM} a portal needs; ${PORTAL_MIN_DSM_REASON}`);
|
|
272
272
|
}
|
|
273
|
-
checkConf(dir, findings, kind, background, sharedFolder, info.package, portal, combined?.compose, nativeGateway, info.os_min_ver, daemonIngress, Boolean(metadata.installPorts), daemonNoFile);
|
|
273
|
+
const resources = checkConf(dir, findings, kind, background, sharedFolder, info.package, portal, combined?.compose, nativeGateway, info.os_min_ver, daemonIngress, Boolean(metadata.installPorts), daemonNoFile, options.baseline);
|
|
274
274
|
checkScripts(dir, findings);
|
|
275
275
|
checkUninstall(dir, findings);
|
|
276
276
|
if (kind === "container")
|
|
@@ -364,6 +364,7 @@ export async function inspectSpk(spkPath, expectedKind, options = {}) {
|
|
|
364
364
|
findings.push(`${CGI_PAYLOAD_PATH} has mode ${cgiEntry.mode}; it should be 0755`);
|
|
365
365
|
}
|
|
366
366
|
return {
|
|
367
|
+
...(resources ? { resources } : {}),
|
|
367
368
|
...(dependencies ? { dependencies } : {}),
|
|
368
369
|
kind,
|
|
369
370
|
...(nativeTexts ? { nativeTexts } : {}),
|
|
@@ -1396,7 +1397,7 @@ async function recoverDaemonIngress(dir, value, info, paths, findings) {
|
|
|
1396
1397
|
return undefined;
|
|
1397
1398
|
}
|
|
1398
1399
|
}
|
|
1399
|
-
function checkConf(dir, findings, kind, background, sharedFolder, pkg, portal, compose, nativeGateway, osMinVer, daemonIngress, installPorts = false, nofile) {
|
|
1400
|
+
function checkConf(dir, findings, kind, background, sharedFolder, pkg, portal, compose, nativeGateway, osMinVer, daemonIngress, installPorts = false, nofile, baseline = false) {
|
|
1400
1401
|
const confDir = join(dir, "conf");
|
|
1401
1402
|
const entries = existsSync(confDir) ? readdirSync(confDir) : [];
|
|
1402
1403
|
const nativeResource = kind !== "container"
|
|
@@ -1413,9 +1414,11 @@ function checkConf(dir, findings, kind, background, sharedFolder, pkg, portal, c
|
|
|
1413
1414
|
...(daemonIngress ? { daemon: { ingress: daemonIngress } } : {}),
|
|
1414
1415
|
}, portal)
|
|
1415
1416
|
: undefined;
|
|
1417
|
+
const actualResource = readOptional(join(confDir, "resource"));
|
|
1418
|
+
const resourceMatches = matchesStandaloneResource(actualResource, nativeResource, baseline);
|
|
1416
1419
|
if (nativeResource !== undefined &&
|
|
1417
|
-
|
|
1418
|
-
findings.push(`conf/resource must be ${nativeResource} (only the official data-share, systemd-user-unit and web-config, and consistent with the install.sharedFolder and portal declarations)`);
|
|
1420
|
+
!resourceMatches) {
|
|
1421
|
+
findings.push(`conf/resource must be ${nativeResource}${baseline ? ' or an exact released resource contract' : ''} (only the official data-share, systemd-user-unit and web-config, and consistent with the install.sharedFolder and portal declarations)`);
|
|
1419
1422
|
}
|
|
1420
1423
|
for (const name of entries) {
|
|
1421
1424
|
if (name !== "privilege" &&
|
|
@@ -1484,6 +1487,8 @@ function checkConf(dir, findings, kind, background, sharedFolder, pkg, portal, c
|
|
|
1484
1487
|
findings.push(`conf/privilege requires ${key} (root or extra group privileges)`);
|
|
1485
1488
|
}
|
|
1486
1489
|
}
|
|
1490
|
+
if (resourceMatches && actualResource)
|
|
1491
|
+
return JSON.parse(actualResource);
|
|
1487
1492
|
}
|
|
1488
1493
|
/** The opt-in package user unit must be exactly what the generator writes. */
|
|
1489
1494
|
function checkBackground(dir, info, payload, findings, executor, daemon, bridge = false, lifecycleTimeouts, nativeGateway, installPorts = false) {
|
|
@@ -1734,10 +1739,15 @@ async function recoverPortal(dir, info, appId, paths, payload, findings, nativeG
|
|
|
1734
1739
|
os_min_ver: info.os_min_ver,
|
|
1735
1740
|
identityGateway: nativeGateway,
|
|
1736
1741
|
}, hook);
|
|
1742
|
+
const ingressCheck = renderGatewayIngressCheck({
|
|
1743
|
+
package: info.package,
|
|
1744
|
+
os_min_ver: info.os_min_ver,
|
|
1745
|
+
identityGateway: nativeGateway,
|
|
1746
|
+
}, hook);
|
|
1737
1747
|
const script = readOptional(join(dir, "scripts", hook));
|
|
1738
|
-
// The fixed
|
|
1748
|
+
// The fixed ingress ownership check and diagnostics precede preparation;
|
|
1739
1749
|
// released scripts can still start directly with preparation.
|
|
1740
|
-
if (![diagnostic, ""].some(prefix => script?.startsWith(`#!/bin/sh\n${prefix}${prepare}${renderPortalLifecycle(hook, portal)}`)))
|
|
1750
|
+
if (![diagnostic, ""].some(prefix => script?.startsWith(`#!/bin/sh\n${ingressCheck}${prefix}${prepare}${renderPortalLifecycle(hook, portal)}`)))
|
|
1741
1751
|
throw new Error(hook);
|
|
1742
1752
|
}
|
|
1743
1753
|
return portal;
|
|
@@ -4,6 +4,13 @@ import { type SharedFolder } from "./shared-folder.js";
|
|
|
4
4
|
import { type PortalPackage } from "../portal/package.js";
|
|
5
5
|
import { type NativeGatewayPlan } from './native-gateway.js';
|
|
6
6
|
import { type DaemonIngress } from "./daemon-ingress.js";
|
|
7
|
+
/**
|
|
8
|
+
* Validate a baseline against the released resource contracts. Never skip the
|
|
9
|
+
* comparison: the only historical differences are the Portal www registrations
|
|
10
|
+
* introduced first for daemon ingress, then for identity gateway ingress.
|
|
11
|
+
* Exact serialized matching also rejects extra keys, entries and duplicates.
|
|
12
|
+
*/
|
|
13
|
+
export declare function matchesStandaloneResource(actual: string | undefined, current: string | undefined, baseline?: boolean): boolean;
|
|
7
14
|
/**
|
|
8
15
|
* `conf/resource` for a native package: only DSM's official `data-share`,
|
|
9
16
|
* `systemd-user-unit` and `web-config` workers, in a fixed key order.
|
|
@@ -2,7 +2,32 @@ import { renderDockerProjectResource } from "../build-spk/resource-worker.js";
|
|
|
2
2
|
import { sharedFolderResource } from "./shared-folder.js";
|
|
3
3
|
import { portalResource } from "../portal/package.js";
|
|
4
4
|
import { nativeGatewayResource } from './native-gateway.js';
|
|
5
|
-
import { daemonIngressResource } from "./daemon-ingress.js";
|
|
5
|
+
import { DAEMON_INGRESS_CONFIG, daemonIngressResource } from "./daemon-ingress.js";
|
|
6
|
+
/**
|
|
7
|
+
* Validate a baseline against the released resource contracts. Never skip the
|
|
8
|
+
* comparison: the only historical differences are the Portal www registrations
|
|
9
|
+
* introduced first for daemon ingress, then for identity gateway ingress.
|
|
10
|
+
* Exact serialized matching also rejects extra keys, entries and duplicates.
|
|
11
|
+
*/
|
|
12
|
+
export function matchesStandaloneResource(actual, current, baseline = false) {
|
|
13
|
+
if (actual === current)
|
|
14
|
+
return true;
|
|
15
|
+
if (!baseline || !actual || !current)
|
|
16
|
+
return false;
|
|
17
|
+
const resource = JSON.parse(current);
|
|
18
|
+
const web = resource['web-config'];
|
|
19
|
+
const entries = web?.['nginx-static-config']?.enable;
|
|
20
|
+
if (!web?.['app-portal'] || !entries)
|
|
21
|
+
return false;
|
|
22
|
+
// Released contracts, in order: no www, daemon www only, all path ingress www.
|
|
23
|
+
// The current contract was already checked above. Keep every other byte and
|
|
24
|
+
// the declaration-derived file paths intact, including dedicated listeners.
|
|
25
|
+
return [false, true].some(daemonWww => {
|
|
26
|
+
const historical = structuredClone(resource);
|
|
27
|
+
historical['web-config']['nginx-static-config'].enable = entries.filter(e => e.type !== 'www' || (daemonWww && e.relpath === DAEMON_INGRESS_CONFIG));
|
|
28
|
+
return actual === JSON.stringify(historical);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
6
31
|
/**
|
|
7
32
|
* `conf/resource` for a native package: only DSM's official `data-share`,
|
|
8
33
|
* `systemd-user-unit` and `web-config` workers, in a fixed key order.
|
|
@@ -10,8 +35,14 @@ import { daemonIngressResource } from "./daemon-ingress.js";
|
|
|
10
35
|
*/
|
|
11
36
|
export function renderStandaloneResource(m, portal) {
|
|
12
37
|
const dataShare = m.sharedFolder && sharedFolderResource(m.package, m.sharedFolder);
|
|
13
|
-
|
|
14
|
-
|
|
38
|
+
// DSM includes `dsm` locations on 5000/5001 and `www` locations on 80/443,
|
|
39
|
+
// where Application Portal aliases live. Enable the same file on both for
|
|
40
|
+
// every path ingress of a portal App; dedicated-port `server` entries stay
|
|
41
|
+
// independent. The portal mustache is nested inside the alias location and
|
|
42
|
+
// cannot carry these sibling locations.
|
|
43
|
+
const nginx = [nativeGatewayResource(m), m.daemon?.ingress && daemonIngressResource()]
|
|
44
|
+
.flatMap((r) => r?.["nginx-static-config"]?.enable ?? [])
|
|
45
|
+
.flatMap((entry) => portal && entry.type === "dsm" ? [entry, { ...entry, type: "www" }] : [entry]);
|
|
15
46
|
const webConfig = { ...(portal ? portalResource()['web-config'] : {}),
|
|
16
47
|
...(nginx.length ? { 'nginx-static-config': { enable: nginx } } : {}) };
|
|
17
48
|
const resource = {
|
package/docs/daemon.md
CHANGED
|
@@ -203,7 +203,8 @@ The build adds DSM's `web-config` resource:
|
|
|
203
203
|
```
|
|
204
204
|
|
|
205
205
|
With `portal`, the same file is also enabled as `type: www`, next to the
|
|
206
|
-
`app-portal` entry
|
|
206
|
+
`app-portal` entry. This rule applies to every generated path ingress,
|
|
207
|
+
including [identity gateway and custom paths](path-ingress.md#application-portal):
|
|
207
208
|
|
|
208
209
|
```json
|
|
209
210
|
{"web-config":{"app-portal":{"json-relpath":"etc/portal.json","mustache-relpath":"etc/portal.mustache"},"nginx-static-config":{"enable":[{"type":"dsm","relpath":"daemon/ingress-nginx.conf"},{"type":"www","relpath":"daemon/ingress-nginx.conf"}]}}}
|
|
@@ -218,7 +219,7 @@ portal mustache stays DSM's CGI partial: DSM renders it inside the alias
|
|
|
218
219
|
location, where nginx refuses a location outside `/<alias>/`. Apps without a
|
|
219
220
|
portal keep the `dsm` entry alone, so their daemon is not reachable on 80/443.
|
|
220
221
|
A portal alias that an administrator moves to its own port or domain is a
|
|
221
|
-
separate server block;
|
|
222
|
+
separate server block; the CLI does not add the ingress there.
|
|
222
223
|
|
|
223
224
|
`daemon.ingress.path` must be exactly `/synopkgland/<package>/`, where
|
|
224
225
|
`<package>` is the manifest's case-sensitive package ID. For `package: MyApp`,
|
package/docs/path-ingress.md
CHANGED
|
@@ -114,6 +114,28 @@ package and check both the active nginx location and an authenticated browser
|
|
|
114
114
|
navigation. Include anonymous denial, the original entry policy and upstream
|
|
115
115
|
assets/API calls; a successful install response alone is insufficient.
|
|
116
116
|
|
|
117
|
+
## Application Portal
|
|
118
|
+
|
|
119
|
+
With `portal`, every generated path ingress is also registered as `type: www`
|
|
120
|
+
using the same nginx configuration file. This covers identity gateway routes
|
|
121
|
+
(OIDC, header login, the entry gate and upstream API/share paths), explicit
|
|
122
|
+
custom paths and daemon RPC ingress. The DSM server (5000/5001 and its custom
|
|
123
|
+
domain) and the default web server (80/443) therefore use identical locations,
|
|
124
|
+
socket authentication, headers and limits. An App opened through an alias such
|
|
125
|
+
as `https://<host>/<alias>/` can reach its declared ingress on the same origin.
|
|
126
|
+
|
|
127
|
+
Without `portal`, path ingress remains DSM-only. A portal without path ingress
|
|
128
|
+
adds no nginx location. Dedicated App ports remain independent `type: server`
|
|
129
|
+
resources. Portal aliases on their own administrator-selected port or domain
|
|
130
|
+
use a separate server block; the CLI does not add path ingress to that block.
|
|
131
|
+
|
|
132
|
+
The portal mustache stays DSM's CGI partial. Authentication and entry policies
|
|
133
|
+
apply on both servers: anonymous requests still receive the gateway's sign-in
|
|
134
|
+
gate or the daemon's `session_required` response. Only the declared path is
|
|
135
|
+
registered; the bare `/synopkgland/` prefix and other packages' namespaces are
|
|
136
|
+
not exposed by this App. Custom paths retain the same installation ownership
|
|
137
|
+
and conflict checks.
|
|
138
|
+
|
|
117
139
|
## Apps requiring HTTPS
|
|
118
140
|
|
|
119
141
|
With the latest CLI and SDK, declare `identity_gateway.secure_context: required`
|
package/package.json
CHANGED
|
@@ -39,3 +39,25 @@ Baseline comparison reads historical wizard files as archived data. It does not
|
|
|
39
39
|
replay the current wizard renderer against them. Archive integrity, package
|
|
40
40
|
identity, privilege/resources, lifecycle and executor authority remain checked.
|
|
41
41
|
The current SPK receives the normal current-format inspection.
|
|
42
|
+
|
|
43
|
+
Baseline resource inspection accepts the exact contracts emitted by released
|
|
44
|
+
renderers, including Portal path ingress registered on DSM ports alone. It
|
|
45
|
+
checks the archived registration against its declared files and workers; it does
|
|
46
|
+
not require a historical App to contain a newly introduced Portal `www` entry.
|
|
47
|
+
Current SPKs still require the current resource contract. Extra workers, foreign
|
|
48
|
+
paths, duplicate registrations and changes to fixed ingress files remain invalid.
|
|
49
|
+
The existing archive, payload checksum, executor digest/INFO anchor, ownership
|
|
50
|
+
and lifecycle checks remain in force. Unsigned packages have no cryptographic
|
|
51
|
+
provenance for `conf/resource`; compatibility recognizes released contracts, not
|
|
52
|
+
a claim about which CLI binary produced them.
|
|
53
|
+
|
|
54
|
+
JSON `resource_changes` and text `Resource` lines show the old and new DSM
|
|
55
|
+
registrations. Adding an ingress registration, including `www` for the same
|
|
56
|
+
ingress file, is `permissions: expanded` and `retention: required`: the default
|
|
57
|
+
web server on ports 80/443 adds an access surface beyond the DSM server. The
|
|
58
|
+
report requires administrator review and reapproval even with identical executor
|
|
59
|
+
policy and task pins. For Apps without an executor, this means administrator
|
|
60
|
+
review of the ingress change before release; it does not invent an SDK approval
|
|
61
|
+
task. Other resource changes are conservatively `review-required` and `required`.
|
|
62
|
+
An unchanged resource follows the existing executor approval rules. The offline
|
|
63
|
+
report does not apply an alias, approve a task or change runtime authorization.
|