Skip to content

Commit 3d3d7b7

Browse files
committed
feat: added network segregation logic for separating networks via refusing connections that fail to authenticate
[ci skip]
1 parent fd0c31c commit 3d3d7b7

18 files changed

+1483
-122
lines changed

src/PolykeyAgent.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,14 @@ class PolykeyAgent {
386386
optionsDefaulted.nodes.connectionInitialMaxStreamsBidi,
387387
rpcParserBufferSize: optionsDefaulted.nodes.rpcParserBufferSize,
388388
rpcCallTimeoutTime: optionsDefaulted.nodes.rpcCallTimeoutTime,
389+
authenticateNetworkForwardCallback:
390+
nodesUtils.nodesAuthenticateConnectionForwardBasicPublicFactory(
391+
optionsDefaulted.network,
392+
),
393+
authenticateNetworkReverseCallback:
394+
nodesUtils.nodesAuthenticateConnectionReverseBasicPublicFactory(
395+
optionsDefaulted.network,
396+
),
389397
logger: logger.getChild(NodeConnectionManager.name),
390398
});
391399
nodeManager = new NodeManager({

0 commit comments

Comments
 (0)