vmware / powershell-module-for-vmware-cloud-foundation-password-management

PowerShell Module for VMware Cloud Foundation Password Management
https://vmware.github.io/powershell-module-for-vmware-cloud-foundation-password-management/
BSD 2-Clause "Simplified" License
11 stars 9 forks source link

WSA Local User Password Policy does not match Update #180

Closed burnsjared0415 closed 3 weeks ago

burnsjared0415 commented 5 months ago

Code of Conduct

VMware Cloud Foundation

5.1.0.0

PowerShell Version

Core Powershell 7.3.11

PowerCLI Version

13.2.1.22851661

Module Version

lastest

PowerValidatedSolutions Version

lastest

PowerVCF Version

lastet

Guest Operating System

Mac

Environment Details

No response

Description

I am working on Clustered Aria Workspace one Update and Request scripts, I have noticed that in the policy file we are only check 3 values:

    $wsaLocalPasswordComplexity | Add-Member -notepropertyname 'minLength' -notepropertyvalue "1"
    $wsaLocalPasswordComplexity | Add-Member -notepropertyname 'retries' -notepropertyvalue "3"
    $wsaLocalPasswordComplexity | Add-Member -notepropertyname 'history' -notepropertyvalue "5"

but in the Update-WsaLocalUserPasswordComplexity we are look to update:

Set-LocalPasswordComplexity -vmName ($wsaFqdn.Split("."))[-0] -guestUser root -guestPassword $wsaRootPass -minLength $minLength -uppercase $minUppercase -lowercase $minLowercase -numerical $minNumerical -special $minSpecial -unique $minUnique -class $minClass -sequence $maxSequence -history $history -retry $maxRetry | Out-Null

need to know which settings are correct between the two scripts

Error or Debug Output

None

Expected Behavior

just reviewed the two functions : Function Get-PasswordPolicyDefault and Function Update-WsaLocalUserPasswordComplexity

Actual Behavior

no behavior just a difference in functions

Steps to Reproduce

just review functions

Log Fragments and Files

No response

Screenshots

No response

References

No response

burnsjared0415 commented 5 months ago

this command does not match for the checks either

Set-WsaPasswordPolicy -minLen $minLength -minLower $minLowercase -minUpper $minUppercase -minDigit $minNumeric -minSpecial $minSpecial -history $history -maxConsecutiveIdenticalCharacters $maxIdenticalAdjacent -maxPreviousPasswordCharactersReused $maxPreviousCharacters -tempPasswordTtlInHrs (Get-WsaPasswordPolicy).tempPasswordTtl -passwordTtlInDays $currentMaxDays -notificationThresholdInDays $currentWarnDays -notificationIntervalInDays $currentReminderDays | Out-Null
tenthirtyam commented 1 month ago

The upstream change in PowerValidatedSolutions has been merged. This can addressed once the next release of PowerValidatedSolutions is shipped. Likely v2.11.1.