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

Revisit public image handling #14509

Open
markylaing opened this issue Nov 22, 2024 · 1 comment
Open

Revisit public image handling #14509

markylaing opened this issue Nov 22, 2024 · 1 comment
Labels
Improvement Improve to current situation

Comments

@markylaing
Copy link
Contributor

#14260 will add support for fetching images in all projects. This has led to a discussion around the purpose of public images that are not in the default project.

If I make project foo, then create an image and make it public, it's not accessible to an untrusted caller unless they know that project foo exists. Additionally, how could the untrusted caller resolve any aliases related to the image?

Similarly, if I'm running a nested LXD all image requests over devlxd are using the default project. So I can't expose an image to a nested LXD in a non-default project by making it public.

Generally I think this all needs work. Priority wise this depends on whether people actually use the feature (my feeling is probably not very much). For nesting it already works well because cached images are always placed in the default project.

As an idea, since image fingerprints are unlikely to collide we could present a view of public images from all projects. For example, if the caller is not authenticated GET /1.0/images would return all public images regardless of project. If the caller is authenticated, it will return all public images and all images in the default project that are private (providing they have permission to view them). However this would become tricky if the caller needs to resolve the image from an alias, as aliases are project specific and likely to collide.

@markylaing markylaing added the Improvement Improve to current situation label Nov 22, 2024
@tomponline
Copy link
Member

tomponline commented Nov 22, 2024

For nesting it already works well because cached images are always placed in the default project.

Is that true? What about images downloaded into a project with features.images=true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Improve to current situation
Projects
None yet
Development

No branches or pull requests

2 participants