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

Fetch memcached from GitHub Releases over HTTPS. #5

Closed
wants to merge 1 commit into from

Conversation

elithrar
Copy link

Avoids fetching directly over plain HTTP from the memcached site directly.

- Avoids fetching directly over plain HTTP from the memcached site directly.
@tianon
Copy link
Member

tianon commented Jan 18, 2016

I'm a little wary of this given that the official download page link is the one we've encoded here, and given that we explicitly verify the SHA1 (which is hard-coded in the Dockerfile itself). Even the official release notes link to the same files we download/use. 😕

@elithrar
Copy link
Author

You're right about the SHA-1—I'd forgotten that would be an issue as the SHA-1 hashes don't match across the archives (as the result of the way the tarballs are packaged).

I've raised an issue on the memcached repo itself (memcached/memcached#140) to look at resolving this—downloading a major dependency over vanilla HTTP on every build of the image is very far from ideal.

@tianon
Copy link
Member

tianon commented Jan 18, 2016 via email

@ncopa
Copy link
Contributor

ncopa commented Jan 20, 2016

The problem is that you can not verify that the tarball you create the SHA1 sum from is unmodified. You may end up hardcode a SHA1 of a modified tarball.

I don't think the tarball itself needs to be available from https as long as there is a checksum available from https, or if the tarball is signed.

(btw, SHA1 is considered broken now so we should probably use SHA256)

@tianon
Copy link
Member

tianon commented Jan 20, 2016 via email

@tianon
Copy link
Member

tianon commented Jun 29, 2016

I'm closing this since there's unfortunately nothing actionable for us to do here (given that we're using the only mechanism upstream currently officially provides), but I look forward to seeing changes when upstream provides more secure means of verification (be that TLS, SHA256, PGP, etc)! 👍

@tianon tianon closed this Jun 29, 2016
@tianon
Copy link
Member

tianon commented Jun 29, 2016

For reference, the current sha1 values are provided both directly on the downloads page (http://memcached.org/downloads), and in files alongside the source tarballs (http://memcached.org/files/, *.tar.gz.sha1), which we scrape and embed directly into the Dockerfile itself via update.sh (

sha1="$(curl -sSL "http://memcached.org/files/memcached-$fullVersion.tar.gz.sha1" | cut -d' ' -f1)"
).

@tianon tianon mentioned this pull request Jul 5, 2016
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.

3 participants