-
Notifications
You must be signed in to change notification settings - Fork 38
Enable recovery using a subset of recovery keys #879
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
Conversation
✅ Deploy Preview for marblerun-docs canceled.
|
94db8d8 to
b31012d
Compare
Signed-off-by: Daniel Weiße <[email protected]>
b31012d to
1df337c
Compare
Signed-off-by: Daniel Weiße <[email protected]>
1df337c to
c418763
Compare
Signed-off-by: Daniel Weiße <[email protected]>
Signed-off-by: Daniel Weiße <[email protected]>
| } | ||
| if currentManifest.Config.RecoveryThreshold != updateManifest.Config.RecoveryThreshold { | ||
| a.log.Error("UpdateManifest: Invalid manifest: Recovery threshold cannot be updated") | ||
| return nil, 0, errors.New("recovery threshold cannot be updated") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be sure: we will be able to allow updating this together with "Allow updating recovery public keys on manifest update", right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Its currently blocked since changing the threshold would require re-generating the recovery secrets, which is effectively the same as changing the keys
| } | ||
|
|
||
| // If this was the first secret uploaded, just return | ||
| if r.correctSecrets < 2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we compare to the threshold instead?
And we should catch a threshold of 1 in Manifest.Check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The threshold is unknown for instances in recovery mode.
We could save this information as non-encrypted data, but I'm unsure how that would impact the security of the state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes of course. It's probably not worth then.
| // validateSecretLength checks whether a provided secret has a valid length (either 16 or 32 bytes), | ||
| func (r *MultiPartyRecovery) shamirRecover(secret []byte) (int, []byte, error) { | ||
| uploadedSecretHash := Hash(secret) | ||
| secretsRemaining := len(r.SecretHashMap) - r.correctSecrets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be based on the threshold instead of the number of all keys?
Signed-off-by: Daniel Weiße <[email protected]>
Signed-off-by: Daniel Weiße <[email protected]>
35a7da4 to
aa436d8
Compare
Proposed changes
RecoveryThreshold, to control the number of recovery secrets required to recover the Coordinator's stateRecoveryThresholdnumber of recovery secrets to the CoordinatorAdditional info