Poll (remote) enclave for local public keys #861
Merged
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.
This PR adds a poller that will fetch public keys from the Enclave and add them to the local store.
This means that if a remote enclave is restarted with different keys, then they will get picked up by the transaction manager without having to restart, which then propagates across the network.
This is essentially a no-op for local enclaves for now, although after #703 is implemented, it would be picked up automatically (although whether this is worth the cost is arguable, tending towards not).
A poller was chosen so that we can keep the 1-way communication of TM->Enclave.
A polling time of
5000ms
was chosen arbitrarily, which keep the amount of time a user must wait before the key is accessible down, if we want to increase the time to reduce strain then please do suggest.Fixes #702
Supersedes #853
Although this PR creates more spring beans, which is the opposite direction of where we want to go, I have raised the ticket #860 to capture a removing all the possible
tessera-partyinfo
beans as its own change.