-
Notifications
You must be signed in to change notification settings - Fork 3
docs: Introduce section about TUF #222
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
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
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 |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # How TUF Works | ||
|
|
||
| The update server leverages TUF to ensure secure OTA delivery. If you | ||
| are unfamiliar with TUF, you can learn more from this | ||
| [overview](https://theupdateframework.io/docs/overview/). | ||
|
|
||
| > [!NOTE] | ||
| > The [Quick Start](./quick-start.md) shares how to initialize TUF keys | ||
| > and metadata. | ||
|
|
||
| Every key generated and used by the update server is encrypted with an | ||
| HMAC key. Access to the HMAC key is required for using each of the "online" | ||
| keys: Timestamp, Snapshot, and Targets. | ||
|
|
||
| ## Root Role | ||
|
|
||
| The update server uses a single Root key under `<datadir>/tuf/keys/root.key`. | ||
| You **must never lose** this key. | ||
| A loss of a Root key and/or the HMAC key would make it impossible to add new keys; | ||
| in which case there will be no way to sign new Updates after a Root role expires. | ||
|
|
||
| The root role is valid for 20 years (root.json's `signed.expires` attribute). | ||
|
doanac marked this conversation as resolved.
|
||
|
|
||
| > [!WARNING] | ||
| > Backup `<datadir>/tuf/keys/root.key` **and** `<datadir>/auth/hmac.secret` to | ||
| > multiple places including [AWS Secret Manager](https://docs.aws.amazon.com/secretsmanager/), | ||
| > and a physical copy on paper stored in a safe. | ||
|
|
||
| You can remove this key from the server once it's been backed up. It is | ||
| considered an "offline" key and is not required by the update server for | ||
| normal operations. | ||
|
|
||
| ## Timestamp Role | ||
|
|
||
| The update server uses a single Timestamp key under `<datadir>/tuf/keys/timestamp.key`. | ||
| Each Update has its own timestamp.json file. This file is signed with a | ||
| 1-week expiration value. There is a background task running every 4 hours | ||
| that will refresh timestamps expiring in the next 24 hours. | ||
|
|
||
| ## Snapshot Role | ||
|
|
||
| The update server uses a single Snapshot key under `<datadir>/tuf/keys/snapshot.key`. | ||
| Each Update has its own snapshot.json file. This file is signed with a | ||
| expiration value that matches the Targets expiration. | ||
|
|
||
| ## Targets Role | ||
|
|
||
| The update server uses a single Targets key under `<datadir>/tuf/keys/targets.key`. | ||
| This key is used during Update creation to sign the generated targets.json | ||
| metadata. The metadata is signed with a 90-day expiration. See | ||
| [Updates](./updates.md) for more details. | ||
|
|
||
| The Snapshot and Targets expiration values are not automatically refreshed. | ||
| It is up to the operator to keep these values fresh for Updates used over | ||
| 90 days. | ||
|
vkhoroz marked this conversation as resolved.
|
||
Oops, something went wrong.
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.
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'd place this at the top of this section.
As is, it breaks up two paragraphs talking about how important a root key is.
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'm trying to figure out the best wording here. e.g. I don't want to put too many words in front of "you must never lose" or the user will skip right past the most important text of the section.
@kprosise - let me know what you think works best here and I'll apply it for all the sections.
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.
Well for line 19, I think placing it as the last line in the subsection would be best. As for the "you must never lose" bit, perhaps placing it in a warning callout (
> [!WARNING]) would work? I know it precedes a note callout, but I think it would be okay to have two callouts together.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.
@kprosise - I've tried to update this with commit a5316de - let me know if this was what you were wanting.