feat: switch execute to orchestrator API, add secret command#174
Open
AlephNotation wants to merge 6 commits intomainfrom
Open
feat: switch execute to orchestrator API, add secret command#174AlephNotation wants to merge 6 commits intomainfrom
AlephNotation wants to merge 6 commits intomainfrom
Conversation
- Execute now uses POST /api/v1/vm/{id}/exec/stream by default
instead of direct SSH. This routes through the vsock agent,
which inherits /etc/environment (secrets/env vars). --ssh flag
preserves legacy SSH behavior.
- Flags pass through correctly to remote commands (SetInterspersed)
- New 'vers secret' command (set/list/delete) with:
- Masked output by default (--reveal to show)
- Hidden terminal input when value omitted
- Piped stdin support
- New exec service (internal/services/vm/exec.go) for orchestrator API
- Cross-reference from 'vers env' help to 'vers secret'
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.
Summary
Switches
vers executefrom direct SSH to the orchestrator's exec streaming API, and adds a newvers secretcommand for managing sensitive environment variables.Execute via orchestrator API
vers executenow usesPOST /api/v1/vm/{id}/exec/streamby default. Commands flow through the vsock agent inside the VM, which means they automatically inherit/etc/environment(secrets and env vars).Key changes:
--sshflag preserves legacy SSH behaviorSetInterspersed(false)so command flags like-lapass through correctly--workdir/-wfor remote working directoryvers secretcommandNew command for managing sensitive values with security-conscious UX. Uses the same
/api/v1/env_varsbackend — no API changes needed.Differences from
vers env:vers envvers secret--revealFiles changed
cmd/execute.go--sshfallback,--workdir, flag passthroughinternal/handlers/execute.gointernal/services/vm/exec.gointernal/presenters/execute_types.goExitCodeto viewcmd/secret.govers secret set/list/deletecmd/secret_test.gocmd/env.govers secretin helpContext
Part of the virtual secrets work (design doc). Routing exec through the orchestrator API ensures secrets in
/etc/environmentare visible to all commands, and sets up the foundation for cross-account secret isolation on the backend.