Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First part of mieweb/cloud#32. The current Manager opens a Proxmox root console and runs the caller’s command as UID 0. This proposal keeps the console transport and existing CLI syntax, and uses the authenticated Manager login as the guest username for every command, including admin and API-key requests.
Behavior
sudo -n -H -uand verifies the effective guest username and nonzero UID before running the requested program. A missing account, a UID 0 mapping, or a refused switch returnsguest_user_unavailable. The caller cannot supply a different username in the request.mieweb exec --site 1 --container 42 -- sudo -n apt-get update. The guest’s sudoers policy applies. The supplied base image grants passwordless sudo to members ofldapusers.Verification
All 115 Manager v1 API tests and all 30 Linux guest-exec tests passed, including file ownership, timeout cleanup, and connection loss during teardown. A disposable Linux PTY exercised the actual bootstrap and sudo switch from a root shell. The command ran as
nobody(UID 65534), had no controlling terminal, preserved literal arguments, and returned separate stderr and exit status 23. Missing-account and missing-sudo checks returned the expected errors.The live smoke test now checks the caller’s guest username and UID. Running it against a deployed Manager and Proxmox guest is still pending. Cross-provider instance ID and name resolution remains open in mieweb/cloud#32.