-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating remote node information after root keypair and NodeID
has changed.
#386
Comments
I actually still don't like the fact that we get our Obviously the A That class can then provide some of the common functionality required... But NodeId is a derived property, and is likely to change over time. We would need things to instead be "observing" the NodeId value. I think some research into observables might be relevant. You can get the current Node Id, or you can register to observe the NodeId. I imagine some changes to This then allows our domain models to be reactive to change. Right now they are only reactive to function calls. Consider the Push/Pull concept:
We could setup a push based reactivity where NodeId changes pushes out to the other domains. And this may apply to several areas in the code. |
In #466, I've renamed these methods to (in
These names are more descriptive as to the intention of what these are meant to do. During operational usage, only The user may decide however to "break" the chain... and use the the other 2 functions. If they do, we have to plan for how this impacts the sigchain. It may result in a breaking the sigchain since all previous claims are no longer valid or can be verified. Specifically However We may need to be able to automatically garbage collect invalid claims on the sigchain... or we still preserve this data, but make the consumers robust against this sort of situation by ignoring claims are that are no longer cryptographically valid. |
See: #446 (comment) for discussion regarding what happens during certificate renewal. |
There are many domains that currently don't work when the
For now, this is a short term fix until we properly integrate rxjs observables into our class objects. It makes more sense for these objects to subscribe to the specific data. And for the ability to "emit" change events to their properties in the realm of the domain objects themselves. So in the future I expect |
About the |
@tegefaulkes can you confirm if #552 will end up fixing this issue? If so, change #552 to fix this issue instead of related. |
I think even after this is technically done, extensive testing would need to be done to ensure that this change propagation is in fact robust and also works across the network. But we are likely get there only at testnet 7 rather than testnet 6 #551 |
Relevant? |
I think it's still relevant. No direct work has been done to address this. We can handle a node when it's ID has changed but currently we don't really update anything about the ID change. |
This has changed from using the |
I was refactoring It's also a bit awkward to require a huge dependency on the |
Specification
The root certificate of nodes and by extension their root key pair and
NodeID
is allowed to change. There are 3 methods in theKeyManager
that does this;renewRootKeyPair
, Generates a new root keyPair, adds it to the cert chain and is signed by the previous certificate. This creates a newNodeId
ensures that the oldNodeId
is still valid.resetRootKeyPair
, Throws out the old cert chain and generates a new on from scratch. The new cert is self signed. This is a newNodeId
and the old one is now Invalid.resetRootCert
. This keeps the old root keypair but generates the cert chain from scratch. This means theNodeId
remains the same but the cert chain is a new one from scratch.What we want to handle is if a nodes starts using a new
NodeId
but it's oldNodeId
remains valid within it's cert chain. When dealing with these nodes we need to treat it as the valid oldNodeId
while updating any information we have about it to use it's newNodeId
.This means we will have to check the full cert chain when connecting to a node. Determine if the
NodeId
we're expecting is an older node in the cert chain. If it is older we need to obtain the newNodeId
of the node and start using that.The following domains need to be updated to handle the
NodeId
of a remote node changing.sigchain
This stores any claims between nodes. I think a new claim would need to be generated and reference the old one. but this wlll need to be looked into.GestaltGraph
This keeps track of nodes within their gestalts. If a node's ID changes then it needs to be updated here.ACL
stores permissions allowed for each node. If a node's ID changes then it needs to be updated here.NodeGraph
, I think that the new node will be added to the NodeGraph automatically through the usual operation. We may need to remove the old NodeId from the graph. Since the node can be contacted via all it's NodeIds in the cert chain it's possible for a node to exist in the graph as multipleNodeId
s. So we only want to keep the newestNodeId
for the node.It's also possible that when a node's ID changes it's old
NodeId
and information will slowly exit the network as it is replaced with the newNodeId
. As a result the node will become un-discoverable with the old ID though it may be unlikely. We may need a way to discover a node ID via it's old nodeId by having nodes keep information about the ID change when we update our information on it. That way we can inform other nodes about the change when they come looking for it.Additional context
NodeId
changestests/bin/keys/reset.test.ts
andtests/bin/keys/renew.test.ts
stopping the PolykeyAgent #347 - never figured out the core problem for test failures during key renewalTasks
SigChain
GestaltGraph
ACL
NodeGraph
The text was updated successfully, but these errors were encountered: