Repository navigation
Conversation
|
Do we need to ensure that the entire "stack" of layers has the same hash, or just the topmost? Since only the topmost is ever run (and the final filesystem image is technically independent of the previous images), is it necessary to hash all of the parent images? (I would personally prefer to hash everything, just playing devil's advocate). If we do need to, we could potentially hash together each of the filesystem hashes. Otherwise, we can just get the |
|
On Tue, May 27, 2014 at 09:28:23PM -0700, Aleksa Sarai wrote:
I want hashes of every file in the assembled (squashed) filesystem.
I don't think this is true. For example, in several of my tagged /: So the file section would look something like: sha1 with images in the same order as they stand in the 'docker history' |
|
I would hope that we get deterministic image IDs, so then we could tarsum/fingerprint each layer. Then assuming you've validated each layer, you could not arrive at the ID of the next layer without sum checking out. |
|
Also, I'm glad to see you working on this, and I hope to review this soon. |
|
Docs LGTM - though I presume they may change during the implementation discussions |
|
@wking Can you rebase on master and fix the code so it compiles? TarSum of a layer is a presently a fixed-time checksum of that filesystem + the json metadata, and does account for uid, gid, etc. Since the current image-id (layer + json) is not a deterministic id, but a random 32byte hex value, it only provides so_much assurance that the referenced parent image-id is the exact parent (pretty-good, but not content-addressable-good). In the meantime, calculating a squashed checksum for an image, is effectively the same as a set of tarsums, of that image and all of its ancestors. It would be just as expensive, unless the actual image is being flattened to have no parent layers. Also, since the current /: is somewhat arbitrary, and could point to a new image-id momentarily, and the Metadata (json) is already accounted for in the TarSum, the mostly critical pieces of what is being signed is an image-id and its corresponding TarSum. Then when you load or pull an image, and even if you must re-tag it for a local-registry, then the image would still validate. Make sense? @shykes I realize this is thick in the identity trust model, but thoughts on this? |
There was a problem hiding this comment.
maybe be more explicit about the parameter you're expecting.
There was a problem hiding this comment.
On Wed, Jul 02, 2014 at 11:10:23AM -0700, Johan Euphrosine wrote:
@@ -251,6 +251,20 @@ func getEvents(eng *engine.Engine, version version.Version, w http.ResponseWrite
return job.Run()
}+func getImagesFingerprint(eng *engine.Engine, version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
- if vars == nil {
return fmt.Errorf("Missing parameter")maybe be more explicit about the parameter you're expecting.
That's just copy-pasted from getImagesHistory. I'm fine changing it
(it seems like we only use vars["name"]), but I think consistency in
the Docker source is also important.
Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
Modeled on getImagesHistory. Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
This needs a better output example and a way to specify tags. Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
Just pass the server-side response through unchanged. We want the output to match the user's locale, but also have an option to spit out canonical UTF-8 for consistent signatures. Unfortunately, I don't know how to do any of that in Go yet :p. Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
Docker-DCO-1.1-Signed-off-by: W. Trevor King <[email protected]> (github: wking)
|
On Tue, Jul 01, 2014 at 11:54:27AM -0700, Vincent Batts wrote:
Rebased. Sorry about the delay :p. I think getting it to compile may
But I don't think users really care about validating the history. In
It would be cheaper, because you no longer have to calculate tarsums
I don't want it to validate if it's been re-tagged. For example, if Of course, I'm not a big fan of forced renames when pushing to |
|
On Sun, Jun 29, 2014 at 09:52:38PM -0700, Sven Dowideit wrote:
Definitely, although so far there hasn't been all that much discussion |
|
The implementation for #8093 should cover what this PR is trying to accomplish. The implementation we are working on is farther reaching as it effects the image format and the registry, but it achieves image verification through cryptographic hashes along with chain of trust. |
|
On Wed, Sep 24, 2014 at 09:19:53AM -0700, Derek McGowan wrote:
This proposal also provides image verification and tag association |
The "should we do this" discussion starts in #2700 [1](where it still
hasn't reached a consensus). The goal here is to implement:
The tarsum should be the tarsum of the assembled image (squashing all
layers), not the tarsum of the tip layer.
The current implementation is a work in progress. I'm still not clear
on how the whole server/job API is supposed to get wired together, and
have been basically pattern-matching off 'git grep -i history'. I'm
posting the WIP branch because I won't have time to work on it for the
next few days, and wanted to open it up in case anyone else wanted to
chip in.
#2700 (comment)