Specification
Authentication a node on the other side of a connection is done buy the Proxy class when a connection is made. This includes obtaining the NodeId, certificates and connection info. I assume that the certificates are authenticated at this stage. This is all the information that we need to authenticate and add a node to the node graph with the added benefit of it being obtained at the time a connection is established.
We need to add a callback to the Proxy that is triggered with the NodeId, remoteHost and remotePort information whenever a connection is made. For simplicity this will be triggered when a ForwardConnection and ReverseConnection is made. So Proxy needs to take a (remoteNodeId, remoteHost, remotePort) => void callback that is triggered whenever a connection is established and authenticated.
A new event needs to be added to the EventBus for this connection event. The handler for this event needs to call NodeManager.setNode() to add the information to the nodeGraph.
Additional context
Tasks
Specification
Authentication a node on the other side of a connection is done buy the
Proxyclass when a connection is made. This includes obtaining theNodeId, certificates and connection info. I assume that the certificates are authenticated at this stage. This is all the information that we need to authenticate and add a node to the node graph with the added benefit of it being obtained at the time a connection is established.We need to add a callback to the
Proxythat is triggered with theNodeId,remoteHostandremotePortinformation whenever a connection is made. For simplicity this will be triggered when aForwardConnectionandReverseConnectionis made. SoProxyneeds to take a(remoteNodeId, remoteHost, remotePort) => voidcallback that is triggered whenever a connection is established and authenticated.A new event needs to be added to the
EventBusfor this connection event. The handler for this event needs to callNodeManager.setNode()to add the information to the nodeGraph.Additional context
ForwardProxyandReverseProxyintoProxy#361. Changes affect this.KeyManager#312 CLI and Client & Agent Service test splitting #311 ? I'm not sure where it was implemented.Tasks
connectionEstablishedCallbackto theProxythat is triggered whenever a connection is authenticated and established.eventsEventBusin thePolykeyAgentand have this triggered by the callback.NodeManager.setNode()method thus adding the node to the nodeGraph.PolykeyAgentto check that the event properly propagates and updates theNodeGraph.