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

Use canonical etag for BCO #8

Open
bentsherman opened this issue Sep 28, 2023 · 0 comments
Open

Use canonical etag for BCO #8

bentsherman opened this issue Sep 28, 2023 · 0 comments

Comments

@bentsherman
Copy link
Member

The BCO standard includes an "etag" field which should be a SHA256 of the BCO manifest. The hash should ideally be "canonical", which in this context means that it shouldn't be affected by things like the order in which tasks were executed. With the current code, you could perform the exact same run twice and get a different etag because of the task ordering.

The etag should be improved by making sure that collections in the BCO manifest are always ordered in a consistent way.

Tasks are currently sorted by task id (which is used for the step number), which is not compatible with the goals of this issue. If we want to have it both ways, we could compute the etag separately from the actual BCO manifest. The downside there is that we have to keep the rendering code in sync with the hashing code. Might need to think more on this.

@bentsherman bentsherman changed the title Use canonical hash for BCO Use canonical etag for BCO Sep 28, 2023
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

No branches or pull requests

1 participant