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

Add checksum for the images #526

Closed
simaishi opened this issue Apr 24, 2017 · 13 comments · Fixed by #890
Closed

Add checksum for the images #526

simaishi opened this issue Apr 24, 2017 · 13 comments · Fixed by #890
Assignees

Comments

@simaishi
Copy link
Contributor

@hayesr We discussed this a while ago, but not sure where we left off... A few things we discussed were:

  • create a file that contains SHA for all images for each nightly/release build or 1 file per image?
  • keep SHA for every build, or just latest nightly + release builds?
@hayesr hayesr self-assigned this Apr 25, 2017
@mfeifer mfeifer assigned simaishi and unassigned hayesr Dec 11, 2019
@simaishi
Copy link
Contributor Author

simaishi commented Dec 13, 2019

@Fryguy @bdunne I think one of you mentioned json can be parsed? Providing something like this will work?

manageiq-azure-devel.json
{
  "date": "2019-12-12",
  "sha256": "9474de767b4c832a048c98044debf7bdcfdd87d73d91c442ca77fa3e572dba8e",
  "size": "1.1 GB"
}

This will take care of #655 and #694 as well.

@Fryguy
Copy link
Member

Fryguy commented Jan 15, 2020

@simaishi Yeah I think that could work

@chessbyte
Copy link
Member

chessbyte commented Apr 6, 2020

@simaishi Not clear on the proposal here. What process will generate the manageiq-azure-devel.json file and where will it be stored?
/cc @Fryguy @bdunne

@simaishi
Copy link
Contributor Author

simaishi commented Apr 6, 2020

@chessbyte We were thinking we'll create the file during build and upload to the same server where the images are (not sure about the exact location).

@chessbyte
Copy link
Member

@simaishi that would be cool - then the code that builds the downloads page can validate each downloadable URL it presents against that source of truth. Let me know when there is something up there and I can make a PR here to validate against it.

@bdunne
Copy link
Member

bdunne commented Apr 6, 2020

There's already the ETag header on the file that can be used to validate the MD5 sum of the file. Is that good enough?

@Fryguy
Copy link
Member

Fryguy commented Apr 6, 2020

ETag is a part of the HEAD request, and I think you can also get the upload date

@Fryguy
Copy link
Member

Fryguy commented Apr 6, 2020

HEAD releases.manageiq.org/manageiq-vsphere-jansa-1-alpha1.ova

Content-Length: 1213552640
Last-Modified:  Thu, 26 Mar 2020 12:21:01 GMT
ETag:           556f00b222fc8b04484fc5c9a07163bf
X-Timestamp:    1585225260.49365

@simaishi
Copy link
Contributor Author

simaishi commented Apr 6, 2020

Ah, ETag is enough to cover this issue.

For the nightly build date (#655), we probably want to get it from the file name as build date isn't upload date?

And if we want to validate what we built is what was uploaded, then we'll need to generate something at build time, but that's a different issue, I guess.

@Fryguy
Copy link
Member

Fryguy commented Apr 6, 2020

I'm less concerned about the validation, though I could see an MD5 (ETag is MD5) generated on the build side and uploaded. MD5 isn't a secure hash, however it's good enough to ensure that someone didn't get a corrupted download.

@simaishi
Copy link
Contributor Author

simaishi commented Apr 6, 2020

Agreed, the original request is for users to be able to validate images they downloaded.

@Fryguy
Copy link
Member

Fryguy commented Apr 6, 2020

@bdunne If we change hosting does the new hosting have ETag, and, if so, what hash function does it use?

@bdunne
Copy link
Member

bdunne commented Apr 6, 2020

The alternative hosting provider that I'm looking at is the same (ETag using MD5sum)

simaishi added a commit to simaishi/manageiq.org that referenced this issue Sep 11, 2020
simaishi added a commit to simaishi/manageiq.org that referenced this issue Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants