fix(rotation): use local auth for Windows local account verification#5386
Conversation
…ation and SMB connection
…for local accounts and enhance documentation on rotation methods and requirements
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Greptile OverviewGreptile SummaryThis PR updates Windows local account rotation to verify rotated credentials without applying the SMB connection’s configured domain, fixing failures when a domain admin rotates a local account on a member server. It also expands documentation to clarify prerequisites (member server/standalone only), explains the two rotation methods, and documents Windows-specific requirements for “Login as Target” (local admin + Remote UAC token filtering behavior). Main code change is in Confidence Score: 4/5
Important Files Changed
|
Context
When using domain credentials (e.g., MYDOMAIN\Administrator) to rotate a local account password on a member server, the verification step was failing with "Authentication failed" because it tried to authenticate the rotated local account using the domain from the app connection configuration.
Local accounts exist in the machine's local SAM database, not in Active Directory. Attempting to authenticate MYDOMAIN\localuser would fail because localuser doesn't exist in AD.
Screenshots
Steps to verify the change
Test Environment Setup
Set up AWS test environment with two Windows servers:
TESTDOMAIN.local)testuser)Create local account on member server (EC2 - 2):
Ensure security groups allow SMB (port 445) between Infisical and the member server
Test Case 1: Login as Root (Domain Admin rotates local account)
Configure SMB Connection:
TESTDOMAINAdministrator(domain admin)Create Windows Local Account Rotation:
testuserTrigger rotation and verify it succeeds
Test Case 2: Login as Target (Local account rotates itself)
Configure SMB Connection:
testusertestuserCreate Windows Local Account Rotation:
testusertestuserTrigger rotation and verify it succeeds
Type
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).