Skip to content
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

Specify in which order metadata should be published to the repository #126

Conversation

joshuagl
Copy link
Member

@joshuagl joshuagl commented Oct 6, 2020

Include the recommended metadata write order, as detailed in PEP 458, in a new sub-section 3.2.

This is purposefully quite a small addition, with the idea of including more detailed workflows/recommendations in the proposed secondary literature #91

Fixes #105

Adding additional worfklows to what was the "Detailed Workflows" section
would insertion of an additional level of section numbering and
re-numbering the existing steps in the detaile client workflow.

In order to keep things simple and avoid unnecessary re-ordering of the
detailed client workflow, make section 5 deal only with the detailed
client worflow.

Signed-off-by: Joshua Lock <[email protected]>
@joshuagl joshuagl force-pushed the joshuagl/issue105-metadata-write branch from 4f9eca5 to 92f5cbc Compare October 6, 2020 10:51
Specify in which order metadata should be generated and made available on
the repository.

Fixes: theupdateframework#105

Signed-off-by: Joshua Lock <[email protected]>
@joshuagl joshuagl force-pushed the joshuagl/issue105-metadata-write branch from 92f5cbc to d2bc296 Compare October 6, 2020 14:22
Copy link
Collaborator

@mnm678 mnm678 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of comments, but otherwise this looks good. I think it'll be helpful for repository to have some guidance in the spec.

* **3.2 Repository metadata creation**

Metadata SHOULD be generated in the following sequence, in order to ensure
that metadata are not referenced in the repository before they have been
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
that metadata are not referenced in the repository before they have been
that metadata files are not referenced in the repository before they have been

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had originally written that as files but then, with #103 in mind, removed it. Happy to add files back in if you think it is an improvement. I'm anticipating that #103 may require a more intentional set of edits to the specification.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omitting the word file does makes more sense in the context of #103. I find the plural use of metadata a bit confusing, but I think it's technically correct.

* **3.2.2** root metadata (root.EXT)
* **3.2.3** top-level targets metadata (targets.EXT)
* **3.2.4** snapshot metadata (snapshot.EXT)
* **3.2.5** timestamp metadata (timestamp.EXT)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would the mirror metadata be written?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, I forgot about mirror. I think it could be written at any point after the root metadata, because it's not actually referenced by or referencing any metadata explicitly.

It may make sense to list it as 3.2.6, because then we can have some confidence that an implementation conforming to the spec won't write any mirrors metadata until all of the metadata it is mirroring has been written?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Listing it as 3.2.6 makes sense to me. We can also mention it in the paragraph above to state that it can be written at any point.

@trishankatdatadog
Copy link
Member

This is purposefully quite a small addition, with the idea of including more detailed workflows/recommendations in the proposed secondary literature #91

More seriously, what is the difference between "purposefully" and "purposely"? I've always used the latter. Curious... @jhdalek55

@jhdalek55
Copy link

The difference between the two words is slim, yet I feel they are not interchangeable. Purposefully implies "with purpose" or something done to achieve a particular goal or aim, where as "purposely" is more a synonym for "deliberately" or intentionally.

Merriam-Webster defines the difference as follows:

Purposely means "on purpose" or "not by accident," while purposefully means "indicating the existence of a purpose." Although very similar, in context "purposefully" is usually used to indicate a greater level of intent or deliberate aim, as opposed to "purposely."

So, in the use case above, Joshua is correct.

@joshuagl
Copy link
Member Author

joshuagl commented Oct 6, 2020

So, in the use case above, Joshua is correct.

😌 phew

Update section "3.2 Repository metadata creation" to include metadata for
the mirrors role.

Signed-off-by: Joshua Lock <[email protected]>
## **5. Detailed Workflows**

### **The client application**
## **5. Detailed Client Workflow**
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This contradicts the capitalisation change in #127

@lukpueh
Copy link
Member

lukpueh commented Oct 7, 2020

I have the feeling this PR tries to do multiple things at once and in such an abstract way that I am unsure if it helps the reader to better understand them. IIUC it talks about metadata interdependencies in regards to:

  1. target file updates/additions,
  2. trust delegations (keys in root or targets metadata), and
  3. repository consistency for the sake of client queries.

Moreover, I don't think that any of those requires a strict order in which the metadata is written on the repository side. For (1) and (2) the order in which the metadata is written does not really matter, as long as the interdependencies are respected. And for (3) but I think all metadata should be made available at once.

My comment in #105 only had (1) in mind, and I still think that it would be extremely helpful to better understand TUF if the spec explained how metadata is updated if target files are updated/added.
(2) and (3) are already somewhat covered in sections 6.1. Key management and migration and 7.1. Writing consistent snapshots.

I just had a chat with @joshuagl and it seems like we are on the same page. He suggested that we could move targets updates, key management, and consistent snapshot all under a section that is titled something like "Repository workflows/operations".

Although one can argue that any of these topics are a better fit for a secondary literature document, given that they are more concerned with operations than immediate security properties of TUF.

@mnm678, @trishankatdatadog, what do you think?

@joshuagl joshuagl marked this pull request as draft October 30, 2020 12:16
@joshuagl
Copy link
Member Author

Converted to draft until I have made the changes discussed with @lukpueh

@joshuagl
Copy link
Member Author

Closing this PR because it is superseded by #153

@joshuagl joshuagl closed this Mar 29, 2021
@joshuagl joshuagl deleted the joshuagl/issue105-metadata-write branch March 29, 2021 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Describe how updates should occur on the repository side
5 participants