Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
The delay on the client affords one liveness check but not two serially which is what is currently happening for registrations received over the decoy registration channel then shared over the registration API.
We need to reduce this to one liveness check.
Solution
To address this This pull request makes changes to the protobuf structs used to wrap the
ClientToStation
message.Merge ClientToStation Wrappers
The first change is to merge
ZMQPayload
andClientToAPI
into one protobuf struct calledC2SWrapper
. This can now be used for both purposes and allows for extra information to be shared ecternal to the actualClientToStation
message (e.g. source and decoy addresses which the application and registration management system would otherwise not have access to).Add Prescanned flag
I have chosen to add a
Prescanned
field to theRegistrationFlags
internal to theClientToStation
message. This is the flag that is relied on to indicate if a registration shared over the API has been scanned already or not. The Registration API does NOT interfere with this flag. At the same time I am leaving theDetectorPrescan
Registration source so that we can tell how effective registration sharing is and track metrics about it independently of the decoy registration channel.Notes
Because the
Prescanned
flag is internal to the ClientToStation message and the Registration API makes no checks to validate the source of registrations or differentiate decoy registrations shared over the API from client registrations submitted through the API clients could set thePrescanned
flag on their own. This is not a big concern at this time because the liveness scans exist to facilitate connections, and bypassing the liveness scan only means that a live phantom will break the connection phase for the client.see also the conjure repo PR associated with this