Skip to content

Name Delegation Design Discussion #11

Open

Description

@philips

DNS delegation is the idea that I can own the domain example.com but delegate hosting of my container images to container.hosting. Think MX records, where I have a DNS name that tells me where to send email for a domain without the dedicated special DNS record.

Today, AppC supports a method for doing this type of delegation that uses HTTPS, and HTML meta tags. This type of delegation is inspired by the method used by the go get package management system as well.

One critique of this method is that there is an RFC for this sort of meta information called 'well-known URIs'. I believe that using this type of well-known scheme is a better choice today and will stay out of people's way better; in fact we prototyped this in a project called abd.

FAQ
Why not DNS: If we used DNS it would make it hard to bootstrap trust of this source based on the existing well understood TLS infrastructure on the internet today. With systems like Let's Encrypt in place today I think it would be smart to rely on this existing trust root. We do this in rkt today and it works nicely.

But I have this way better way of doing delegation: We can add additional methods, but having some method to start for delegation is super helpful.

I don't want to allow outbound traffic to the internet: Container engines can allow for this feature to be turned off or configure that certain domains are statically delegated to internal mirrors. This is all about having a default UX.

Activity

  1. wking commented on Apr 7, 2016

    @wking
    Contributor

    On Wed, Apr 06, 2016 at 05:15:43PM -0700, Brandon Philips wrote:

    I believe that using this type of well-known scheme is a better
    choice today and will stay out of people's way better…

    I think blob delegation should be outside the scope of the image
    format, since blobs that are content-addressed based on a
    cryptographic hash can be fetched from any content-addressable storage
    (CAS)—although registries probably want to include hints about hosts
    providing blobs required by a given image 1. Baking CAS repository
    information into the image manifests requires folks to make
    distribution-time decisions at image-creation time (and image authors
    and distributors need not be the same people).

     Subject: DNS-based delegation (was: Proposal for a new project: OCI Image Format Spec)
     Date: Sat, 12 Mar 2016 15:34:11 -0800
     Message-ID: <[email protected]>
    
  2. philips commented on Apr 7, 2016

    @philips
    ContributorAuthor

    @wking This isn't about blob delegation. This is about delegation of naming for images. Which is explicitly in scope (see the README).

  3. wking commented on Apr 7, 2016

    @wking
    Contributor

    On Thu, Apr 07, 2016 at 06:47:35AM -0700, Brandon Philips wrote:

    @wking This isn't about blob delegation. This is about delegation of
    naming for images. Which is explicitly in scope (see the README).

    Ah, it's just about discovering manifest hashes. Developing and
    versioning the separate image/naming/signing components 1 in a
    single repository sounds complicated to me (do you make a major bump
    when you adjust the naming spec, even though you haven't touched the
    image spec?). But discovering manifest hashes using an approach like
    this sounds like one of several reasonable registry approaches to me.

  4. stevvooe commented on Apr 11, 2016

    @stevvooe
    Contributor

    @philips Let's make a note here to consider cases such as notary for naming delegation.

    Have we decomposed naming delegation to particular set operations?

  5. philips commented on Apr 11, 2016

    @philips
    ContributorAuthor

    @stevvooe I don't see how notary relates to name delegation. Do you have a doc?

  6. added this to the v0.1.0 milestone on Apr 14, 2016
  7. philips commented on Apr 14, 2016

    @philips
    ContributorAuthor

    @stevvooe Ping.

  8. stevvooe commented on Apr 14, 2016

    @stevvooe
    Contributor

    @philips You can read here. The link is fairly straightforward. Let me know if you have more questions.

    Perhaps, I am misunderstanding naming delegation. We may need a clear definition and identification specific use cases it solves for the individual user. Part of the crux with naming delegation is that it is great for ISVs and service providers but I'd like to better understand where the user gains benefit. We struggled with our efforts from this angle when we looked into this. If I were, say, a data scientist, why should I have to setup DNS and a web service to deploy software in my local infrastructure?

    I do find such strategies as go get or well-known urls to be elegant but getting them reliably deployed can be a nightmare in some organizations (well-known being the clear winner here, perhaps).

    We also may want to value offline use cases slightly higher. In typical deployments, there may only be a few organizational mirrors. In the abd examples and some of the proposals we had in this area, it focuses on mirrors in the Internet at large but it seems more likely to have a local mirror, rather than spreading requests across the internet.

  9. ibuildthecloud commented on Apr 22, 2016

    @ibuildthecloud

    Every enterprise I work with wants a trusted repository of data. This is a model they are very familiar with. Think rpm/deb repo or Java's maven repos. How does this name delegation model work for this model? For example imagine nginx comes from nginx.com. But in the "enterprise" they want to mirror the images from nginx.com to their local servers such that when a user pulls "nginx" it goes to the on prem repo and not the internet.

  10. philips commented on Apr 22, 2016

    @philips
    ContributorAuthor

    Configuration to declare where the mirror is for nginx.com or more likely
    '*'. It is just namespaces that has some default useful semantics.

    On Thu, Apr 21, 2016, 7:49 PM Darren Shepherd [email protected]
    wrote:

    Every enterprise I work with wants a trusted repository of data. This is a
    model they are very familiar with. Think rpm/deb repo or Java's maven
    repos. How does this name delegation model work for this model? For example
    imagine nginx comes from nginx.com. But in the "enterprise" they want to
    mirror the images from nginx.com to their local servers such that when a
    user pulls "nginx" it goes to the on prem repo and not the internet.

    —
    You are receiving this because you were mentioned.
    Reply to this email directly or view it on GitHub
    #11 (comment)

  11. ibuildthecloud commented on Apr 22, 2016

    @ibuildthecloud

    Does this work today already on rkt or appc? I'd like to understand more. I'm trying to wrap my head around this. The fact that it's model after go is the problem for me. Go has so many distribution problems where other languages like node and Java don't really. But the fundamental difference in the two is that node/Java have a centralized de facto store for everything (npm/mvn central). I have an easier time grasping the idea that name resolution is not decentralized but instead done based on a small set of chosen trusted sources.

  12. 52 remaining items

  13. brendandburns commented on May 19, 2016

    @brendandburns

    @wking

    So my thought is that you would sign with your keys prior to uploading the image to the registry, but I haven't thought super deep about the signing problem, since I think its different than name resolution, and I've focused name resolution for this issue.

  14. wking commented on May 19, 2016

    @wking
    Contributor

    On Thu, May 19, 2016 at 10:18:18AM -0700, Brendan Burns wrote:

    … but I haven't thought super deep about the signing problem, since
    I think its different than name resolution, and I've focused name
    resolution for this issue.

    I think signing is going to be inseparable from name resolution.
    There needs to be clarity about which name is being verified 1, and
    if it's not the user-supplied name (e.g. it's a canonical version),
    there needs to be clarity on the trust model for the canonicalization
    2.

    On the other hand, signing should be orthogonal from distribution.
    So a client should be able to fetch the image from any provider (a
    CNAMEd host, local mirror, email attachment, etc.) and still be able
    to verify that the image has the name you're looking for. For example
    (based on 3):

    $ oci-image-tool unpack path/to/my-oci-image.tar.gz debian-1.0

    which unpacks the image whose name matches debian-1.0 after checking
    that the debian-1.0 entry is appropriately signed.

    $ oci-image-tool unpack https://gcr.io/brendanburns/foo mycompany.com/foo

    which unpacks the image whose name matches mycompany.com/foo after
    checking that the mycompany.com/foo entry is appropriately signed.

    With that orthogonal signing in place, how you get from a
    user-specified mycompany.com/foo to a fetching location (e.g. a
    https://gcr.io/brendanburns/foo mirror) doesn't matter much to me.

  15. brendandburns commented on May 19, 2016

    @brendandburns

    @wking
    I think we agree. I view name resolution as being solely about figuring out where to download the thing from.

    The name that you use for validating signing is still the original name.

    Put clearly in an example:

    I start pulling company.com/bar/foo which redirects me to the company.com.gcr.io/bar/foo registry, I download the layers from that registry.

    But then once downloaded, I verify the images using the original name mycompany.com/bar/foo and using keys that are distributed by that company.

    Make sense?

  16. wking commented on May 19, 2016

    @wking
    Contributor

    On Thu, May 19, 2016 at 12:34:05PM -0700, Brendan Burns wrote:

    But then once downloaded, I verify the images using the original
    name mycompany.com/bar/foo and using keys that are distributed by
    that company.

    Sounds good to me, although it sounds more like the pseudo-code in 1
    and text in 2 than the pseudo-code in 3 or text in 4. And if
    the original name is still being used (which I like), I think the
    redirecting is better described by “mirroring” 5 than by
    “delegation” 6 or “canonicalization” 7. And there's no need to
    worry about key hosting 8 or the security of a particular sub-step
    (like mirror choice) 9.

    And with this optional mirror-lookup procedure, I want to make sure
    non-DNS image names are still supported 10. They wouldn't get this
    DNS-based mirroring, but there are many other possible mirroring
    approaches.

    And I am absolutely fine with folks mirroring any image they have
    legal access to. With the image name being a property of the image
    that's independent of mirroring, I don't see why you'd have a problem
    with that 11.

  17. brendandburns commented on May 19, 2016

    @brendandburns

    I guess I think:

    if the owner of the name choses the remapping then it is "delegation" since there no other locations where that image can be found.

    if the owner of the client chooses the remapping then it is "mirroring" since it is copied from wherever the original source is located.

    but it's semantics, I guess. If we have rough agreement on the goals, do we have a preference for DNS or well-known URL? (or both?)

  18. wking commented on May 19, 2016

    @wking
    Contributor

    On Thu, May 19, 2016 at 02:09:02PM -0700, Brendan Burns wrote:

    if the owner of the name choses the remapping then it is
    "delegation" since there no other locations where that image can be
    found.

    How many images are licensed “all rights reserved”? I'd guess for
    things like Debian images, you could have third-parties choosing to
    mirror images as they see fit, although the original author is always
    free to bless (or not) those mirrors as they see fit (e.g. they can
    say “a.example.com and b.example.com also carry this image”, while
    c.example.com and d.example.com are serving copies as well).

    If we have rough agreement on the goals, do we have a preference for
    DNS or well-known URL? (or both?)

    I don't care once things get down to this level. I just get jumpy
    when folks start talking about requiring DNS-based names ;).

  19. brendandburns commented on May 19, 2016

    @brendandburns

    @wking I think we should require dns compatible names. whether the domain actually exists or not is up to the end user.

  20. wking commented on May 19, 2016

    @wking
    Contributor

    On Thu, May 19, 2016 at 02:31PM -0700, Brendan Burns wrote:

    I think we should require dns compatible names. whether the domain
    actually exists or not is up to the end user.

    What's the benefit to requiring DNS-based names but allowing
    nonexistant domains? I explained why I want X.509 to be one option
    among many for image trust earlier [1,2]. You floated localhost-based
    naming earlier 3, but I think we agree that you won't be using an
    X.509 certificate chain [4,5], because no CA will certify you as the
    owner of ‘localhost’ (I hope ;). And if you're using OpenPGP or
    similar, the name is an opaque string as far as trust is concerned.

    So folks intending to use DNS-based mirror discovery should be using
    DNS-based names (with valid domains) 2. But I don't see how you
    benefit from having ‘localhost/my-app-v1.0’ instead of my preferred
    ‘my-app-v1.0’ as an image name for folks who don't need DNS-based
    mirror discovery.

  21. modified the milestones: , v0.2.0 on Jun 1, 2016
  22. philips commented on Jun 15, 2016

    @philips
    ContributorAuthor

    We have been discussing naming for quite some time but I would like to propose to the @opencontainers/image-spec-maintainers that we move this to the post-v1.0.0 milestone for two reasons:

    1. Naming is an "optional layer" for the specification scope. We have moved the other "optional layers" out such as signing in signing: start discussion on signing #22 to post-v1.0.0 as well so we can focus on the initial release being the required layers.

    2. We all have a really solid idea of how this will work using well-known URIs and pointing at a registry that implements the v2 CAS API. But, we should focus on getting those registry transports working first before we add a layer on top. I know a variety of the registry implementations at Google, Amazon, and Quay.io have this on their roadmap.

    We can discuss during the call tomorrow or here. If you are ok or not ok moving to post-v1.0.0 speak up below.

  23. modified the milestones: post-v1.0.0, v0.3.0 on Jun 17, 2016
  24. vbatts commented on Sep 30, 2021

    @vbatts
    Member

    I still want this idea. It was one of the earliest topics, and lengthy discussion.
    Keeping this in the milestone "post-v1.0.0" and not closing, though there may be merit in opening a new issue with concise overview.
    Particularly, now that there are multiple choices of public registries, including running your own, but having an on-premise registry that is not just a pull-through-cache, which can serve up an identified image, which a verifiable author of said content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions