users apply revokes the incus group behind box revoke's back #50
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:bootstrap
scope:coolify
scope:db
scope:docs
scope:drill
scope:installer
scope:labels
scope:platform
scope:runner
scope:users
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/rig#50
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
users applyrevokes the incus group behindbox revoke's backThe bug
users applyconverges membership inrig-admin rig incusexactly —added and removed to match the file. For
incus, the removal is a baregpasswd -d(commands/users-apply.sh:223, and again at:285for thedropped/renamed-user sweep):
For
rig-adminandrigthat is the whole story — rig owns those groups.For
incusit is not: box owns that group, andbox revoke(
box/host/revoke-user.sh) does strictly more with it.What apply silently skips
box revokeremoves the group and then says what the group removal doesnot do:
Supplementary groups are fixed at login. Dropping a user from the group
database does nothing to a session they already hold — a leftover tmux keeps
the Incus socket until it dies.
box revoketreats that as load-bearingenough to warn about by name and hand over the remedy.
rig users applylogsremoved <user> from incusand moves on. An operatorwho removes someone from the users file, watches apply report success, and
believes their VM access is gone is wrong for as long as that user holds a
session — and nothing in the output suggests otherwise.
This is independent of the grant gap: it is wrong today, on every apply that
drops a box-role user.
Why it is worse than it looks
box revoke's own comments flag the sharper edge: a stale-group process cantouch incus-user after a revoke and lazily recreate the project with
incus-user's stock defaults — the unhardened NAT bridge, un-narrowed. That
is why
--purgeterminates sessions first. A bare revoke accepts the riskand says so out loud. rig's silent
gpasswd -daccepts the same risk andsays nothing.
Options
box revokewhen dropping theboxrole onhost=yes— thesymmetric counterpart to the grant issue, and the option that keeps one
owner for the group. Never
--purgefrom apply: deleting someone'srunning boxes is not a convergence step and must stay an explicit
admin act.
gpasswd -d, add the warning. Cheaper, no new box dependency onthe revoke path, but it duplicates box's knowledge in rig and will drift.
Option 1 preferred, for the same reason as the grant issue: box owns the
group, so box should be the one to give and take it.
Note
Apply must still handle a user dropped from the file on a
host=nobox, oron a host where box is not installed — the group is absent there and there is
nothing to revoke. The existing
INCUS_OKguard covers the read side; theremoval path at
:223and:285currently has no equivalent.