@cotal-ai/auth 0.68.0 → 0.70.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/auth-service-contract.d.ts +2 -6
- package/dist/auth-service-contract.d.ts.map +1 -1
- package/dist/auth-service-contract.js +9 -15
- package/dist/auth-service-contract.js.map +1 -1
- package/dist/authority-client.d.ts +4 -4
- package/dist/authority-client.d.ts.map +1 -1
- package/dist/authority-client.js +5 -5
- package/dist/authority-client.js.map +1 -1
- package/dist/barrier-evict.d.ts +27 -5
- package/dist/barrier-evict.d.ts.map +1 -1
- package/dist/barrier-evict.js +9 -9
- package/dist/barrier-evict.js.map +1 -1
- package/dist/commands.js +1 -16
- package/dist/commands.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/ledger-scanner.d.ts.map +1 -1
- package/dist/ledger-scanner.js +2 -7
- package/dist/ledger-scanner.js.map +1 -1
- package/dist/login.d.ts +3 -2
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +19 -7
- package/dist/login.js.map +1 -1
- package/dist/managed-agent-enrollment.d.ts.map +1 -1
- package/dist/managed-agent-enrollment.js +18 -36
- package/dist/managed-agent-enrollment.js.map +1 -1
- package/dist/manager-admin-authorization.d.ts.map +1 -1
- package/dist/manager-admin-authorization.js +3 -18
- package/dist/manager-admin-authorization.js.map +1 -1
- package/dist/manager-authority.d.ts +18 -18
- package/dist/manager-authority.d.ts.map +1 -1
- package/dist/manager-authority.js +26 -29
- package/dist/manager-authority.js.map +1 -1
- package/dist/manager-contract.js +3 -3
- package/dist/manager-contract.js.map +1 -1
- package/dist/manager-goal-index.d.ts.map +1 -1
- package/dist/manager-goal-index.js +3 -20
- package/dist/manager-goal-index.js.map +1 -1
- package/dist/manager-maintenance.d.ts +1 -1
- package/dist/manager-maintenance.d.ts.map +1 -1
- package/dist/manager-maintenance.js +12 -9
- package/dist/manager-maintenance.js.map +1 -1
- package/dist/plane-claim.d.ts +12 -2
- package/dist/plane-claim.d.ts.map +1 -1
- package/dist/plane-claim.js +30 -23
- package/dist/plane-claim.js.map +1 -1
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +3 -24
- package/dist/provider.js.map +1 -1
- package/dist/records-scanner.d.ts.map +1 -1
- package/dist/records-scanner.js +3 -8
- package/dist/records-scanner.js.map +1 -1
- package/dist/retained-manager-validation.d.ts.map +1 -1
- package/dist/retained-manager-validation.js +4 -19
- package/dist/retained-manager-validation.js.map +1 -1
- package/dist/serialized.d.ts +8 -0
- package/dist/serialized.d.ts.map +1 -0
- package/dist/serialized.js +15 -0
- package/dist/serialized.js.map +1 -0
- package/dist/service.d.ts +16 -3
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +69 -72
- package/dist/service.js.map +1 -1
- package/dist/token.d.ts +0 -2
- package/dist/token.d.ts.map +1 -1
- package/dist/token.js +1 -1
- package/dist/token.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retained-manager-validation.js","sourceRoot":"","sources":["../src/retained-manager-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"retained-manager-validation.js","sourceRoot":"","sources":["../src/retained-manager-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,GAI3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,6BAA6B,EAA+B,MAAM,uBAAuB,CAAC;AAEnG;mFACmF;AACnF,MAAM,UAAU,qCAAqC,CACnD,M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AAU,qCAAqC,CACnD,CAAuC,EACvC,KAAa,EACb,SAAiC;IAEjC,IAAI,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,SAAS,CAAC,YAAY,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY;QAC9H,MAAM,IAAI,eAAe,CAAC,UAAU,EAAE,sFAAsF,CAAC,CAAC;IAChI,OAAO;QACL,CAAC,EAAE,CAAC;QACJ,IAAI,EAAE,mCAAmC;QACzC,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,KAAK;QACL,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,UAAU,EAAE,CAAC,CAAC,UAAU;QACxB,mBAAmB,EAAE,CAAC,CAAC,mBAAmB;QAC1C,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,iBAAiB,EAAE,CAAC,CAAC,iBAAiB;QACtC,UAAU,EAAE,CAAC,CAAC,UAAU;QACxB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,SAAS;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run `fn` after every earlier call on `key` in `chains` has settled, whatever it settled to. Each
|
|
3
|
+
* critical section passes its own module-level map, so separate sections never wait on each other.
|
|
4
|
+
* The last call off a key's chain removes the key, so a map keyed per agent or per space holds only
|
|
5
|
+
* the keys with work still queued.
|
|
6
|
+
*/
|
|
7
|
+
export declare function serializedFor<T>(chains: Map<string, Promise<unknown>>, key: string, fn: () => Promise<T>): Promise<T>;
|
|
8
|
+
//# sourceMappingURL=serialized.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized.d.ts","sourceRoot":"","sources":["../src/serialized.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAMrH"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run `fn` after every earlier call on `key` in `chains` has settled, whatever it settled to. Each
|
|
3
|
+
* critical section passes its own module-level map, so separate sections never wait on each other.
|
|
4
|
+
* The last call off a key's chain removes the key, so a map keyed per agent or per space holds only
|
|
5
|
+
* the keys with work still queued.
|
|
6
|
+
*/
|
|
7
|
+
export function serializedFor(chains, key, fn) {
|
|
8
|
+
const run = (chains.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
9
|
+
const tail = run.then(() => undefined, () => undefined);
|
|
10
|
+
chains.set(key, tail);
|
|
11
|
+
void tail.then(() => { if (chains.get(key) === tail)
|
|
12
|
+
chains.delete(key); });
|
|
13
|
+
return run;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=serialized.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized.js","sourceRoot":"","sources":["../src/serialized.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAI,MAAqC,EAAE,GAAW,EAAE,EAAoB;IACvG,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAChE,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACxD,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACtB,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/service.d.ts
CHANGED
|
@@ -150,6 +150,8 @@ export interface AuthAuthorityPlane {
|
|
|
150
150
|
* kept minting would look healthy while a successor reclaims its scanners). Never resolves on a
|
|
151
151
|
* clean close. */
|
|
152
152
|
fenced: Promise<string>;
|
|
153
|
+
/** Clean close (SPEC 13.13). Rejects when the plane did not release its claim; the barrier and
|
|
154
|
+
* the remaining clients still close. */
|
|
153
155
|
close(): Promise<void>;
|
|
154
156
|
}
|
|
155
157
|
type RemoteRetirementGate = Pick<EpGateState, "state" | "principal" | "processEpoch">;
|
|
@@ -180,6 +182,10 @@ export declare function openAuthAuthorityPlane(opts: {
|
|
|
180
182
|
space: string;
|
|
181
183
|
/** The provider state dir — the file-ledger connect arm reads it fresh per connect. */
|
|
182
184
|
dir: string;
|
|
185
|
+
/** The root whose space segment keeps the plane's restart identity: a CLI composition's workspace
|
|
186
|
+
* root, a hosted context's state dir. Never derived from `dir`, which for the CLI sits inside the
|
|
187
|
+
* `.cotal/auth` an operator copies to another root. */
|
|
188
|
+
identityRoot: string;
|
|
183
189
|
dataAccount: {
|
|
184
190
|
pub: string;
|
|
185
191
|
signingSeed: string;
|
|
@@ -301,7 +307,10 @@ export interface PlatformControlInput {
|
|
|
301
307
|
* installs no process signal handler, never exits the process, never selects a root from cwd,
|
|
302
308
|
* and has no local manager. It returns only after the authority plane, the callout subscription
|
|
303
309
|
* and the loopback listener are bound. A failed start releases what it acquired and throws. A
|
|
304
|
-
* mid-life fence or broker loss makes only this context `unavailable` and closes its resources.
|
|
310
|
+
* mid-life fence or broker loss makes only this context `unavailable` and closes its resources.
|
|
311
|
+
* `close()` rejects when the context did not release its plane claim (SPEC 13.13): the row was
|
|
312
|
+
* no longer its own, or the release write failed. The next start reclaims a row left held through
|
|
313
|
+
* the liveness oracle. */
|
|
305
314
|
export declare function startAuthService(inputs: HostedContextInputs & {
|
|
306
315
|
port?: number;
|
|
307
316
|
/** Absent: the handle has no `publicUrl` and nothing serves the discovery bundle. */
|
|
@@ -372,8 +381,9 @@ interface HandlerCtx {
|
|
|
372
381
|
selectManagerInstance: AuthAuthorityPlane["selectManagerInstance"];
|
|
373
382
|
verifySession: AuthAuthorityPlane["verifySession"];
|
|
374
383
|
}
|
|
384
|
+
type ManagerAuthorityDispatchCtx = Pick<HandlerCtx, "space" | "dir" | "secrets" | "managerServiceAuthority" | "maintainRemoteManager" | "validateRetainedAgent" | "enrollManagedAgent" | "prepareManagedAgentRetirement" | "scanManagerGoalIndex" | "authorizeManagerAdmin" | "admitManagerRun" | "issueManagerRunAttempt">;
|
|
375
385
|
/** Dispatch one already-authenticated manager-authority body through the fixed host validator. */
|
|
376
|
-
export declare function dispatchManagerAuthorityRequest(ctx:
|
|
386
|
+
export declare function dispatchManagerAuthorityRequest(ctx: ManagerAuthorityDispatchCtx, owner: string, body: {
|
|
377
387
|
request: unknown;
|
|
378
388
|
}): Promise<unknown>;
|
|
379
389
|
/** Per-listener policy for `POST /exchange` — how a caller is proven, attributed, and throttled on
|
|
@@ -399,9 +409,12 @@ interface ExchangePolicy {
|
|
|
399
409
|
/** Record a refused exchange against this face's budget (for `peer`). */
|
|
400
410
|
recordFailure(ctx: HandlerCtx, peer: string): void;
|
|
401
411
|
}
|
|
412
|
+
/** What {@link handleManagerServiceAuthority} reads. Exported so a host that serves the route with a
|
|
413
|
+
* context it builds itself is held by the compiler to every arm the dispatcher calls. */
|
|
414
|
+
export type ManagerServiceAuthorityCtx = ManagerAuthorityDispatchCtx & Pick<HandlerCtx, "cap" | "bridgeIdp" | "ownerSecret">;
|
|
402
415
|
/** Loopback/operator-only typed manager authority exchange. The public route table never includes
|
|
403
416
|
* this path, and the loopback capability is checked here in addition to the route separation. */
|
|
404
|
-
export declare function handleManagerServiceAuthority(req: IncomingMessage, res: ServerResponse, ctx:
|
|
417
|
+
export declare function handleManagerServiceAuthority(req: IncomingMessage, res: ServerResponse, ctx: ManagerServiceAuthorityCtx, policy: ExchangePolicy): Promise<void>;
|
|
405
418
|
/** The advertised broker address the public bundle carries — the URL participants will dial, so
|
|
406
419
|
* the same scheme family `cotal meshes add` accepts. Exported for the producer/consumer contract
|
|
407
420
|
* smoke; returns the refusal sentence, or undefined when the address is usable. */
|
package/dist/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAwDA,OAAO,EAAgB,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAKpF,OAAO,EAAq+C,KAAK,iBAAiB,EAAiB,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,yBAAyB,EAAE,KAAK,+BAA+B,EAAE,KAAK,8BAA8B,EAAE,KAAK,2BAA2B,EAAE,KAAK,mCAAmC,EAAE,KAAK,kCAAkC,EAAE,KAAK,0CAA0C,EAAE,KAAK,yCAAyC,EAAE,KAAK,sCAAsC,EAAE,KAAK,6BAA6B,EAAE,KAAK,+BAA+B,EAAE,KAAK,oCAAoC,EAAE,KAAK,WAAW,EAAgE,MAAM,gBAAgB,CAAC;AAChoE,OAAO,EAA4I,KAAK,mBAAmB,EAAyB,KAAK,mBAAmB,EAA2B,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAIjT,OAAO,EAA6F,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/J,OAAO,EAAmC,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAoD,KAAK,gBAAgB,EAAsB,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAElJ,OAAO,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAsB,KAAK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AG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB;;gGAE4F;IAC5F,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmB1B;AAED;;;mDAGmD;AACnD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAInG;AAED;;;cAGc;AACd,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUzE"}
|
package/dist/service.js
CHANGED
|
@@ -90,6 +90,7 @@ import { makeDeliveryAdminEvictor, makeDeliveryAdminHolderEvictor } from "./barr
|
|
|
90
90
|
import { resumeAgentRetirement, runAgentRetirementBarrier } from "./retirement-barrier.js";
|
|
91
91
|
import { makeRetirementCleaners } from "./retirement-cleaner.js";
|
|
92
92
|
import { makeDrainRepairers } from "./drain-repair.js";
|
|
93
|
+
import { serializedFor } from "./serialized.js";
|
|
93
94
|
import { joinOrStartRetirement, openAuthAdminListener } from "./auth-admin.js";
|
|
94
95
|
import { AUTH_SERVICE_ENDPOINT, authClusterArtifacts, authContractArtifactValues } from "./auth-service-contract.js";
|
|
95
96
|
import { drainTargetForEndpoint, openAdmissionMediator } from "./admission-mediator.js";
|
|
@@ -122,20 +123,12 @@ const PUBLIC_PEER_BUCKETS_MAX = 1024; // bounded LRU of per-peer failure buckets
|
|
|
122
123
|
const PUBLIC_MAX_IN_FLIGHT = 64; // global concurrent-admission cap on the public listener
|
|
123
124
|
const PUBLIC_DEADLINE_MS = 10_000; // hard wall-clock deadline per public request
|
|
124
125
|
const HOST_FENCE_POLL_MS = 1_000; // how often awaitHostFence re-reads the host gate
|
|
125
|
-
const OBSERVED_RUN_REQUEST_WINDOW_MS = 5 * 60_000; // how long an observed served
|
|
126
|
+
const OBSERVED_RUN_REQUEST_WINDOW_MS = 5 * 60_000; // how long an observed served run request can still be forwarded
|
|
126
127
|
/** Enrollment and retirement preparation of one managed agent run one at a time, so neither acts on
|
|
127
128
|
* a grant the other is still writing or releasing. The chain lives at module level, keyed by the
|
|
128
129
|
* ledger directory, so two plane instances over one ledger share it. */
|
|
129
130
|
const MANAGED_ALIAS_CHAINS = new Map();
|
|
130
|
-
const serializedForAlias = (dir, owner, actor, fn) => {
|
|
131
|
-
const key = `${resolve(dir)}:${principalKey(owner, actor).key}`;
|
|
132
|
-
const run = (MANAGED_ALIAS_CHAINS.get(key) ?? Promise.resolve()).then(fn, fn);
|
|
133
|
-
const tail = run.then(() => undefined, () => undefined);
|
|
134
|
-
MANAGED_ALIAS_CHAINS.set(key, tail);
|
|
135
|
-
void tail.then(() => { if (MANAGED_ALIAS_CHAINS.get(key) === tail)
|
|
136
|
-
MANAGED_ALIAS_CHAINS.delete(key); });
|
|
137
|
-
return run;
|
|
138
|
-
};
|
|
131
|
+
const serializedForAlias = (dir, owner, actor, fn) => serializedFor(MANAGED_ALIAS_CHAINS, `${resolve(dir)}:${principalKey(owner, actor).key}`, fn);
|
|
139
132
|
/** Package-internal policy step for the hosted retirement requester. The HTTP production door calls
|
|
140
133
|
* this after deriving the owner and manager actors; broker-free smokes exercise the same decision. */
|
|
141
134
|
export function authorizeRemoteManagerRetirement(args) {
|
|
@@ -223,15 +216,15 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
223
216
|
}
|
|
224
217
|
// #399 M2: register the auth plane itself as an ordinary `auth` service endpoint — the SAME
|
|
225
218
|
// §13.7 registration ceremony the manager runs (`manager.ts:6562-6690`), before the listener
|
|
226
|
-
// below serves a single request. The persisted instance id + serve nkey (
|
|
227
|
-
//
|
|
219
|
+
// below serves a single request. The persisted instance id + serve nkey (in `identityRoot`,
|
|
220
|
+
// hardened the way the manager's own instance identity is) so a restart re-registers the
|
|
228
221
|
// SAME instance: `registerServiceInstance` advances the process epoch on a re-registration and
|
|
229
222
|
// fences the predecessor; a first registration stays at epoch 0.
|
|
230
223
|
let authServeInstanceId;
|
|
231
224
|
let authServeGrant;
|
|
232
225
|
try {
|
|
233
|
-
const persisted = loadAuthInstanceIdentity(opts.
|
|
234
|
-
const authIdentity = persisted ?? createAuthInstanceIdentity(opts.
|
|
226
|
+
const persisted = loadAuthInstanceIdentity(opts.identityRoot, space);
|
|
227
|
+
const authIdentity = persisted ?? createAuthInstanceIdentity(opts.identityRoot, space, {
|
|
235
228
|
instanceId: mintLifecycleUid(),
|
|
236
229
|
serveIdentity: newIdentity(),
|
|
237
230
|
});
|
|
@@ -310,6 +303,9 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
310
303
|
let recordsScanner;
|
|
311
304
|
let barrierReg;
|
|
312
305
|
let closing = false;
|
|
306
|
+
// A failed open throws its own error, so a release failing on the way out is only logged: the
|
|
307
|
+
// row stays held and the next open reclaims it like a crash.
|
|
308
|
+
const releaseAfterFailedOpen = async () => hold?.release().catch((r) => log(r.message));
|
|
313
309
|
// The plane-fatal channel (fact HIGH: a fenced plane must never keep serving): the mid-life
|
|
314
310
|
// fence resolves it, every authority operation refuses from then on, and the composition root
|
|
315
311
|
// downs the daemon. A clean close never resolves it.
|
|
@@ -349,7 +345,7 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
349
345
|
closing = true;
|
|
350
346
|
await recordsCand?.close();
|
|
351
347
|
await ledgerCand?.close();
|
|
352
|
-
await
|
|
348
|
+
await releaseAfterFailedOpen();
|
|
353
349
|
await barrier?.close();
|
|
354
350
|
await remoteIssuer.close();
|
|
355
351
|
await reader.close();
|
|
@@ -415,7 +411,7 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
415
411
|
closing = true;
|
|
416
412
|
await recordsScanner.close();
|
|
417
413
|
await scanner.close();
|
|
418
|
-
await
|
|
414
|
+
await releaseAfterFailedOpen();
|
|
419
415
|
await barrier.close();
|
|
420
416
|
await remoteIssuer.close();
|
|
421
417
|
await reader.close();
|
|
@@ -438,7 +434,7 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
438
434
|
closing = true;
|
|
439
435
|
await recordsScanner.close();
|
|
440
436
|
await scanner.close();
|
|
441
|
-
await
|
|
437
|
+
await releaseAfterFailedOpen();
|
|
442
438
|
await barrier.close();
|
|
443
439
|
await remoteIssuer.close();
|
|
444
440
|
await reader.close();
|
|
@@ -552,8 +548,8 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
552
548
|
if (fatalReason !== undefined)
|
|
553
549
|
throw new EpEnvelopeError("unavailable", `the auth service for space "${space}" is momentarily unavailable (it detected a fault and is restarting); retry shortly`);
|
|
554
550
|
};
|
|
555
|
-
// The
|
|
556
|
-
//
|
|
551
|
+
// The plane holds only the data account's signing key. The operator and system halves stay blank
|
|
552
|
+
// because core's mint reads only the space, the account pub and the signing seed.
|
|
557
553
|
const issuerAuth = () => ({
|
|
558
554
|
space,
|
|
559
555
|
operator: { seed: "", jwt: "" },
|
|
@@ -563,10 +559,11 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
563
559
|
// The source check the issuing host resolves with: an actor-ledger row is attested here, from the
|
|
564
560
|
// ledger this service owns; every other coordinate goes to core's check (SPEC 13.15).
|
|
565
561
|
const composedSourceIsLive = (session) => (source) => parseActorLedgerSource(source) ? Promise.resolve(ledgerActorSourceIsLive(opts.dir)(source)) : session.sourceIsLive(source);
|
|
566
|
-
// A served resume or answer
|
|
567
|
-
//
|
|
568
|
-
// are the manager's word. The manager
|
|
569
|
-
//
|
|
562
|
+
// A served run-start is admitted, and a served resume or answer issued, only for a request this
|
|
563
|
+
// host saw its caller publish, and only once; a resume or answer only for what that request's
|
|
564
|
+
// envelope asked (SPEC 14.8): the forward's coordinates are the manager's word. The manager
|
|
565
|
+
// forwards from inside the handler serving the request, so an observation older than the window
|
|
566
|
+
// has no forward left to bind; the window also bounds the table.
|
|
570
567
|
const observedRunRequests = new Map();
|
|
571
568
|
for (const subject of servedRunRequestSubjects(space))
|
|
572
569
|
remoteIssuer.nc.subscribe(subject, {
|
|
@@ -748,6 +745,7 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
748
745
|
}),
|
|
749
746
|
issue: async ({ actors, request: r }) => {
|
|
750
747
|
const signer = { space, account: dataAccount };
|
|
748
|
+
const registration = { space: r.space, instanceId: r.instanceId, lifecycleUid: r.managerLifecycleUid, identities: r.identities };
|
|
751
749
|
const credential = async (key, profile, actor, opts) => mintPublicUserJwt(signer, r.identities[key].id, profile, { ...opts, principal: { owner, actor }, lifecycleUid: r.managerLifecycleUid });
|
|
752
750
|
const credentials = {};
|
|
753
751
|
const siblingOn = (gate, observed) => async (key, profile, actor) => {
|
|
@@ -795,7 +793,7 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
795
793
|
});
|
|
796
794
|
}
|
|
797
795
|
if (r.operation === "session") {
|
|
798
|
-
const expectedProof = remoteManagerRegistrationProof(owner,
|
|
796
|
+
const expectedProof = remoteManagerRegistrationProof(owner, registration);
|
|
799
797
|
if (r.registrationProof !== expectedProof)
|
|
800
798
|
throw new EpEnvelopeError("permission-denied", "manager-service session proof does not match this owner/lifecycle");
|
|
801
799
|
const session = r.session;
|
|
@@ -809,14 +807,14 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
809
807
|
return { credentials };
|
|
810
808
|
}
|
|
811
809
|
if (r.operation === "transferReader") {
|
|
812
|
-
const expectedProof = remoteManagerRegistrationProof(owner,
|
|
810
|
+
const expectedProof = remoteManagerRegistrationProof(owner, registration);
|
|
813
811
|
if (r.registrationProof !== expectedProof)
|
|
814
812
|
throw new EpEnvelopeError("permission-denied", "manager-service transfer reader proof does not match this owner/lifecycle");
|
|
815
813
|
credentials.transferReader = await mintPublicUserJwt(signer, r.transferReader.id, "transfer-reader", { principal: { owner, actor: actors.serve }, lifecycleUid: r.managerLifecycleUid, transferReader: { instanceId: r.instanceId } });
|
|
816
814
|
return { credentials };
|
|
817
815
|
}
|
|
818
816
|
if (r.operation === "retire") {
|
|
819
|
-
const expectedProof = remoteManagerRegistrationProof(owner,
|
|
817
|
+
const expectedProof = remoteManagerRegistrationProof(owner, registration);
|
|
820
818
|
if (r.registrationProof !== expectedProof)
|
|
821
819
|
throw new EpEnvelopeError("permission-denied", "manager-service retirement proof does not match this owner/lifecycle");
|
|
822
820
|
const retirement = r.retirement;
|
|
@@ -904,7 +902,7 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
904
902
|
return { credentials };
|
|
905
903
|
}
|
|
906
904
|
if (r.operation === "activate") {
|
|
907
|
-
const expectedProof = remoteManagerRegistrationProof(owner, r);
|
|
905
|
+
const expectedProof = remoteManagerRegistrationProof(owner, registration, r.contractArtifacts);
|
|
908
906
|
if (r.registrationProof !== expectedProof)
|
|
909
907
|
throw new EpEnvelopeError("permission-denied", "manager-service registration proof does not match this owner/lifecycle/artifact set");
|
|
910
908
|
// The serve JWT is issued from the registered-surface snapshot the participant
|
|
@@ -947,20 +945,14 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
947
945
|
scanner,
|
|
948
946
|
observeManagerGate,
|
|
949
947
|
});
|
|
950
|
-
const
|
|
948
|
+
const evictHolders = makeDeliveryAdminHolderEvictor({ space, server, dataAccount, log });
|
|
951
949
|
if (authorized.operation === "evict-family-principal") {
|
|
952
|
-
const
|
|
953
|
-
return completeRemoteManagerMaintenance(authorized, owner, {
|
|
950
|
+
const evictions = await evictHolders(authorized.principals);
|
|
951
|
+
return completeRemoteManagerMaintenance(authorized, owner, { evictions });
|
|
954
952
|
}
|
|
955
953
|
const principalOracle = makeDeliveryAdminPrincipalOracle({ space, server, dataAccount, log });
|
|
956
954
|
const executorIdentity = newIdentity();
|
|
957
|
-
const
|
|
958
|
-
space,
|
|
959
|
-
operator: { seed: "", jwt: "" },
|
|
960
|
-
account: { pub: dataAccount.pub, seed: "", jwt: "", signingSeed: dataAccount.signingSeed, signingPub: "" },
|
|
961
|
-
sys: { pub: "", jwt: "" },
|
|
962
|
-
};
|
|
963
|
-
const executorCreds = await mintCreds(hostAuth, executorIdentity, "endpoint-serve-executor", {
|
|
955
|
+
const executorCreds = await mintCreds(issuerAuth(), executorIdentity, "endpoint-serve-executor", {
|
|
964
956
|
endpointServeExecutor: { endpoint: "manager", instanceId: authorized.targetInstanceId },
|
|
965
957
|
expiresInSeconds: 60,
|
|
966
958
|
});
|
|
@@ -982,7 +974,7 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
982
974
|
const result = await principalOracle(principal);
|
|
983
975
|
return { state: result.state, detail: result.note ?? `delivery-daemon principal sweep, sweepComplete=${String(result.sweepComplete)}` };
|
|
984
976
|
},
|
|
985
|
-
evictHolders:
|
|
977
|
+
evictHolders: async (holders) => (await evictHolders(holders)).map((e) => e.verifiedGone),
|
|
986
978
|
log,
|
|
987
979
|
});
|
|
988
980
|
}
|
|
@@ -1176,17 +1168,11 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
1176
1168
|
const { owner } = holder;
|
|
1177
1169
|
requireManagerAuthorityHolder(holder, String(request?.instanceId), 'manager run admission needs scope "supervise"; spawn/admin do not imply it');
|
|
1178
1170
|
const runId = parseRemoteRunAdmissionRequest(request).run.runId;
|
|
1179
|
-
|
|
1180
|
-
space,
|
|
1181
|
-
operator: { seed: "", jwt: "" },
|
|
1182
|
-
account: { pub: dataAccount.pub, seed: "", jwt: "", signingSeed: dataAccount.signingSeed, signingPub: "" },
|
|
1183
|
-
sys: { pub: "", jwt: "" },
|
|
1184
|
-
};
|
|
1185
|
-
return withIssuerSession({ servers: server, space, auth: hostAuth, tls: false }, async (session) => {
|
|
1171
|
+
return withIssuerSession({ servers: server, space, auth: issuerAuth(), tls: false }, async (session) => {
|
|
1186
1172
|
const admitterNc = await connect({
|
|
1187
1173
|
servers: server,
|
|
1188
1174
|
...standaloneConnectOpts({
|
|
1189
|
-
creds: await mintCreds(
|
|
1175
|
+
creds: await mintCreds(issuerAuth(), newIdentity(), "run-admitter", { runAdmitter: { endpoint: "manager", runId }, expiresInSeconds: 60 }),
|
|
1190
1176
|
tls: false,
|
|
1191
1177
|
}),
|
|
1192
1178
|
maxReconnectAttempts: 0,
|
|
@@ -1197,6 +1183,7 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
1197
1183
|
observeManagerGate,
|
|
1198
1184
|
issued: session.store,
|
|
1199
1185
|
sourceIsLive: composedSourceIsLive(session),
|
|
1186
|
+
takeObserved: takeObservedRunRequest,
|
|
1200
1187
|
admissions: await new Kvm(admitterNc).open(admissionBucket(space)),
|
|
1201
1188
|
});
|
|
1202
1189
|
}
|
|
@@ -1262,21 +1249,15 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
1262
1249
|
const grant = req.attempt?.served !== undefined || req.operator?.served !== undefined
|
|
1263
1250
|
? await withIssuerSession({ servers: server, space, auth: issuerAuth(), tls: false }, (session) => authorize(session))
|
|
1264
1251
|
: await authorize();
|
|
1265
|
-
const hostAuth = {
|
|
1266
|
-
space,
|
|
1267
|
-
operator: { seed: "", jwt: "" },
|
|
1268
|
-
account: { pub: dataAccount.pub, seed: "", jwt: "", signingSeed: dataAccount.signingSeed, signingPub: "" },
|
|
1269
|
-
sys: { pub: "", jwt: "" },
|
|
1270
|
-
};
|
|
1271
1252
|
if (grant.kind === "attempt") {
|
|
1272
1253
|
const caller = runDriverCaller(grant.driver.runDriver.runId, owner);
|
|
1273
|
-
const driver = await mintPublicUserJwt(
|
|
1254
|
+
const driver = await mintPublicUserJwt(issuerAuth(), grant.driver.id, "run-driver", {
|
|
1274
1255
|
principal: { owner, actor: caller.actor },
|
|
1275
1256
|
lifecycleUid: req.managerLifecycleUid,
|
|
1276
1257
|
runDriver: grant.driver.runDriver,
|
|
1277
1258
|
expiresInSeconds: standingTtl,
|
|
1278
1259
|
});
|
|
1279
|
-
const mediator = await mintPublicUserJwt(
|
|
1260
|
+
const mediator = await mintPublicUserJwt(issuerAuth(), grant.mediator.id, "run-mediator", {
|
|
1280
1261
|
principal: { owner, actor: caller.actor },
|
|
1281
1262
|
lifecycleUid: req.managerLifecycleUid,
|
|
1282
1263
|
runMediator: grant.mediator.runMediator,
|
|
@@ -1299,7 +1280,7 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
1299
1280
|
credentials: { driver, mediator },
|
|
1300
1281
|
};
|
|
1301
1282
|
}
|
|
1302
|
-
const operator = await mintPublicUserJwt(
|
|
1283
|
+
const operator = await mintPublicUserJwt(issuerAuth(), grant.operator.id, "run-operator", {
|
|
1303
1284
|
principal: { owner, actor: req.actor },
|
|
1304
1285
|
lifecycleUid: req.managerLifecycleUid,
|
|
1305
1286
|
runOperator: grant.operator.runOperator,
|
|
@@ -1361,10 +1342,14 @@ export async function openAuthAuthorityPlane(opts) {
|
|
|
1361
1342
|
await reader.close();
|
|
1362
1343
|
await recordsScanner.close();
|
|
1363
1344
|
await scanner.close();
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1345
|
+
try {
|
|
1346
|
+
await hold.release();
|
|
1347
|
+
}
|
|
1348
|
+
finally {
|
|
1349
|
+
await barrier.close();
|
|
1350
|
+
await remoteIssuer.close();
|
|
1351
|
+
await writer.close();
|
|
1352
|
+
}
|
|
1368
1353
|
},
|
|
1369
1354
|
};
|
|
1370
1355
|
}
|
|
@@ -1501,6 +1486,7 @@ export async function runAuthService(args, store) {
|
|
|
1501
1486
|
server,
|
|
1502
1487
|
port,
|
|
1503
1488
|
dir,
|
|
1489
|
+
identityRoot: root,
|
|
1504
1490
|
secrets,
|
|
1505
1491
|
hostedStore: store !== undefined,
|
|
1506
1492
|
...(publicFace !== undefined ? { publicFace } : {}),
|
|
@@ -1515,7 +1501,13 @@ export async function runAuthService(args, store) {
|
|
|
1515
1501
|
// The CLI wrapper, not the context, owns process signals and exit codes.
|
|
1516
1502
|
const stop = async () => {
|
|
1517
1503
|
clearAuthServiceInfo(dir); // a dead service must not satisfy the next start's readiness poll
|
|
1518
|
-
|
|
1504
|
+
try {
|
|
1505
|
+
await started.handle.close();
|
|
1506
|
+
}
|
|
1507
|
+
catch (e) {
|
|
1508
|
+
console.error(`✗ auth-service: ${e.message} - exiting`);
|
|
1509
|
+
process.exit(1);
|
|
1510
|
+
}
|
|
1519
1511
|
process.exit(0);
|
|
1520
1512
|
};
|
|
1521
1513
|
process.on("SIGINT", () => void stop());
|
|
@@ -1542,7 +1534,10 @@ export async function runAuthService(args, store) {
|
|
|
1542
1534
|
* installs no process signal handler, never exits the process, never selects a root from cwd,
|
|
1543
1535
|
* and has no local manager. It returns only after the authority plane, the callout subscription
|
|
1544
1536
|
* and the loopback listener are bound. A failed start releases what it acquired and throws. A
|
|
1545
|
-
* mid-life fence or broker loss makes only this context `unavailable` and closes its resources.
|
|
1537
|
+
* mid-life fence or broker loss makes only this context `unavailable` and closes its resources.
|
|
1538
|
+
* `close()` rejects when the context did not release its plane claim (SPEC 13.13): the row was
|
|
1539
|
+
* no longer its own, or the release write failed. The next start reclaims a row left held through
|
|
1540
|
+
* the liveness oracle. */
|
|
1546
1541
|
export async function startAuthService(inputs) {
|
|
1547
1542
|
if (!inputs.context?.accountPublicKey || !inputs.context.lifecycleUid || !inputs.space || !inputs.servers || !inputs.stateDir)
|
|
1548
1543
|
throw new Error("auth-service: hosted context needs an account, lifecycle, space, server and stateDir");
|
|
@@ -1570,6 +1565,7 @@ export async function startAuthService(inputs) {
|
|
|
1570
1565
|
server: inputs.servers,
|
|
1571
1566
|
port,
|
|
1572
1567
|
dir: resolve(inputs.stateDir),
|
|
1568
|
+
identityRoot: resolve(inputs.stateDir),
|
|
1573
1569
|
secrets: inputs.store,
|
|
1574
1570
|
hostedStore: true,
|
|
1575
1571
|
localManager: () => undefined,
|
|
@@ -1578,7 +1574,7 @@ export async function startAuthService(inputs) {
|
|
|
1578
1574
|
...(inputs.platformControl !== undefined ? { platformControl: inputs.platformControl } : {}),
|
|
1579
1575
|
...(inputs.standingRenewableTtlSeconds !== undefined ? { standingRenewableTtlSeconds: inputs.standingRenewableTtlSeconds } : {}),
|
|
1580
1576
|
});
|
|
1581
|
-
return started.handle;
|
|
1577
|
+
return { ...started.handle, readiness: () => ({ ...started.status(), context: inputs.context }) };
|
|
1582
1578
|
}
|
|
1583
1579
|
async function startAuthContext(o) {
|
|
1584
1580
|
const { space, server, dir, secrets, port } = o;
|
|
@@ -1609,6 +1605,7 @@ async function startAuthContext(o) {
|
|
|
1609
1605
|
server,
|
|
1610
1606
|
space,
|
|
1611
1607
|
dir,
|
|
1608
|
+
identityRoot: o.identityRoot,
|
|
1612
1609
|
dataAccount: { pub: keys.dataAccount.pub, signingSeed: keys.dataAccount.signingSeed },
|
|
1613
1610
|
log: (l) => console.error(l),
|
|
1614
1611
|
localManager: o.localManager,
|
|
@@ -1751,8 +1748,12 @@ async function startAuthContext(o) {
|
|
|
1751
1748
|
closePromise = (async () => {
|
|
1752
1749
|
await Promise.all([closeServer(http), closeServer(publicHttp)]);
|
|
1753
1750
|
await reader?.client.then((c) => c.close(), () => { });
|
|
1754
|
-
|
|
1755
|
-
|
|
1751
|
+
try {
|
|
1752
|
+
await plane.close();
|
|
1753
|
+
}
|
|
1754
|
+
finally {
|
|
1755
|
+
await callNc.close();
|
|
1756
|
+
}
|
|
1756
1757
|
})();
|
|
1757
1758
|
return closePromise;
|
|
1758
1759
|
};
|
|
@@ -1764,11 +1765,11 @@ async function startAuthContext(o) {
|
|
|
1764
1765
|
if (end.kind === "fenced" || end.cause !== undefined || closePromise === undefined) {
|
|
1765
1766
|
state = "unavailable";
|
|
1766
1767
|
cause = end.kind === "fenced" ? end.cause : `broker connection closed${end.cause !== undefined ? ` (${end.cause})` : ""}`;
|
|
1767
|
-
|
|
1768
|
+
// A later close() returns this same promise, so its failure still reaches the host.
|
|
1769
|
+
close().catch(() => { });
|
|
1768
1770
|
}
|
|
1769
1771
|
return end;
|
|
1770
1772
|
});
|
|
1771
|
-
const context = o.context ?? { accountPublicKey: keys.dataAccount.pub, lifecycleUid: "" };
|
|
1772
1773
|
const platformControl = o.platformControl;
|
|
1773
1774
|
const host = platformControl?.host;
|
|
1774
1775
|
// The human route's retained-validation composition, for the platform holder.
|
|
@@ -1871,15 +1872,11 @@ async function startAuthContext(o) {
|
|
|
1871
1872
|
}
|
|
1872
1873
|
},
|
|
1873
1874
|
} : {}),
|
|
1874
|
-
readiness() {
|
|
1875
|
-
if (state === "unavailable")
|
|
1876
|
-
return { state, context, cause: cause ?? "auth-service context is unavailable" };
|
|
1877
|
-
return { state: closePromise === undefined ? "ready" : "draining", context };
|
|
1878
|
-
},
|
|
1879
1875
|
drain: close,
|
|
1880
1876
|
close,
|
|
1881
1877
|
};
|
|
1882
|
-
|
|
1878
|
+
const status = () => state === "unavailable" ? { state, cause: cause ?? "auth-service context is unavailable" } : { state: closePromise === undefined ? "ready" : "draining" };
|
|
1879
|
+
return { handle: service, status, ended };
|
|
1883
1880
|
}
|
|
1884
1881
|
catch (e) {
|
|
1885
1882
|
// A failed start releases only what THIS context acquired, in reverse order.
|