Personal Services: Connection Establishment Process

Submitted by code_admin on Mon, 07/23/2018 - 11:24

Types of connection:

Type Usage
Normal-Verify Used when both Outbound and Inbound can establish connecitons
Polling-In-Verify Used when Outbound can not establish a connection to inbound. (So inbound must poll for messages)
Out-Out-Verify Used when Inbound can not establish ha connection to outbound.

$def_URI = "URI";
?>

This page describes the exchange of messages between two nodes to allow them to establish a connection.

Parties:

  • Requester Node - Node making the request
  • Target Node - Node the requester would like to make a connection to
  • Requester Node Admin - Node admin that controls the requester node
  • Target Node Admin - Node admin that controls the target node

Step 1

Requester Node Admin Sends message to Requester Node to tell it to initiate the connection request:
Message Name: MakeNodeConnectionRequest
ConnectionName - Name of the requester will know the connection by
TargetNodeName - Official Name of the target node
targetURI - of target Node
backURI - the target node can use to connect back to requester node
PrivateReqMsg - One off message admin can uses to verify request
PrivateReqPass - One off password admin can uses to verify request

Action

Requester Node Creates an outbound request in WAITING_TO_BE_SENT_TO_TARGET state

Step 2

Requester Node sends target node message to request the connection:
Message Name: NodeConnectionRequest
RequesterConnectionName - Name that the Requester knows the connection by
RequesterNodeName - Official Name of requesting node
targetURI - of target Node
backURI - the target node can use to connect back
PrivateReqMsg - One off password admin can use to verify request - this is encrypted with the password specified by admin
ReqNodePublicKey - public key of requesting node
InternalPassword - Random password encrypted with requester nodes private key. This proves the requester node controls it's public key. The password is also used by the requester node to verify it go the response from the target

Action

target node creates an inbound request in WAITING_INITIAL_AUTH state
**Requester Node Creates an inbound connection
requester node puts outbound request in WAITING_TARGET_RESPONSE

Step 3

Target Node Admin sends Target Node the password to decrypt the message
Message Name: NodeConnectionIncommingInitialAuth
ConnectionName - Name of connection
Password - Password do decrypt the message for connection

Action

target node changes inbound request state to WAITING_FINAL_AUTH state

Step 4

Target Node Admin sends Target Node authorisation confirmation to confirm the incomming request is authorised and sets inboundConnectionName
Message Name: NodeConnectionIncommingFinalAuth
ConnectionName - Name of connection
NewName - New connection Name

Action

target node changes inbound request state to WAITING_VRIFY_REVERSE state

Step 5

Target node sends accept connection message to requester node
Message Name: NodeConnectionComplete
RequesterConnectionName
PrivateReqMsg - Encrypted with target node private key
InternalPassword - Encrypted with target node private key
FinalTargetConnectionName - InboundConnectionName from target node

*Send back decrypted message encrypted with private key to prove that target received it - and prove that target is in control of it's key

Action

requester node verifys recieved info against it's records
target node makes sure requester responds with OK
target node turns inbound connection request to inbound connection
requester node turns outbound connection request to outbound connection

Polling Connection Establishment Process

Outbound Polling Connection Special operations

  • Reset Stats
  • Enable
  • Disable
  • Update Params (MinPollFreq, MaxMessages, DisableRefusedPollLimit, DisableTimePeriod)

Inbound Polling Connection Special operations

  • Reset Stats
  • Enable
  • Disable
  • Update Params (PollingFreq)

Tags

RJM Article Type
Work Notes