Restricted project - have I misunderstood how this is supposed to work?

Objective: Have a remote incus instance to be used as an image repository. Most clients just need read-only access to the base images, a few need to be able to create/remove images.

I created a project “published” with features.images set to false. I create a client trust entry (TLS cert) restricted just to that one project.

Then I create a test image in the default project and check it shows up (on the repository host in the “published” project (it does).

From the client I can see the image with incus image list myrepo: --project=published but if I try to launch or copy the image I get an error about permissions for the default project.

$ incus launch --project=published myrepo:alp1x86 local:
Launching the instance
Error: User does not have permission for project "default"

I think I can see what is happening - the image is actually in the default project and when it tries to copy the image to the client permission is denied.

But… if that is the case, I don’t see how “features.x=false” is supposed to work (and clearly it does or it wouldn’t be there). So what have I misunderstood?

incus launch --project tells Incus to create the instance in project published.
I think we’re missing a --image-project or similar at the CLI level to pull an image from a specific project.

Note that an easier approach may be to not use projects for that on the image server side, but simply mark the images that you want to share as public, that way anyone can pull those without having to authenticate at all and you only need authentication to push/publish images on it.

Aha! I was thinking about the wrong end of the connection. Everything falls into place now.

I’m afraid I need some sort of authentication - the server isn’t inside a VPN. I’ll either have a quick look at the “scriptlet” auth stuff or more likely just stick with simplestreams+basic auth on a proxy. The incus-simplestreams tool makes that easy enough to manage.

Thanks