You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 10, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 10, 2020. It is now read-only.
(atomic sign) and (skopeo copy) are inconsistent WRT Docker sigstore configuration #594
Per #539 (comment) , the sigstore configuration is done differently in atomic sign and skopeo copy, i.e. skopeo copy won't see signatures created by atomic sign.
We need to make these consistent; it is not as important how, but we do need to do that.
Within the first match (only), which should be a dictionary, it uses the field sigstore-write if writing and it is defined, or sigstore (for either reading or writing). The value of the field is an URL to the top directory for the sigstore to be used for these images (which still uses the standard layout, i.e. $sigstore_dir/hostname/ns1/ns2/...).
Rationale for the more complex containers/image design:
Supports HTTP: we can configure to use remote signatures directly, without fetching them to a local directory first.
Allows a separate sigstore-write location for staging new signatures to be published (i.e. the read path can use the public HTTP version which public users see, and the write path is company-private; the company can of course use the same local path for reading and writing instead)
Allows different signature stores for different repositories, i.e. docker.io/redhat and docker.io/coreos can publish HTTP sigstores and we can use both of them at the same time (i.e. federation model, not a Notary-like single point of distribution)
The default for repositories which have not been specifically configured is to refuse to store signatures (though the user can use "" if they really want to); if nobody has configured a sigstore
for a repo, they very likely haven’t thought about a publishing workflow for the signatures, so we shouldn’t be storing them somewhere in /var and pretending to suceed signing when the signatures are invisible to consumers of that image and the user pushing the image has no idea they are invisible.
containers/image would, to be vendor-neutral, perhaps not referring to /etc/atomic.conf (though I wouldn’t particularly mind).
lookaside.go currently accepts an "" key (YAML for empty string) to mean “global default”; that is logically consistent but pretty ugly.
Just using default would clash with the host name default, a confusing design bad for security.
Posible options:
The "" key to mean default
Reformat the individual YAML files to have a top-level repositories key for scoped items, and an top-level default key (avoiding the semantic conflict) [this is what policy.json does]
Add another special file, /etc/containers/registries.conf with default-sigstore and default-sigstore-write (i.e. a different YAML format)
Drop the concept of “sigstore used for all of the interned unless configured otherwise” entirely, and require users to explicitly configure at least the host name for each sigstore.
… actually the last one seems pretty attractive. It is the least amount of work and the need for a global default is unclear to me. We can add a solution later if needed.
(Not that I’m saying the test is a canonical reference, we are changing the design now; but sigstore: http://… should be boringly unsurprising.)
so each yaml file should have a top level registries yes?
I wouldn’t mind but I don’t think it is necessary after all; we can either use "" or make the default a special case with a special config file.
for now, can we make that assumption? each file has a top level registries: ? i think that makes the logic simpler; however, I'm open to change. Lets just be definitive.
(registries/repositories? registry = host name; repository = lowest-level namespace IIUC; the intermediate namespaces are not named in docker/distribution v2. Whatever.)
Actually, I think the top-level key in those files should be named docker; we don't have anything else in /etc/containers saying "docker distribution API" and we may need to support other distribution protocols. If /etc/containers is technology-agnostic, something needs to say which technology a specific file or specific sigstore scope is talking about.)
I think the top-level key in those files should be named docker
I'm good with that. As I understand it, concatenating these files into a single data structure would throw this key away or create a list of all the "docker" items.
Activity
mtrmac commentedon Sep 7, 2016
cc @baude @rhatdan @aweiteka
aweiteka commentedon Sep 8, 2016
Seems like a no-brainer to use containers/image mechanism.
aweiteka commentedon Sep 8, 2016
/etc/atomic.conf should just have global configuration.
/etc/containers/registries.d should have yaml files configuring each registry
aweiteka commentedon Sep 8, 2016
Flat list of yaml files concatenated with registry[/repo] as keys.
mtrmac commentedon Sep 8, 2016
containers/image would, to be vendor-neutral, perhaps not referring to
/etc/atomic.conf(though I wouldn’t particularly mind).lookaside.gocurrently accepts an""key (YAML for empty string) to mean “global default”; that is logically consistent but pretty ugly.Just using
defaultwould clash with the host namedefault, a confusing design bad for security.Posible options:
""key to mean defaultrepositorieskey for scoped items, and an top-leveldefaultkey (avoiding the semantic conflict) [this is whatpolicy.jsondoes]/etc/containers/registries.confwithdefault-sigstoreanddefault-sigstore-write(i.e. a different YAML format)… actually the last one seems pretty attractive. It is the least amount of work and the need for a global default is unclear to me. We can add a solution later if needed.
baude commentedon Sep 8, 2016
@mtrmac @aweiteka can you drop some example files that would land in /etc/containers/registry.d/. Two or more?
mtrmac commentedon Sep 8, 2016
@baude AFAICS https://github.com/mtrmac/skopeo/blob/e25d93fe391364602267d451b7f931c1f4c5d0c8/integration/fixtures/atomic.conf would still work.
s/localhost:5555/docker.io/gon this to get a second example;(edit)
Also test
docker.io/ns1/ns2/ns3/ns4/ns5(and prefixes), anddocker.io/ns1/ns2/ns3/ns4/ns5:notlatest(or someone stop me and tell me that per-tag configuration is silly; I kinda feel it is but I like the symmetry)baude commentedon Sep 8, 2016
so each yaml file should have a top level registries yes?
baude commentedon Sep 8, 2016
@mtrmac do you have an example for when it should be http instead of file.
mtrmac commentedon Sep 8, 2016
@baude just
s,@split-read@,http://some.host[:port]/path,? per https://github.com/mtrmac/skopeo/blob/e25d93fe391364602267d451b7f931c1f4c5d0c8/integration/copy_test.go#L285 and the surrounding code.(Not that I’m saying the test is a canonical reference, we are changing the design now; but
sigstore: http://…should be boringly unsurprising.)mtrmac commentedon Sep 8, 2016
baude commentedon Sep 8, 2016
for now, can we make that assumption? each file has a top level registries: ? i think that makes the logic simpler; however, I'm open to change. Lets just be definitive.
mtrmac commentedon Sep 8, 2016
Sure, doesn’t hurt.
(registries/repositories? registry = host name; repository = lowest-level namespace IIUC; the intermediate namespaces are not named in docker/distribution v2. Whatever.)
baude commentedon Sep 8, 2016
@mtrmac can you clarify this last comment? I dont quite follow, examples are helpful,.
mtrmac commentedon Sep 9, 2016
(So that I don’t forget, a late thought:
Actually, I think the top-level key in those files should be named
docker; we don't have anything else in/etc/containerssaying "docker distribution API" and we may need to support other distribution protocols. If/etc/containersis technology-agnostic, something needs to say which technology a specific file or specific sigstore scope is talking about.)aweiteka commentedon Sep 9, 2016
I'm good with that. As I understand it, concatenating these files into a single data structure would throw this key away or create a list of all the "docker" items.
mtrmac commentedon Sep 9, 2016
So, to make it specific, like this?
These would go into
/etc/containers/registries.das *.yaml.I will also write a documentation page, to be included in containers/image.
internal-example.com.yaml.txt
internet-user.yaml.txt
mtrmac commentedon Sep 9, 2016
(Disclaimer: I don’t have an implementation, may include stupid typos and unimplementable design )
mtrmac commentedon Sep 10, 2016
containers/image#52 now implements this, format documentation in https://github.com/mtrmac/image/blob/docker-lookaside/docs/registries.d.md (to become https://github.com/containers/image/blob/master/docs/registries.d.md ).
rhatdan commentedon Sep 14, 2016
Are we aligned now? Can I close this issue?
rhatdan commentedon Sep 17, 2016
@baude @mtrmac Please comment?
baude commentedon Sep 18, 2016
I believe we are