-
Notifications
You must be signed in to change notification settings - Fork 30
Include sha256 hash into the package URL #13
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
base: master
Are you sure you want to change the base?
Conversation
@Anexen : Thanks for the PR. I've finally found some time to work on this project. But I'll look at this PR a bit later because
|
Hi @naiquevin Thanks for the feedback. My plan is to implement |
@Anexen Thanks. I have a concern about downloading the content for the checksum while updating the package index as it's not scalable ie. as the number of artifacts for a package will increase the time taken by An alternate way is to store hash in the object metadata while uploading the file (PUT operation). As per the S3 docs 1, once an object is uploaded, it's metadata cannot be modified. In fact, one of the system generated metadata on every s3 object is Regarding other storage backends:
I think it'd be worthwhile evaluating this option. There'd be no need to add the |
@naiquevin, the use of metadata is a good idea. I can replace Regarding LocalStorage, there are Extended File Attributes which can be used as metadata storage for supported filesystems with fallback to |
Good point about LocalStorage, I missed it completely. I am thinking if hash generation can be made part of the Storage interface itself. Then each Storage can decide how it wants to manage hashes so it will flexible for future storage backends too. What do you think? |
This is exactly what I proposed in the last comment. |
Oh right. I misread it, my bad! |
Hi @Anexen , any update here? |
Pip can check downloaded package archives against local hashes to protect against remote tampering.
The problem:
pip install --require-hashes ...
doesn't work with private repo.Solution: this PR includes sha256 hash into the package URL according to PEP-503.