Skip to content

Seed node not adding details of connecting node to its NodeGraph #344

@joshuakarp

Description

@joshuakarp

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

  • 1. Add a connectionEstablishedCallback to the Proxy that is triggered whenever a connection is authenticated and established.
  • 2. Add a new event to the events EventBus in the PolykeyAgent and have this triggered by the callback.
  • 3. Add an event handler for the new event that calls the NodeManager.setNode() method thus adding the node to the nodeGraph.
  • 4. add tests for;
    • Proxy triggering the callback with the correct information.
    • Integration test for the PolykeyAgent to check that the event properly propagates and updates the NodeGraph.

Metadata

Metadata

Labels

bugSomething isn't workingdevelopmentStandard developmentepicBig issue with multiple subissuesr&d:polykey:core activity 4End to End Networking behind Consumer NAT Devices

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions