-
Notifications
You must be signed in to change notification settings - Fork 281
added root key migration details #445
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
Closed
heartsucker
wants to merge
1
commit into
theupdateframework:develop
from
heartsucker:root-migration-clarification
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1008,6 +1008,23 @@ Version 1.0 (Draft) | |
| ensure that outdated clients remain able to update, without requiring all | ||
| previous root keys to be kept to sign new root.json metadata. | ||
|
|
||
| The exact steps to perform the root.json migration should be as follows: | ||
|
|
||
| 1. The client starts at version N of root.json | ||
|
|
||
| 2. The client downloads version N + 1 of root.json | ||
|
|
||
| 3. The client uses the keys and threshold defined in version N to | ||
| validate the signatures of N + 1 | ||
|
|
||
| 4. The client flushes all knowledge of root.json verion N then uses the | ||
| updated keys and threshold to validate the signatures of N + 1 | ||
|
|
||
| 5. Repeat until the client has reached the latest version of root.json | ||
|
|
||
| That is, if there is 1.root.json that has threshold 2 and 2.root.json that has | ||
| threshold 3, 2.root.json MUST be signed by at least 2 keys defined in | ||
| 1.root.json and at least 3 keys defined in 3.root.json. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this example is a good one to include. |
||
|
|
||
| To replace a delegated developer key, the role that delegated to that key | ||
| just replaces that key with another in the signed metadata where the | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.
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 this be N + 2?)
Either way, I this this is probably slightly wrong, and may leave you in a state where you have no trusted root metadata. Once N + 1 is validated per N, it must also be validated per N + 1, before you can discard N's metadata and fully trust N + 1.
In other words, I would say that 4 should be removed and replaced by these two:
4. The client uses the keys and threshold defined in version N + 1 to validate the signatures on N + 1.
4.5. If both validations have succeeded, then flush all knowledge of root.json version N and heretofore use N + 1's keys and thresholds to validate further versions.
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.
I think heartsucker's use of N + 1 in (4) is correct, it matches your (4). Nevertheless, I do think version N of root.json should only be flushed once N + 1 has been validated against itself and the previous version's keys and threshold.
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.
@vladimir-v-diaz You're right. I should say the flush happens after the validation.