Open kwygant opened 1 year ago
The settings this will apply to (may be others)
Google Chrome STIG - V-221596 - URLs must be allowlisted for Autoplay use. Google Chrome STIG - V-221563 - Extensions that are approved for use must be allowlisted Google Chrome STIG - V-221572 - The URL protocol schema javascript must be disabled. Microsoft Edge STIG - V-235722 - The list of domains for which Microsoft Defender SmartScreen will not trigger warnings must be allowlisted if used. Microsoft Edge STIG - V-235753 - URLs must be whitelisted for plugin use Microsoft Edge STIG - V-235755 - Extensions that are approved for use must be allowlisted if used.
I will use V-221563 from Chrome as an example. If you only want the one extension ID from the STIG checklist listed, the setting works as expected because you are only populating value name "1". If you want to add additional extensions to the approved list each one would be added as an additional value with an incremented number for a name and a string value of the extension ID.
Using the Chrome admx files and entering manually via gpedit you get something like this: [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist] "1"="oiigbmnaadbkfbmpbfijlflahbdbdgdf" "2"="oiigbmnaadbkfbmpbfijlflahbdbdgd4"
If I enter these values in my DSC as an array... 'V-221563' = @{ ValueData = @('oiigbmnaadbkfbmpbfijlflahbdbdgdf','oiigbmnaadbkfbmpbfijlflahbdbdg4g') } ... the values get smashed together into a single value
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist] "1"="oiigbmnaadbkfbmpbfijlflahbdbdgdf oiigbmnaadbkfbmpbfijlflahbdbdg4g "
I did manage to solve this in a function for a Configuration Manager baseline using the PolicyFileEditor module. While not directly applicable, the base logic could be used to add the capability to PowerSTIG.
$regpath = "Software\Policies\Google\Chrome\ExtensionInstallAllowlist" $regtype = "String" $comparitor = "-eq" $Counter = 1 $regvalues = @( 'oiigbmnaadbkfbmpbfijlflahbdbdgdf', 'oiigbmnaadbkfbmpbfijlflahbdbbnhs' ) $usersetting = $False
Function New-STIGReg{
Microsoft provides programming examples for illustration only,
}
ForEach($regvalue in $regvalues){ [string]$regName = $counter New-STIGReg -regpath $regpath -regName $regName -regtype $regtype -regvalue $regvalue -usersetting $usersetting $counter++ }