Skip to content

Bug 2069268 - move the guest health probe onto the key-only probe account - #75

Merged
rcurranmoz merged 1 commit into
mainfrom
bug-2069268-guest-probe-key
Sep 9, 2026
Merged

rcurranmoz merged 1 commit into
mainfrom
bug-2069268-guest-probe-key

Conversation

@rcurranmoz

@rcurranmoz rcurranmoz commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Moves the guest health probe from a shared-credential login onto the dedicated key-only probe account added in ronin_puppet#1366.

Context in bug 2069268 (restricted).

What changed

  • _guest() authenticates with the probe key instead of a password, and runs as an unprivileged account whose sudo is limited to two pinned commands.
  • The worker-id read matches the pinned sudoers entry exactly. The previous form used a regex containing glob metacharacters; sudoers matches arguments with fnmatch(3), so that rule could never have matched and the call would have been denied with the field silently coming back empty.
  • Extraction moved to the unprivileged side and made tolerant of the config shapes worker-runner emits at runtime.
  • Dropping the password login removes the expect wrapper, and with it the two workarounds it needed — the Tcl quoting hop and a prompt match that never fired. That combination made this silently useless for months (26/26 slots reporting guest_reachable:false).

TART_GUEST_PROBE_USER / TART_GUEST_PROBE_KEY override the user and key path for testing during the transition.

Testing

27 tests pass, including a new regression test asserting the probe uses key authentication and that the previous mechanism cannot silently return.

@rcurranmoz
rcurranmoz requested a review from a team as a code owner September 8, 2026 13:33
Context: bug 2069268 (restricted).

_guest() previously authenticated to the guest with a shared credential, driven
through expect. It now uses the `probe` account added in ronin_puppet#1366: key
auth only, unprivileged, with a small fixed set of permitted sudo commands.

The worker-id read is matched to the pinned sudoers entry exactly. The previous
form used a pattern containing glob metacharacters; sudoers matches command
arguments with fnmatch(3), so that entry could never have matched the invocation
and the call would have been denied -- with the field coming back empty and
nothing to explain why. Extraction moved to the unprivileged side and made
tolerant of the config shapes worker-runner emits at runtime.

Dropping expect also removes the two workarounds it needed, which together made
this silently useless for months (26/26 slots reporting guest_reachable:false):
the Tcl quoting hop, and a prompt match that never fired. The base64 hop is kept
-- it is still the cheapest way to stop the remote shell reinterpreting the probe.

TART_GUEST_PROBE_USER / TART_GUEST_PROBE_KEY override the user and key path for
testing during the transition.

Adds a regression test asserting key auth is used and the previous mechanism
cannot silently return. 27 tests pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rcurranmoz
rcurranmoz force-pushed the bug-2069268-guest-probe-key branch from 5fbff02 to ac1fa2d Compare September 9, 2026 12:19
@rcurranmoz rcurranmoz changed the title Bug 2069268 - move the guest health probe off admin/admin onto the probe key Bug 2069268 - move the guest health probe onto the key-only probe account Sep 9, 2026
@rcurranmoz
rcurranmoz merged commit abb9f69 into main Sep 9, 2026
3 checks passed
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