Repository navigation
fix(windows): let normal users launch SSH runs - #915
Merged
Merged
Conversation
With the old launcher, SSH failed for every non-elevated Windows user: the spawned `orx ssh-service` re-ran a PowerShell Get-Acl/Set-Acl step and died with "The process does not possess the 'SeSecurityPrivilege' privilege", which surfaced as "Could not start the SSH monitoring service". Set-Acl rewrites the SACL as well as the DACL, and only the second run hit it, so the first launch of the directory looked healthy. Direct Win32 calls write the DACL alone and drop a powershell.exe spawn from every service start. The owner check and the protected, inherited FullControl-for-the-current-user DACL match the script. Closes #824 Assisted-by: claude-opus-5.5
Each SSH password prompt opened a blank window titled orx.exe. The engine spawns ssh with DETACHED_PROCESS, so ssh has no console to hand on, and Windows gives its console-subsystem askpass child a new, visible one. CREATE_NO_WINDOW applies only to ssh commands that use askpass. Batch logins keep DETACHED_PROCESS on purpose: with a hidden console, a ProxyJump hop that ignores BatchMode would wait forever on input nobody can type, where today it fails. Askpass commands are safe because the hop inherits askpass too. Assisted-by: claude-opus-5.5
On Windows the old launcher logs in only through Connect, even with a key, so a key host with the new engine off failed launches with "Use Connect" while the SSH page offered only Test. The CLI was the only way out. The server reports connectRequired from the same check Connect uses, so a key host with a live old-launcher run keeps Connect after the setting is turned on. A new field keeps `class` meaning what the engine classified. Assisted-by: claude-opus-5.5
Contributor
[Medium impact] The changes affect Windows SSH launch and host-connection workflows. Fix the Windows test expectation before merging so the suite passes with the engine enabled. Findings
Fix with agent prompt### Issue 1
src/commands/up/api_v2/tests.rs:1714
On Windows, this assertion fails with `ORX_RUN_ENGINE=1` or in a canary build. The fixture inserts only a `submitting` run, which `list_active_runs()` excludes. With the engine enabled, `supervised_ssh_needed()` therefore returns `false`, so the server correctly returns `connectRequired: false`, but the test expects `true`.
Test both settings in isolated child processes and assert the matching value.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThis PR fixes Windows SSH startup for normal users.
|
With the engine setting on, a submitting run alone does not need the old launcher, so key hosts report connectRequired false on Windows. Assisted-by: claude-opus-5.5
1 task
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.
With the run engine off, every SSH launch failed for a normal (non-elevated) Windows user with "Could not start the SSH monitoring service". The service's private directory was locked down with PowerShell
Set-Acl, which also rewrites the SACL and needsSeSecurityPrivilege. It's now a native Win32 call that writes only the DACL, with the same owner check and the same owner-only access.Two smaller Windows fixes ride along. Password prompts no longer pop a blank
orx.execonsole window: askpass ssh commands getCREATE_NO_WINDOW, while batch logins keepDETACHED_PROCESSso a ProxyJump hop can't hang on invisible input. And key-only hosts now offer Connect when the old launcher needs it, where the SSH page only had Test and the CLI was the only way out.Proved on a fresh Windows 11 VM as a non-elevated user against a real SSH host: setting-off launch, exit 7, cancel, killed sessions + one Connect, setting on, askpass with no window, key-host Connect, all pass. main fails the first one. fmt, clippy (also for the Windows target),
cargo testboth engine modes and theui/checks pass on macOS. Not covered: the installed app, a release MSVC build, real MFA, Windows 10.Reviewed with sol-loop: 1 round with gpt-6.1-sol.
Fixes ORX-652
Fixes ORX-642
Closes #824
Assisted-by: claude-opus-5.5
Assisted-by: gpt-6.1-sol