-
-
Notifications
You must be signed in to change notification settings - Fork 415
Description
Is there an existing issue for this?
- There is no existing issue for this feature
What are you currently unable to do
Currently, Incus certificate-based access control works at the project level. When using incus config trust add --restricted --projects <project>, the certificate gains access to all instances within that project.
In CI/CD environments (GitLab CI, GitHub Actions, etc.) with Ansible automation, this creates a security concern: if a runner is compromised, the attacker gains exec access to ALL instances in the project, not just the ones that specific CI job needs.
For example, I have a project with 15 instances including sensitive ones (Vault, GitLab, Keycloak) and less sensitive ones (Grafana, YouTrack). I want my deploy-grafana CI job to only have exec access to the grafana instance, not to vault or gitlab.
The current workarounds are:
- Multiple projects — splits infrastructure awkwardly, complicates networking and management
- OpenFGA integration — requires deploying and maintaining a separate authorization service, significant operational overhead for simple use cases
- SSH keys per instance — works but adds complexity (key management, rotation, sshd in containers) that Incus exec elegantly avoids
What do you think would need to be added
Add the ability to restrict certificate access to specific instances, not just projects. Something like:
# Restrict certificate to specific instances within a project
incus config trust add ansible-grafana \
--restricted \
--projects myproject \
--instances grafana,monitoring
# Or using instance patterns
incus config trust add ansible-runners \
--restricted \
--projects myproject \
--instances "gitlab-runner-*"This would allow the certificate to:
- List/view only specified instances
- Exec/console/files access only to specified instances
- No access to other instances in the project
This fits well with the existing --restricted model and would make Incus much more suitable for secure CI/CD automation without requiring external authorization systems.