Skip to content

Manage claim-rotate.sh + gate that sudoers grants are overlay-provided - #221

Merged
d4rken merged 2 commits into
devfrom
fix/managed-path-claim-rotate
Jun 19, 2026
Merged

Manage claim-rotate.sh + gate that sudoers grants are overlay-provided#221
d4rken merged 2 commits into
devfrom
fix/managed-path-claim-rotate

Conversation

@d4rken

@d4rken d4rken commented Jun 18, 2026

Copy link
Copy Markdown
Member

The Rotate-secret feature ships a privileged helper script and a sudoers grant that invokes it. The sudoers file and the webconfig binary are already part of the runtime overlay's managed paths, but the helper script itself was not — so a freshly flashed image works (its rootfs carries the script), while a feeder updated in place via the runtime overlay would receive the grant without the script it points at, and rotation would fail.

This adds the missing managed-path entry for the helper (mirroring the existing identity export/import wrappers) so an on-device update delivers it too.

It also adds a release gate that prevents this whole class of gap: every NOPASSWD command path in the staged sudoers must be provided by a managed-path entry or be a base-OS binary, or the build fails. The grant and the helper are authored in another repo, so nothing previously cross-checked that an update actually delivers what a grant points at; this gate is that check, and it would have caught the omission above.

d4rken added 2 commits June 18, 2026 17:57
The Rotate-secret feature added a privileged wrapper at
/usr/local/lib/airplanes-webconfig/claim-rotate.sh plus a sudoers grant
for it. The sudoers file and the webconfig binary are already covered by
managed_paths, but the wrapper itself had no entry — so a freshly flashed
image carries it (the rootfs ships it) while a feeder updated via the
runtime overlay would get the grant pointing at a script that isn't
linked into place, breaking rotation. Add the missing symlink entry,
mirroring the identity-export/identity-import wrappers.
Add a release gate (sudoers-managed-check.sh, wired into verify-gates.sh)
that fails the build when a staged sudoers NOPASSWD command path is not
provided by a managed_paths entry and is not a base-OS binary under
/usr/bin, /bin, /usr/sbin, or /sbin. This is the cross-repo invariant that
was missing: a privileged helper granted in image-webconfig but unmanaged
here flashes fine yet breaks on an in-place overlay update. The gate would
have caught the claim-rotate.sh omission this PR also fixes.
@d4rken d4rken changed the title Manage claim-rotate.sh so on-device update delivers it Manage claim-rotate.sh + gate that sudoers grants are overlay-provided Jun 18, 2026
@d4rken
d4rken merged commit 09e8d25 into dev Jun 19, 2026
19 checks passed
@d4rken
d4rken deleted the fix/managed-path-claim-rotate branch June 19, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant