-
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
Testnet nodes generates multiple root certificates - it should only have 1 #597
Comments
I think we have automatic renewal in the certificates. This could be causing this problem. We need automatic renewal when the certificate reaches expiry date. Remember the node ID doesn't change, but there's a new certificate. |
I had a look at the certs we're getting from the seed nodes.
It's very likely renewing the certs with the same keys. |
Testing the |
Describe the bug
Connecting to the testnet node 3.106.15.126 shows that it currently has multiple certificates. This shouldn't be the case because we have not executed any sort of key renewal or rotation.
Is it possible that it is using some pre-existing state? But then it shouldn't add certificates that isn't part of its root key chain.
See the
certChainPEM
output. Also I think this requires a better formatting... I think it is because strings aren't being formatted, they are written like a debug string with\n
showing literally instead of being printed. This goes for all the strings actually.We could take the PEM, put into a file, and use
step certificate inspect
to find out what these certificates are as a sanity check.To Reproduce
pk agent status --client-host 3.106.15.126 --client-port 1315 --node-id v7v9ptvcdbdf8p4upok3prpmu3938ns8v4g45dib7sm5hqvvehv70
Expected behavior
It should only have 1 single root certificate.
Especially because we have not called to renew or rotate the certificate. The key generation is supposed to be deterministic and thus produce a deterministic root key from the recovery code and then that should result in a single certificate.
It is possible that there is pre-existing state there... perhaps the same VM and EBS storage means that older certs is being loaded too, we need to make our GC system a bit more robust, especially if a new key is being generated from scratch, old certs should be removed.
Additional context
Notify maintainers
The text was updated successfully, but these errors were encountered: