Repository navigation
fix(actor): apply new_password in Rename custom payload - #32
Merged
Merged
Conversation
Win/Linux random-password OS managers (WinRandomPasswordManager / LinuxRandomPasswordManager) send the new password inside the Rename action's custom dict. The actor only invoked rename_computer and ignored it, so the broker ended up holding a password that did not match the one on the machine. RDP from UDS failed while logging in with the original template password still worked -- the exact symptom David reported on 24/09. Apply platform.system().change_user_password(username, old_password, new_password) before the rename, gated on a non-empty username to avoid NetUserChangePassword with an empty user. Errors are logged but do not block the rename -- the rename is what the broker ordered, and a failed password change is the broker's problem to surface. Two new tests in crates/service/src/actors/managed/tests.rs: - test_managed_rename_with_new_password_changes_password asserts the call lands on the platform with the credentials the OS manager supplied. - test_managed_rename_without_new_password_skips_password_change guards the happy path (no new_password in custom -> only rename). Repro: uds-demo MCP, pool Windows 11 Random Password (Windows-11-Template-UDS-5.0 / vm 219), WinRandomPasswordManager. Log 'Password set to <random>' was emitted but Windows still had 'demouser' -- confirmed via Proxmox noVNC + Get-Service TermService / Test-NetConnection 3389.
aschumann-virtualcable
deleted the
fix/actor-rename-apply-new-password
branch
September 29, 2026 14:37
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.
Win/Linux random-password OS managers (WinRandomPasswordManager / LinuxRandomPasswordManager) send the new password inside the Rename action's custom dict. The actor only invoked rename_computer and ignored it, so the broker ended up holding a password that did not match the one on the machine. RDP from UDS failed while logging in with the original template password still worked -- the exact symptom David reported on 24/09.
Apply platform.system().change_user_password(username, old_password, new_password) before the rename, gated on a non-empty username to avoid NetUserChangePassword with an empty user. Errors are logged but do not block the rename -- the rename is what the broker ordered, and a failed password change is the broker's problem to surface.
Two new tests in crates/service/src/actors/managed/tests.rs:
Repro: uds-demo MCP, pool Windows 11 Random Password (Windows-11-Template-UDS-5.0 / vm 219), WinRandomPasswordManager. Log 'Password set to ' was emitted but Windows still had 'demouser' -- confirmed via Proxmox noVNC + Get-Service TermService / Test-NetConnection 3389.