agent-comms 4.4.0 → 4.5.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +5 -1
- package/dist/core/agent-registry.d.ts.map +1 -1
- package/dist/core/agent-registry.js +2 -0
- package/dist/core/agent-registry.js.map +1 -1
- package/dist/core/bridge-mesh.d.ts.map +1 -1
- package/dist/core/bridge-mesh.js +1 -0
- package/dist/core/bridge-mesh.js.map +1 -1
- package/dist/core/device-membership-verification.d.ts +2 -1
- package/dist/core/device-membership-verification.d.ts.map +1 -1
- package/dist/core/device-membership-verification.js +1 -1
- package/dist/core/device-membership-verification.js.map +1 -1
- package/dist/core/device-membership.d.ts +2 -0
- package/dist/core/device-membership.d.ts.map +1 -1
- package/dist/core/device-membership.js +9 -5
- package/dist/core/device-membership.js.map +1 -1
- package/dist/core/directory-admission.d.ts +20 -0
- package/dist/core/directory-admission.d.ts.map +1 -0
- package/dist/core/directory-admission.js +88 -0
- package/dist/core/directory-admission.js.map +1 -0
- package/dist/core/gateway-trust-actions.d.ts +1 -1
- package/dist/core/gateway-trust-actions.d.ts.map +1 -1
- package/dist/core/gateway-trust-actions.js +5 -1
- package/dist/core/gateway-trust-actions.js.map +1 -1
- package/dist/core/gateway-trust.d.ts +14 -2
- package/dist/core/gateway-trust.d.ts.map +1 -1
- package/dist/core/gateway-trust.js +40 -2
- package/dist/core/gateway-trust.js.map +1 -1
- package/dist/core/gossip-directory.d.ts +2 -0
- package/dist/core/gossip-directory.d.ts.map +1 -1
- package/dist/core/gossip-directory.js +9 -0
- package/dist/core/gossip-directory.js.map +1 -1
- package/dist/core/gossip-extensions.d.ts +2 -0
- package/dist/core/gossip-extensions.d.ts.map +1 -1
- package/dist/core/hub-session.d.ts +3 -3
- package/dist/core/hub-session.d.ts.map +1 -1
- package/dist/core/hub-session.js +6 -4
- package/dist/core/hub-session.js.map +1 -1
- package/dist/core/membership-proof.d.ts +45 -0
- package/dist/core/membership-proof.d.ts.map +1 -0
- package/dist/core/membership-proof.js +59 -0
- package/dist/core/membership-proof.js.map +1 -0
- package/dist/core/membership-proofs.d.ts +34 -0
- package/dist/core/membership-proofs.d.ts.map +1 -0
- package/dist/core/membership-proofs.js +66 -0
- package/dist/core/membership-proofs.js.map +1 -0
- package/dist/core/mesh-store.d.ts +8 -0
- package/dist/core/mesh-store.d.ts.map +1 -1
- package/dist/core/mesh-store.js +18 -3
- package/dist/core/mesh-store.js.map +1 -1
- package/dist/core/tool.d.ts +5 -0
- package/dist/core/tool.d.ts.map +1 -1
- package/dist/core/tool.js.map +1 -1
- package/dist/core/wire-mesh-transport-options.d.ts +12 -0
- package/dist/core/wire-mesh-transport-options.d.ts.map +1 -1
- package/dist/core/wire-mesh-transport.d.ts +1 -1
- package/dist/core/wire-mesh-transport.d.ts.map +1 -1
- package/dist/core/wire-mesh-transport.js +5 -5
- package/dist/core/wire-mesh-transport.js.map +1 -1
- package/dist/test/directory-admission.unit.test.d.ts +2 -0
- package/dist/test/directory-admission.unit.test.d.ts.map +1 -0
- package/dist/test/directory-admission.unit.test.js +182 -0
- package/dist/test/directory-admission.unit.test.js.map +1 -0
- package/dist/test/dm-grant-tool.integration.test.js +2 -1
- package/dist/test/dm-grant-tool.integration.test.js.map +1 -1
- package/dist/test/gateway-trust-tool.integration.test.js +22 -0
- package/dist/test/gateway-trust-tool.integration.test.js.map +1 -1
- package/dist/test/gateway-trust.unit.test.js +82 -1
- package/dist/test/gateway-trust.unit.test.js.map +1 -1
- package/dist/test/membership-proof.unit.test.d.ts +2 -0
- package/dist/test/membership-proof.unit.test.d.ts.map +1 -0
- package/dist/test/membership-proof.unit.test.js +148 -0
- package/dist/test/membership-proof.unit.test.js.map +1 -0
- package/dist/test/principal-membership-trust.integration.test.d.ts +5 -0
- package/dist/test/principal-membership-trust.integration.test.d.ts.map +1 -0
- package/dist/test/principal-membership-trust.integration.test.js +169 -0
- package/dist/test/principal-membership-trust.integration.test.js.map +1 -0
- package/dist/test/test-transport.d.ts.map +1 -1
- package/dist/test/test-transport.js +1 -0
- package/dist/test/test-transport.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/ExaDev/agent-comms)
|
|
4
4
|
[](https://www.npmjs.com/package/agent-comms)
|
|
5
|
-
[](https://github.com/ExaDev/agent-comms/releases/tag/v4.5.0)
|
|
6
6
|
[](https://github.com/ExaDev/agent-comms/actions)
|
|
7
7
|
|
|
8
8
|
Cross-harness communication mesh for LLM agents: rooms, DMs, presence, and visibility over TCP with zero filesystem dependencies.
|
|
@@ -380,6 +380,10 @@ agent_comms({ action: "gateway_untrust", device: "1a2b3c..." })
|
|
|
380
380
|
agent_comms({ action: "gateway_list_trusted" })
|
|
381
381
|
```
|
|
382
382
|
|
|
383
|
+
Trusting a principal covers every device that person runs, so each of their sessions doesn't need adding one by one. Every bridge gossips a short-lived proof, signed by its account's user identity, that it belongs to that principal. A gateway that trusts the principal verifies the proof and then lets that device appear in `list_agents` and be sent requests, until the proof lapses or you untrust the principal. `gateway_list_trusted` shows such devices with the principal that vouches for each.
|
|
384
|
+
|
|
385
|
+
Three limits are worth knowing. A proof says the principal vouches for a device id, not that whoever gossips it is that device: anyone connected to the hub can read and repeat one, so it is only enough to be listed and routed to, never to have relayed frames accepted as trusted, and every request to the device is still authenticated end to end. Proofs can't be revoked, only left to expire, so removing a device from an account doesn't stop it while it still holds the account's key. And a proof names the principal in the clear, so anyone on the hub can see which devices belong to the same person.
|
|
386
|
+
|
|
383
387
|
The device-id itself normally has to be learned out of band (Slack, email, a phone call) before it can be pasted into `gateway_trust`. A connection code is a single-use, short-lived artifact that makes that hand-off itself verifiable instead of a bare, unauthenticated string:
|
|
384
388
|
|
|
385
389
|
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-registry.d.ts","sourceRoot":"","sources":["../../src/core/agent-registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE5D,sSAAsS;AACtS,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACnC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,aAAa,CAAC;IACtC,cAAc,EAAE,IAAI,CAClB,cAAc,EACZ,MAAM,GACN,gBAAgB,GAChB,qBAAqB,GACrB,yBAAyB,CAC5B,CAAC;CACH;
|
|
1
|
+
{"version":3,"file":"agent-registry.d.ts","sourceRoot":"","sources":["../../src/core/agent-registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE5D,sSAAsS;AACtS,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACnC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,aAAa,CAAC;IACtC,cAA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8 @@ function isAgentSelfAdvert(value) {
|
|
|
21
21
|
return false;
|
|
22
22
|
if (!("subscribedRooms" in value) || !Array.isArray(value.subscribedRooms))
|
|
23
23
|
return false;
|
|
24
|
+
if ("membership" in value && typeof value.membership !== "string")
|
|
25
|
+
return false;
|
|
24
26
|
return true;
|
|
25
27
|
}
|
|
26
28
|
export class AgentRegistry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-registry.js","sourceRoot":"","sources":["../../src/core/agent-registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAmBzC,8YAA8Y;AAC9Y,SAAS,iBAAiB,CAAC,KAAc;IACvC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACvE,IAAI,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC7E,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACrE,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACrE,IAAI,CAAC,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ;QAChE,OAAO,KAAK,CAAC;IACf,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,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AAY,CAAC,EAC5B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,cAAc,CA8ChB;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,QAAQ,CAAC,YAAY,CAAC,EAC5B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,UAAU,CAAC,CAIrB;AAED,6JAA6J;AAC7J,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,QAAQ,CAAC,YAAY,CAAC,EAC5B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,UAAU,CAAC,CAQrB"}
|
package/dist/core/bridge-mesh.js
CHANGED
|
@@ -44,6 +44,7 @@ export function createBridgeMeshSyncFromIdentity(identity, slot, options) {
|
|
|
44
44
|
const transport = new WireMeshTransport(store.events, identity, {
|
|
45
45
|
roomVerbHandlers: store.roomVerbHandlers,
|
|
46
46
|
roomJoinApprovalTimeoutMs: store.roomJoinApprovalTimeoutMs,
|
|
47
|
+
verifyMembership: async (claim) => store.membership.verify(claim),
|
|
47
48
|
getCurrentPresence: () => store.selfStatus,
|
|
48
49
|
getHostedRooms: () => store.hostedRooms,
|
|
49
50
|
dataStorage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge-mesh.js","sourceRoot":"","sources":["../../src/core/bridge-mesh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0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E,IAAI,EAAE,CAAC;AACzB,CAAC;AAED,6JAA6J;AAC7J,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,QAAsB,EACtB,IAA4B,EAC5B,OAA2B;IAE3B,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,gCAAgC,CACtE,QAAQ,EACR,IAAI,EACJ,OAAO,CACR,CAAC;IACF,MAAM,cAAc,EAAE,CAAC;IACvB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -11,12 +11,13 @@ export type DeviceMembershipVerdictReason = TokenVerdictReason | "wrong_capabili
|
|
|
11
11
|
export type DeviceMembershipVerdict = {
|
|
12
12
|
ok: true;
|
|
13
13
|
claims: TokenClaims;
|
|
14
|
+
depth: number;
|
|
14
15
|
} | {
|
|
15
16
|
ok: false;
|
|
16
17
|
reason: DeviceMembershipVerdictReason;
|
|
17
18
|
};
|
|
18
19
|
export interface VerifyDeviceMembershipOptions extends Omit<VerifyCapabilityTokenOptions, "expectedBearer"> {
|
|
19
|
-
/** The device actually authenticated on the arriving connection (or otherwise known out of band) -- never a relay-asserted or gossip-derived value. Mandatory here, unlike verifyCapabilityToken's own optional field for a caller presenting a token to authorise itself. */
|
|
20
|
+
/** The device actually authenticated on the arriving connection (or otherwise known out of band) -- never a relay-asserted or gossip-derived value, whenever the result is used to authorise something. Mandatory here, unlike verifyCapabilityToken's own optional field for a caller presenting a token to authorise itself. The one caller that passes a gossip-derived id (directory-admission.ts, for a membership proof read off a gossiped advert) deliberately treats the result as a claim about that id and nothing more. */
|
|
20
21
|
expectedBearer: DeviceId;
|
|
21
22
|
/** The user principal this membership is claimed to belong to. Determines both the expected scope.path (userGroupPath) and the delegation chain's only acceptable root -- a device-membership token minted by anyone other than this principal must never verify, regardless of what its scope claims. */
|
|
22
23
|
userDeviceId: DeviceId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-membership-verification.d.ts","sourceRoot":"","sources":["../../src/core/device-membership-verification.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EAClC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACR,WAAW,EACZ,MAAM,mCAAmC,CAAC;AAE3C,wYAAwY;AACxY,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD,2UAA2U;AAC3U,wBAAgB,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,MAAM,CAEtE;AAED,MAAM,MAAM,6BAA6B,GACrC,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"device-membership-verification.d.ts","sourceRoot":"","sources":["../../src/core/device-membership-verification.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EAClC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACR,WAAW,EACZ,MAAM,mCAAmC,CAAC;AAE3C,wYAAwY;AACxY,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD,2UAA2U;AAC3U,wBAAgB,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,MAAM,CAEtE;AAED,MAAM,MAAM,6BAA6B,GACrC,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,6BAA6B,CAAA;CAAE,CAAC;AAEzD,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CACzD,4BAA4B,EAC5B,gBAAgB,CACjB;IACC,ugBAAugB;IACvgB,cAAc,EAAE,QAAQ,CAAC;IACzB,0SAA0S;IAC1S,YAAY,EAAE,QAAQ,CAAC;CACxB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,QAAQ,CAAC,6BAA6B,CAAC,GAC/C,OAAO,CAAC,uBAAuB,CAAC,CA6BlC"}
|
|
@@ -38,6 +38,6 @@ export async function verifyDeviceMembership(token, options) {
|
|
|
38
38
|
if (deviceIdToHex(verdict.rootIssuer) !== expectedGroupPath) {
|
|
39
39
|
return { ok: false, reason: "wrong_chain_root" };
|
|
40
40
|
}
|
|
41
|
-
return { ok: true, claims: verdict.claims };
|
|
41
|
+
return { ok: true, claims: verdict.claims, depth: verdict.depth };
|
|
42
42
|
}
|
|
43
43
|
//# sourceMappingURL=device-membership-verification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-membership-verification.js","sourceRoot":"","sources":["../../src/core/device-membership-verification.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,qBAAqB,GAGtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAOhE,wYAAwY;AACxY,MAAM,CAAC,MAAM,wBAAwB,GAAG,cAAc,CAAC;AAEvD,2UAA2U;AAC3U,MAAM,UAAU,aAAa,CAAC,YAAgC;IAC5D,OAAO,aAAa,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC;AAuBD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,KAAsB,EACtB,OAAgD;IAEhD,MAAM,OAAO,GAAG,MAAM,qBAAqB,CAAC,KAAK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aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9D,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;QACpD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IACnD,CAAC;IACD,IAAI,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,iBAAiB,EAAE,CAAC;QAC5D,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IACnD,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;AACpE,CAAC"}
|
|
@@ -20,6 +20,8 @@ export interface AdmitDeviceOptions {
|
|
|
20
20
|
deviceId: DeviceId;
|
|
21
21
|
expires: number;
|
|
22
22
|
}
|
|
23
|
+
/** The group:member token itself, with no record kept of having issued it: a root-level, non-delegable grant bearing options.deviceId and scoped to the principal's own group (userGroupPath). admitDevice adds the issued-grant bookkeeping a later removeDevice needs; a caller that only needs a short-lived proof (membership-proof.ts) uses this directly, so the account's shared user-identity.json is not rewritten every time one of its many bridges refreshes its proof. */
|
|
24
|
+
export declare function mintDeviceMembership(options: Readonly<Pick<AdmitDeviceOptions, "userIdentity" | "clock" | "tokenId" | "deviceId" | "expires">>): Promise<MintVerdict>;
|
|
23
25
|
/**
|
|
24
26
|
* Mints deviceId's own group:member grant from the user principal: a root-level, non-delegable token scoped to the principal's own group (userGroupPath). On success, records the grant's token-id under the principal's own issued-grant store so a later removeDevice call can find it to revoke -- an admission without this bookkeeping would leave removal permanently unable to find what to revoke, so this is not optional side-book-keeping, it is what makes revocation possible at all.
|
|
25
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-membership.d.ts","sourceRoot":"","sources":["../../src/core/device-membership.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAK5B,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,YAAY,EAAE,YAAY,CAAC;IAC3B,sLAAsL;IACtL,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACjC,iCAAiC;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GACpC,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"device-membership.d.ts","sourceRoot":"","sources":["../../src/core/device-membership.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAK5B,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,YAAY,EAAE,YAAY,CAAC;IAC3B,sLAAsL;IACtL,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACjC,iCAAiC;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,udAAud;AACvd,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,QAAQ,CACf,IAAI,CACF,kBAAkB,EAClB,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAC9D,CACF,GACA,OAAO,CAAC,WAAW,CAAC,CActB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GACpC,OAAO,CAAC,WAAW,CAAC,CAUtB;AAED,MAAM,WAAW,mBAAmB;IAClC,+GAA+G;IAC/G,YAAY,EAAE,YAAY,CAAC;IAC3B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;IACb,oNAAoN;IACpN,UAAU,EAAE,cAAc,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GACrC,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAatC"}
|
|
@@ -9,11 +9,9 @@ import { DEVICE_MEMBER_CAPABILITY, userGroupPath, } from "./device-membership-ve
|
|
|
9
9
|
import { deleteIssuedDeviceGrant, loadIssuedDeviceGrant, saveIssuedDeviceGrant, } from "./user-identity.js";
|
|
10
10
|
/** delegationsRemaining for every device-membership grant -- deliberately non-delegable: a device that could re-mint membership for another device would let any admitted device silently admit others, defeating the point of the principal being the one place admission is decided (the same reasoning room-lifecycle.ts's own mintOwnerRootGrant already documents for a room owner's self-grant). */
|
|
11
11
|
const NOT_DELEGABLE = 0;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export async function admitDevice(options) {
|
|
16
|
-
const verdict = await mintCapabilityToken({
|
|
12
|
+
/** The group:member token itself, with no record kept of having issued it: a root-level, non-delegable grant bearing options.deviceId and scoped to the principal's own group (userGroupPath). admitDevice adds the issued-grant bookkeeping a later removeDevice needs; a caller that only needs a short-lived proof (membership-proof.ts) uses this directly, so the account's shared user-identity.json is not rewritten every time one of its many bridges refreshes its proof. */
|
|
13
|
+
export async function mintDeviceMembership(options) {
|
|
14
|
+
return mintCapabilityToken({
|
|
17
15
|
identity: options.userIdentity,
|
|
18
16
|
clock: options.clock,
|
|
19
17
|
tokenId: options.tokenId,
|
|
@@ -26,6 +24,12 @@ export async function admitDevice(options) {
|
|
|
26
24
|
expires: options.expires,
|
|
27
25
|
delegationsRemaining: NOT_DELEGABLE,
|
|
28
26
|
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Mints deviceId's own group:member grant from the user principal: a root-level, non-delegable token scoped to the principal's own group (userGroupPath). On success, records the grant's token-id under the principal's own issued-grant store so a later removeDevice call can find it to revoke -- an admission without this bookkeeping would leave removal permanently unable to find what to revoke, so this is not optional side-book-keeping, it is what makes revocation possible at all.
|
|
30
|
+
*/
|
|
31
|
+
export async function admitDevice(options) {
|
|
32
|
+
const verdict = await mintDeviceMembership(options);
|
|
29
33
|
if (!verdict.ok)
|
|
30
34
|
return verdict;
|
|
31
35
|
saveIssuedDeviceGrant(options.userIdentityOptions, deviceIdToHex(options.deviceId), options.tokenId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-membership.js","sourceRoot":"","sources":["../../src/core/device-membership.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAQhE,OAAO,EACL,wBAAwB,EACxB,aAAa,GACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,GAEtB,MAAM,oBAAoB,CAAC;AAE5B,0YAA0Y;AAC1Y,MAAM,aAAa,GAAG,CAAC,CAAC;AAcxB
|
|
1
|
+
{"version":3,"file":"device-membership.js","sourceRoot":"","sources":["../../src/core/device-membership.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAQhE,OAAO,EACL,wBAAwB,EACxB,aAAa,GACd,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,GAEtB,MAAM,oBAAoB,CAAC;AAE5B,0YAA0Y;AAC1Y,MAAM,aAAa,GAAG,CAAC,CAAC;AAcxB,udAAud;AACvd,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAKC;IAED,OAAO,mBAAmB,CAAC;QACzB,QAAQ,EAAE,OAAO,CAAC,YAAY;QAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,QAAQ;QACxB,UAAU,EAAE,wBAAwB;QACpC,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC;SACnD;QACD,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,oBAAoB,EAAE,aAAa;KACpC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAqC;IAErC,MAAM,OAAO,GAAG,MAAM,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,OAAO,CAAC;IAEhC,qBAAqB,CACnB,OAAO,CAAC,mBAAmB,EAC3B,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,EAC/B,OAAO,CAAC,OAAO,CAChB,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAYD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAAsC;IAEtC,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,qBAAqB,CAAC,OAAO,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;IAC9E,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAE5C,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC;QACtC,QAAQ,EAAE,OAAO,CAAC,YAAY;QAC9B,OAAO;QACP,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE;KAC/B,CAAC,CAAC;IACH,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAC3E,uBAAuB,CAAC,OAAO,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;IAChE,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which gossiped directory entries from the hub a gateway merges (agent-comms#156, widened by #187 and #266). Split out of WireMeshTransport, which hands it the two collaborators it needs.
|
|
3
|
+
*
|
|
4
|
+
* A membership proof shows that a trusted principal vouches for a device id. It does not show that whoever sent the advert is that device: the id and the proof both arrive in the same unauthenticated advert, and anyone who has read one can repeat it. So it earns only what GatewayTrust.isReachable grants (a directory entry and a route), never isTrusted, and everything a request to such a device carries is authenticated by the end-to-end session inside the relay. Verifying a proof is cryptography, so the work is bounded here: verdicts are remembered, a batch verifies only so many new proofs, and a verifier that throws refuses the entry rather than breaking the merge.
|
|
5
|
+
*/
|
|
6
|
+
import type { DirectoryEntry } from "wire-mesh-core/domain/mesh-session";
|
|
7
|
+
import type { GatewayTrustReader } from "./gateway-trust.js";
|
|
8
|
+
import type { WireMeshTransportOptions } from "./wire-mesh-transport-options.js";
|
|
9
|
+
/** How many new proofs one batch of entries may verify. Trusted devices and proofs already judged cost nothing against it, so a flood of fresh adverts costs a bounded amount of work per batch and the rest wait for the next. */
|
|
10
|
+
export declare const MAX_VERIFICATIONS_PER_BATCH = 8;
|
|
11
|
+
/** How long a refused proof is remembered before it is worth checking again: long enough that a repeated bad proof is not re-verified on every frame, short enough that a principal trusted a moment later takes effect promptly. */
|
|
12
|
+
export declare const NEGATIVE_VERDICT_TTL_MS: number;
|
|
13
|
+
export interface DirectoryAdmissionDeps {
|
|
14
|
+
gatewayTrust: Readonly<GatewayTrustReader>;
|
|
15
|
+
/** Absent when this side cannot verify proofs, in which case a proof is never enough. */
|
|
16
|
+
verifyMembership: WireMeshTransportOptions["verifyMembership"];
|
|
17
|
+
}
|
|
18
|
+
/** Builds the admission check for a transport's directory merge: given a batch of entries, the ones to merge. An entry is merged if its device is trusted by id, is itself a trusted principal's own device, or carries a proof that a trusted principal vouches for it; a verified device is recorded in gatewayTrust until the proof lapses or its principal stops being trusted. A device's newer proof is verified as it arrives, which is how its trust is renewed before the old one lapses. */
|
|
19
|
+
export declare function directoryAdmission(deps: Readonly<DirectoryAdmissionDeps>): (entries: readonly DirectoryEntry[]) => Promise<DirectoryEntry[]>;
|
|
20
|
+
//# sourceMappingURL=directory-admission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-admission.d.ts","sourceRoot":"","sources":["../../src/core/directory-admission.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,mOAAmO;AACnO,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAI7C,qOAAqO;AACrO,eAAO,MAAM,uBAAuB,QACU,CAAC;AAK/C,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAC3C,yFAAyF;IACzF,gBAAgB,EAAE,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;CAChE;AASD,seAAse;AACte,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,CAAC,sBAAsB,CAAC,GACrC,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC,CA6EnE"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which gossiped directory entries from the hub a gateway merges (agent-comms#156, widened by #187 and #266). Split out of WireMeshTransport, which hands it the two collaborators it needs.
|
|
3
|
+
*
|
|
4
|
+
* A membership proof shows that a trusted principal vouches for a device id. It does not show that whoever sent the advert is that device: the id and the proof both arrive in the same unauthenticated advert, and anyone who has read one can repeat it. So it earns only what GatewayTrust.isReachable grants (a directory entry and a route), never isTrusted, and everything a request to such a device carries is authenticated by the end-to-end session inside the relay. Verifying a proof is cryptography, so the work is bounded here: verdicts are remembered, a batch verifies only so many new proofs, and a verifier that throws refuses the entry rather than breaking the merge.
|
|
5
|
+
*/
|
|
6
|
+
import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
|
|
7
|
+
import { readMembershipProof } from "./gossip-directory.js";
|
|
8
|
+
/** How many new proofs one batch of entries may verify. Trusted devices and proofs already judged cost nothing against it, so a flood of fresh adverts costs a bounded amount of work per batch and the rest wait for the next. */
|
|
9
|
+
export const MAX_VERIFICATIONS_PER_BATCH = 8;
|
|
10
|
+
const MS_PER_SECOND = 1000;
|
|
11
|
+
const NEGATIVE_VERDICT_TTL_SECONDS = 60;
|
|
12
|
+
/** How long a refused proof is remembered before it is worth checking again: long enough that a repeated bad proof is not re-verified on every frame, short enough that a principal trusted a moment later takes effect promptly. */
|
|
13
|
+
export const NEGATIVE_VERDICT_TTL_MS = NEGATIVE_VERDICT_TTL_SECONDS * MS_PER_SECOND;
|
|
14
|
+
/** The most devices whose last verdict is remembered. */
|
|
15
|
+
const VERDICT_CACHE_LIMIT = 1024;
|
|
16
|
+
/** Builds the admission check for a transport's directory merge: given a batch of entries, the ones to merge. An entry is merged if its device is trusted by id, is itself a trusted principal's own device, or carries a proof that a trusted principal vouches for it; a verified device is recorded in gatewayTrust until the proof lapses or its principal stops being trusted. A device's newer proof is verified as it arrives, which is how its trust is renewed before the old one lapses. */
|
|
17
|
+
export function directoryAdmission(deps) {
|
|
18
|
+
const { gatewayTrust, verifyMembership } = deps;
|
|
19
|
+
const verdicts = new Map();
|
|
20
|
+
const remember = (deviceHex, verdict) => {
|
|
21
|
+
verdicts.delete(deviceHex);
|
|
22
|
+
verdicts.set(deviceHex, verdict);
|
|
23
|
+
if (verdicts.size > VERDICT_CACHE_LIMIT) {
|
|
24
|
+
const oldest = verdicts.keys().next();
|
|
25
|
+
if (oldest.done !== true)
|
|
26
|
+
verdicts.delete(oldest.value);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
/** The expiry of the first trusted principal's verdict that vouches for the proof, or undefined. A principal the verifier throws on (a malformed id, or no identity attached yet) is skipped, so one bad principal never blocks the others. */
|
|
30
|
+
const vouchedFor = async (proof, deviceHex) => {
|
|
31
|
+
if (verifyMembership === undefined)
|
|
32
|
+
return undefined;
|
|
33
|
+
for (const principal of gatewayTrust.listPrincipals()) {
|
|
34
|
+
try {
|
|
35
|
+
const verdict = await verifyMembership({
|
|
36
|
+
proof,
|
|
37
|
+
deviceHex,
|
|
38
|
+
principalHex: principal,
|
|
39
|
+
});
|
|
40
|
+
if (verdict.ok)
|
|
41
|
+
return { principal, expires: verdict.expires };
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
};
|
|
49
|
+
return async (entries) => {
|
|
50
|
+
const admitted = [];
|
|
51
|
+
let budget = MAX_VERIFICATIONS_PER_BATCH;
|
|
52
|
+
for (const entry of entries) {
|
|
53
|
+
const deviceHex = deviceIdToHex(entry.device);
|
|
54
|
+
if (gatewayTrust.isTrusted(deviceHex) ||
|
|
55
|
+
gatewayTrust.isTrustedPrincipal(deviceHex)) {
|
|
56
|
+
admitted.push(entry);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
const proof = readMembershipProof(entry.advert);
|
|
60
|
+
if (proof === undefined || verifyMembership === undefined)
|
|
61
|
+
continue;
|
|
62
|
+
const known = verdicts.get(deviceHex);
|
|
63
|
+
if (known?.proof === proof) {
|
|
64
|
+
if (known.ok && gatewayTrust.isReachable(deviceHex)) {
|
|
65
|
+
admitted.push(entry);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
if (!known.ok && known.until > Date.now())
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
if (budget === 0)
|
|
72
|
+
continue;
|
|
73
|
+
budget -= 1;
|
|
74
|
+
const vouch = await vouchedFor(proof, deviceHex);
|
|
75
|
+
remember(deviceHex, {
|
|
76
|
+
proof,
|
|
77
|
+
ok: vouch !== undefined,
|
|
78
|
+
until: Date.now() + NEGATIVE_VERDICT_TTL_MS,
|
|
79
|
+
});
|
|
80
|
+
if (vouch !== undefined) {
|
|
81
|
+
gatewayTrust.noteVerifiedMember(deviceHex, vouch.principal, vouch.expires);
|
|
82
|
+
admitted.push(entry);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return admitted;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=directory-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K,CAAC,CAAC;oBACrB,SAAS;gBACX,CAAC;gBACD,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE;oBAAE,SAAS;YACtD,CAAC;YACD,IAAI,MAAM,KAAK,CAAC;gBAAE,SAAS;YAC3B,MAAM,IAAI,CAAC,CAAC;YAEZ,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;YACjD,QAAQ,CAAC,SAAS,EAAE;gBAClB,KAAK;gBACL,EAAE,EAAE,KAAK,KAAK,SAAS;gBACvB,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,uBAAuB;aAC5C,CAAC,CAAC;YACH,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,YAAY,CAAC,kBAAkB,CAC7B,SAAS,EACT,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,OAAO,CACd,CAAC;gBACF,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import type { CommsAction } from "./types.js";
|
|
5
5
|
import type { CommsResult, MeshOnlyFeatures } from "./tool.js";
|
|
6
6
|
/** The slice of MeshOnlyFeatures the three functions below actually need, named so this file doesn't repeat the same six-method Pick inline at every signature. */
|
|
7
|
-
export type GatewayTrustStore = Pick<MeshOnlyFeatures, "addTrustedGateway" | "removeTrustedGateway" | "listTrustedGateways" | "addTrustedGatewayPrincipal" | "removeTrustedGatewayPrincipal" | "listTrustedGatewayPrincipals">;
|
|
7
|
+
export type GatewayTrustStore = Pick<MeshOnlyFeatures, "addTrustedGateway" | "removeTrustedGateway" | "listTrustedGateways" | "addTrustedGatewayPrincipal" | "removeTrustedGatewayPrincipal" | "listTrustedGatewayPrincipals" | "listVerifiedMembers">;
|
|
8
8
|
/** Trusts action.device: as a user principal (GatewayTrust.addPrincipal, agent-comms#187) when action.principal is true, or as a bare remote device-id (the original agent-comms#156 behaviour) otherwise. */
|
|
9
9
|
export declare function gatewayTrust(store: Readonly<GatewayTrustStore>, action: CommsAction & {
|
|
10
10
|
action: "gateway_trust";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-trust-actions.d.ts","sourceRoot":"","sources":["../../src/core/gateway-trust-actions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE/D,mKAAmK;AACnK,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,gBAAgB,EACd,mBAAmB,GACnB,sBAAsB,GACtB,qBAAqB,GACrB,4BAA4B,GAC5B,+BAA+B,GAC/B,8BAA8B,
|
|
1
|
+
{"version":3,"file":"gateway-trust-actions.d.ts","sourceRoot":"","sources":["../../src/core/gateway-trust-actions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE/D,mKAAmK;AACnK,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,gBAAgB,EACd,mBAAmB,GACnB,sBAAsB,GACtB,qBAAqB,GACrB,4BAA4B,GAC5B,+BAA+B,GAC/B,8BAA8B,GAC9B,qBAAqB,CACxB,CAAC;AAUF,8MAA8M;AAC9M,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,EAClC,MAAM,EAAE,WAAW,GAAG;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,GAChD,WAAW,CAeb;AAED,4OAA4O;AAC5O,wBAAgB,cAAc,CAC5B,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,EAClC,MAAM,EAAE,WAAW,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,GAClD,WAAW,CAeb;AAED,wRAAwR;AACxR,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GACjC,WAAW,CA+Bb"}
|
|
@@ -49,7 +49,8 @@ export function gatewayListTrusted(store) {
|
|
|
49
49
|
return gatewayTrustUnavailable();
|
|
50
50
|
const devices = store.listTrustedGateways();
|
|
51
51
|
const principals = store.listTrustedGatewayPrincipals?.() ?? [];
|
|
52
|
-
|
|
52
|
+
const members = store.listVerifiedMembers?.() ?? [];
|
|
53
|
+
if (devices.length === 0 && principals.length === 0 && members.length === 0) {
|
|
53
54
|
return {
|
|
54
55
|
content: "No remote gateway devices or principals are trusted.",
|
|
55
56
|
isError: false,
|
|
@@ -62,6 +63,9 @@ export function gatewayListTrusted(store) {
|
|
|
62
63
|
if (principals.length > 0) {
|
|
63
64
|
sections.push(`Trusted remote gateway principals:\n${principals.map((principal) => ` ${principal}`).join("\n")}`);
|
|
64
65
|
}
|
|
66
|
+
if (members.length > 0) {
|
|
67
|
+
sections.push(`Devices trusted through a principal:\n${members.map((member) => ` ${member.device} (vouched for by ${member.principal})`).join("\n")}`);
|
|
68
|
+
}
|
|
65
69
|
return {
|
|
66
70
|
content: sections.join("\n"),
|
|
67
71
|
isError: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-trust-actions.js","sourceRoot":"","sources":["../../src/core/gateway-trust-actions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gateway-trust-actions.js","sourceRoot":"","sources":["../../src/core/gateway-trust-actions.ts"],"names":[],"mappings":"AAkBA,yJAAyJ;AACzJ,SAAS,uBAAuB;IAC9B,OAAO;QACL,OAAO,EAAE,+CAA+C;QACxD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED,8MAA8M;AA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I,CAAC,IAAI,CAAC,EAAE,CACzI,CAAC;IACJ,CAAC;IACD,OAAO;QACL,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { IdentitySlot } from "./identity-store.js";
|
|
11
11
|
/** The read-only slice of GatewayTrust every consumer of the trust boundary actually needs (WireMeshTransport, HubSession, hub-forwarding.ts) -- named so call sites that only ever read trust decisions, never mutate them, don't repeat the same `Pick<GatewayTrust, "isTrusted" | "hasAny" | "isTrustedPrincipal" | "isTrustedFor">` inline at every field/parameter that takes one. */
|
|
12
|
-
export type GatewayTrustReader = Pick<GatewayTrust, "isTrusted" | "hasAny" | "isTrustedPrincipal" | "isTrustedFor">;
|
|
12
|
+
export type GatewayTrustReader = Pick<GatewayTrust, "isTrusted" | "isReachable" | "hasAny" | "isTrustedPrincipal" | "isTrustedFor" | "listPrincipals" | "noteVerifiedMember">;
|
|
13
13
|
export declare class GatewayTrust {
|
|
14
14
|
private readonly trusted;
|
|
15
15
|
private readonly trustedPrincipals;
|
|
16
|
+
/** Devices whose gossiped membership proof was verified against a trusted principal, with that principal and when the proof lapses. In memory only: a proof is short-lived and re-verified from the next advert, so nothing here is worth persisting. */
|
|
17
|
+
private readonly verifiedMembers;
|
|
16
18
|
private readonly slot;
|
|
17
19
|
/** Constructs the trust boundary, optionally bound to a bridge identity slot for persistence (agent-comms#186); see this class's own doc comment for what a slot does and doesn't change. Given a slot, immediately loads whatever devices and principals were trusted before the last restart into the initial in-memory sets. */
|
|
18
20
|
constructor(slot?: Readonly<IdentitySlot>);
|
|
@@ -24,8 +26,18 @@ export declare class GatewayTrust {
|
|
|
24
26
|
private persist;
|
|
25
27
|
/** Every currently trusted device-id, lowercase hex, in insertion order. */
|
|
26
28
|
list(): string[];
|
|
27
|
-
/** Whether the given device-id (hex, case-insensitive) is
|
|
29
|
+
/** Whether the given device-id (hex, case-insensitive) is trusted by id: on the bare-device allowlist. A device trusted only because a principal vouches for it (noteVerifiedMember) is not, on purpose: its proof is a claim that anyone who has read the device's gossiped advert can repeat, so it earns only what isReachable grants. */
|
|
28
30
|
isTrusted(deviceHex: string): boolean;
|
|
31
|
+
/** Whether this side may merge the device's gossiped directory entry and route requests to it: trusted by id, or a verified member of a trusted principal. Requests routed to a device are still authenticated end to end by the session inside the relay, so a false claim can misroute one (which then fails its handshake) but not read or forge one. */
|
|
32
|
+
isReachable(deviceHex: string): boolean;
|
|
33
|
+
/** Records that deviceHex presented a membership proof, valid until expiresAt (epoch ms), verified against principalHex (agent-comms#266). From then until the proof lapses, or principalHex stops being trusted, isReachable treats the device as reachable. A later proof never shortens an earlier one's window. The caller has already verified the proof: this class does no cryptography. */
|
|
34
|
+
noteVerifiedMember(deviceHex: string, principalHex: string, expiresAt: number): void;
|
|
35
|
+
/** Every device currently reachable only because a trusted principal vouches for it, with that principal. Excludes proofs that have lapsed and members whose principal is no longer trusted. */
|
|
36
|
+
listVerifiedMembers(): {
|
|
37
|
+
device: string;
|
|
38
|
+
principal: string;
|
|
39
|
+
}[];
|
|
40
|
+
private isVerifiedMember;
|
|
29
41
|
/** Marks a remote user-principal device-id (hex, case-insensitive; user-identity.ts) as trusted (agent-comms#187): a peer presenting a token whose delegation chain roots at this principal is trusted via `isTrustedFor` below, without that peer's own bare device-id ever needing individual trust. Idempotent, and entirely independent of the bare-device allowlist `add` manages. Persists the updated set when this instance was constructed with a slot. */
|
|
30
42
|
addPrincipal(deviceHex: string): void;
|
|
31
43
|
/** Withdraws a previously trusted principal (hex, case-insensitive). A no-op if it was never trusted. Governs future chain checks only, mirroring `remove`'s own already-merged-traffic-is-unaffected posture. Persists the updated set when this instance was constructed with a slot. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-trust.d.ts","sourceRoot":"","sources":["../../src/core/gateway-trust.ts"],"names":[],"mappings":"AAA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AmB,IAAI;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE;IAM9D,OAAO,CAAC,gBAAgB;IASxB,ocAAoc;IACpc,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAKrC,2RAA2R;IAC3R,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IASxC,sFAAsF;IACtF,cAAc,IAAI,MAAM,EAAE;IAI1B,oGAAoG;IACpG,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI9C;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO;IAI/D;;OAEG;IACH,MAAM,IAAI,OAAO;CAGlB"}
|
|
@@ -2,6 +2,8 @@ import { loadGatewayTrust, saveGatewayTrust } from "./identity-store.js";
|
|
|
2
2
|
export class GatewayTrust {
|
|
3
3
|
trusted = new Set();
|
|
4
4
|
trustedPrincipals = new Set();
|
|
5
|
+
/** Devices whose gossiped membership proof was verified against a trusted principal, with that principal and when the proof lapses. In memory only: a proof is short-lived and re-verified from the next advert, so nothing here is worth persisting. */
|
|
6
|
+
verifiedMembers = new Map();
|
|
5
7
|
slot;
|
|
6
8
|
/** Constructs the trust boundary, optionally bound to a bridge identity slot for persistence (agent-comms#186); see this class's own doc comment for what a slot does and doesn't change. Given a slot, immediately loads whatever devices and principals were trusted before the last restart into the initial in-memory sets. */
|
|
7
9
|
constructor(slot) {
|
|
@@ -36,10 +38,41 @@ export class GatewayTrust {
|
|
|
36
38
|
list() {
|
|
37
39
|
return [...this.trusted];
|
|
38
40
|
}
|
|
39
|
-
/** Whether the given device-id (hex, case-insensitive) is
|
|
41
|
+
/** Whether the given device-id (hex, case-insensitive) is trusted by id: on the bare-device allowlist. A device trusted only because a principal vouches for it (noteVerifiedMember) is not, on purpose: its proof is a claim that anyone who has read the device's gossiped advert can repeat, so it earns only what isReachable grants. */
|
|
40
42
|
isTrusted(deviceHex) {
|
|
41
43
|
return this.trusted.has(deviceHex.toLowerCase());
|
|
42
44
|
}
|
|
45
|
+
/** Whether this side may merge the device's gossiped directory entry and route requests to it: trusted by id, or a verified member of a trusted principal. Requests routed to a device are still authenticated end to end by the session inside the relay, so a false claim can misroute one (which then fails its handshake) but not read or forge one. */
|
|
46
|
+
isReachable(deviceHex) {
|
|
47
|
+
const key = deviceHex.toLowerCase();
|
|
48
|
+
return this.trusted.has(key) || this.isVerifiedMember(key);
|
|
49
|
+
}
|
|
50
|
+
/** Records that deviceHex presented a membership proof, valid until expiresAt (epoch ms), verified against principalHex (agent-comms#266). From then until the proof lapses, or principalHex stops being trusted, isReachable treats the device as reachable. A later proof never shortens an earlier one's window. The caller has already verified the proof: this class does no cryptography. */
|
|
51
|
+
noteVerifiedMember(deviceHex, principalHex, expiresAt) {
|
|
52
|
+
const key = deviceHex.toLowerCase();
|
|
53
|
+
const now = Date.now();
|
|
54
|
+
for (const [device, member] of this.verifiedMembers) {
|
|
55
|
+
if (member.expiresAt <= now)
|
|
56
|
+
this.verifiedMembers.delete(device);
|
|
57
|
+
}
|
|
58
|
+
const existing = this.verifiedMembers.get(key);
|
|
59
|
+
this.verifiedMembers.set(key, {
|
|
60
|
+
principal: principalHex.toLowerCase(),
|
|
61
|
+
expiresAt: Math.max(expiresAt, existing?.expiresAt ?? 0),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/** Every device currently reachable only because a trusted principal vouches for it, with that principal. Excludes proofs that have lapsed and members whose principal is no longer trusted. */
|
|
65
|
+
listVerifiedMembers() {
|
|
66
|
+
return [...this.verifiedMembers]
|
|
67
|
+
.filter(([device]) => this.isVerifiedMember(device))
|
|
68
|
+
.map(([device, member]) => ({ device, principal: member.principal }));
|
|
69
|
+
}
|
|
70
|
+
isVerifiedMember(deviceKey) {
|
|
71
|
+
const member = this.verifiedMembers.get(deviceKey);
|
|
72
|
+
return (member !== undefined &&
|
|
73
|
+
member.expiresAt > Date.now() &&
|
|
74
|
+
this.trustedPrincipals.has(member.principal));
|
|
75
|
+
}
|
|
43
76
|
/** Marks a remote user-principal device-id (hex, case-insensitive; user-identity.ts) as trusted (agent-comms#187): a peer presenting a token whose delegation chain roots at this principal is trusted via `isTrustedFor` below, without that peer's own bare device-id ever needing individual trust. Idempotent, and entirely independent of the bare-device allowlist `add` manages. Persists the updated set when this instance was constructed with a slot. */
|
|
44
77
|
addPrincipal(deviceHex) {
|
|
45
78
|
this.trustedPrincipals.add(deviceHex.toLowerCase());
|
|
@@ -47,7 +80,12 @@ export class GatewayTrust {
|
|
|
47
80
|
}
|
|
48
81
|
/** Withdraws a previously trusted principal (hex, case-insensitive). A no-op if it was never trusted. Governs future chain checks only, mirroring `remove`'s own already-merged-traffic-is-unaffected posture. Persists the updated set when this instance was constructed with a slot. */
|
|
49
82
|
removePrincipal(deviceHex) {
|
|
50
|
-
|
|
83
|
+
const key = deviceHex.toLowerCase();
|
|
84
|
+
this.trustedPrincipals.delete(key);
|
|
85
|
+
for (const [device, member] of this.verifiedMembers) {
|
|
86
|
+
if (member.principal === key)
|
|
87
|
+
this.verifiedMembers.delete(device);
|
|
88
|
+
}
|
|
51
89
|
this.persist();
|
|
52
90
|
}
|
|
53
91
|
/** Every currently trusted principal device-id, lowercase hex, in insertion order. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-trust.js","sourceRoot":"","sources":["../../src/core/gateway-trust.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"gateway-trust.js","sourceRoot":"","sources":["../../src/core/gateway-trust.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAczE,MAAM,OAAO,YAAY;IACN,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAC5B,iBAAiB,GAAG,IAAI,GAAG,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SAAiB,EAAE,aAAqB;QACnD,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,GAAG,CAAC,CAAC;IAClE,CAAC;CACF"}
|
|
@@ -15,6 +15,8 @@ export declare function listKnownDevicesEntries(knownDevices: ReadonlyMap<string
|
|
|
15
15
|
}[];
|
|
16
16
|
/** Reads a presence extension from one specific device's own gossiped self-advert, if this event's directory carries a fresh one for exactly that device-id -- never for any other device-id a multi-hop directory might mention, since only the session's own authenticated peer's advert is that session's business to report. Returns undefined for a missing presence/status key, or a value that isn't a recognised AgentStatus -- an advert simply not participating in this convention, not an error (the same verifier obligation peer-advert's own open extension tail is documented under). */
|
|
17
17
|
export declare function findPresenceAdvert(deviceIdHex: string, directory: readonly DirectoryEntry[]): AgentStatus | undefined;
|
|
18
|
+
/** The membership proof a peer gossiped in its agent/self advert, or undefined when it carries none. The advert is self-asserted by whichever peer sent it, so this only reads it; nothing about the proof is believed until it is verified. */
|
|
19
|
+
export declare function readMembershipProof(advert: Readonly<PeerAdvert>): string | undefined;
|
|
18
20
|
/** Re-sends this side's own current presence status, currently-hosted rooms, self-agent identity, and package versions, together, onto every live session's gossip self-advert -- one gossip frame per tick carrying whichever facts are actually known, rather than a separate frame per fact. Split out of wire-mesh-transport.ts's own WireMeshTransport class purely to keep that file under the repo's max-lines cap, the same reason mergeKnownDevices/findPresenceAdvert above already live here rather than there. A session that fails to send (mid-disconnect, most likely -- watchForDisconnect will independently notice and clean it up) is reported via onError and skipped, not allowed to stop the tick from reaching the rest of allSessions: a periodic broadcast to N peers is N independent operations, not one atomic unit. Unlike presence/hostedRooms/selfAgentAdvert, the versions extension is never actually absent (this side's own agent-comms package version is always known), so every tick this function is called for sends at least that one fact -- there is no "nothing to report" case left to short-circuit on. The hub's own session (agent-comms#156) is gated separately from every ordinary local-peer session in allSessions: local mesh trust is a different layer (connect_request/introduce approval already gated it before it ever joined allSessions), but the hub session is a broadcast to every connected hub peer, trusted or not, and would otherwise leak this side's own presence/hosted-rooms/self-agent/versions advert onto the hub regardless of GatewayTrust -- forwardAdvertsToHub/pushHubCatchUp's own hasAny gate exists to prevent exactly this for OTHER local peers' adverts, and this side's own self-advert deserves the identical gate, not a bypass. */
|
|
19
21
|
export declare function readvertiseGossip(options: {
|
|
20
22
|
allSessions: ReadonlySet<AcceptedMeshSession>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gossip-directory.d.ts","sourceRoot":"","sources":["../../src/core/gossip-directory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,2OAA2O;AAC3O,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACrC,SAAS,EAAE,SAAS,cAAc,EAAE,GACnC,IAAI,CAWN;AAED,idAAid;AACjd,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,GACtD,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAA;CAAE,EAAE,CAK/D;AAED,ykBAAykB;AACzkB,wBAAgB,kBAAkB,CAChC,WAAW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