mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-01 04:35:40 +09:00
cozy:tenant:super-admin:base carried '*' on kubevirt.io virtualmachines.
A VirtualMachine written directly is sized outside any application: it
is not a HelmRelease the tenant ordered, so nothing that accounts for
applications sees it, and the same verbs let a super-admin raise the
guest size of a VM a VMInstance release rendered. Nothing in tree needs
the write: power goes through the virtualmachines start/stop/restart
subresources, console and VNC through the VMI subresources, size, disks
and networking through VMInstance values. The grant arrived together
with a '*' on helmreleases that was later removed; this one was missed.
watch stays, because the dashboard watches the VirtualMachine for its
live power state and no other tenant role grants it.
The tenant roles are aggregated from ClusterRoles in several packages,
so a write path can reach a tenant without touching the role that
names it; the install e2e now guards against that.
Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit ad47521c95)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
46 lines
2.2 KiB
YAML
46 lines
2.2 KiB
YAML
# Write verbs a tenant super-admin may hold in its own namespace, read by the
|
|
# "Tenant super-admin holds no write verb outside the allowlist" test in
|
|
# hack/e2e-install-cozystack.bats. One "resource names verb" entry per verb,
|
|
# as that test's jq renders the SelfSubjectRulesReview rather than as
|
|
# `kubectl auth can-i --list` prints it: the resource in can-i's
|
|
# resource-column form, "-" for no resource names, any verb other than get,
|
|
# list and watch. Adding an entry is a reviewed decision that the write is
|
|
# accounted for. apps.cozystack.io is listed whole because every write to it
|
|
# goes through the aggregated apiserver rather than straight to a workload.
|
|
writeVerbs:
|
|
- "*.apps.cozystack.io - *"
|
|
- "backupjobs.backups.cozystack.io - create"
|
|
- "backupjobs.backups.cozystack.io - delete"
|
|
- "backupjobs.backups.cozystack.io - patch"
|
|
- "backupjobs.backups.cozystack.io - update"
|
|
- "endpoints - delete"
|
|
- "events - delete"
|
|
- "persistentvolumes - delete"
|
|
- "plans.backups.cozystack.io - create"
|
|
- "plans.backups.cozystack.io - delete"
|
|
- "plans.backups.cozystack.io - patch"
|
|
- "plans.backups.cozystack.io - update"
|
|
- "pods - delete"
|
|
- "restorejobs.backups.cozystack.io - create"
|
|
- "restorejobs.backups.cozystack.io - delete"
|
|
- "restorejobs.backups.cozystack.io - patch"
|
|
- "restorejobs.backups.cozystack.io - update"
|
|
- "securitygroups.sdn.cozystack.io - create"
|
|
- "securitygroups.sdn.cozystack.io - delete"
|
|
- "securitygroups.sdn.cozystack.io - patch"
|
|
- "securitygroups.sdn.cozystack.io - update"
|
|
- "services - delete"
|
|
- "uploadtokenrequests.upload.cdi.kubevirt.io - create"
|
|
- "virtualmachineinstances.subresources.kubevirt.io/portforward - update"
|
|
- "virtualmachines.subresources.kubevirt.io/restart - update"
|
|
- "virtualmachines.subresources.kubevirt.io/start - update"
|
|
- "virtualmachines.subresources.kubevirt.io/stop - update"
|
|
- "vmimportsources.forklift.cozystack.io - create"
|
|
- "vmimportsources.forklift.cozystack.io - delete"
|
|
- "vmimportsources.forklift.cozystack.io - patch"
|
|
- "vmimportsources.forklift.cozystack.io - update"
|
|
- "vmimporttasks.forklift.cozystack.io - create"
|
|
- "vmimporttasks.forklift.cozystack.io - delete"
|
|
- "vmimporttasks.forklift.cozystack.io - patch"
|
|
- "vmimporttasks.forklift.cozystack.io - update"
|