Compare commits

...
2 Commits
Author SHA1 Message Date
alexrg c7c0f941d4 Manage Edge experience on lab computers 2026-09-21 14:36:57 -06:00
alexrg 20dae3caa9 Hide password changes for managed SGU users 2026-09-18 16:58:05 -06:00
8 changed files with 99 additions and 6 deletions

No files matched your search

+8 -5
View File
@@ -143,11 +143,14 @@ synthetic Windows account to imitate that title or ordering.
The managed hierarchy is rooted at `OU=Usuarios-SGU`: `Docentes`, `Alumnos`, The managed hierarchy is rooted at `OU=Usuarios-SGU`: `Docentes`, `Alumnos`,
and `Administrativos` are direct child OUs beneath it. The domain GPO and `Administrativos` are direct child OUs beneath it. The domain GPO
`SGU - User session restrictions` is linked to this root and enables the `SGU - User session restrictions` is linked to this root and enables the
per-user `DisableLockWorkstation` policy and disables screen savers for the per-user `DisableLockWorkstation` and `DisableChangePassword` policies and
complete hierarchy. The computer GPO `SGU - Windows client experience` is linked disables screen savers for the complete hierarchy. The computer GPO
to `OU=Laboratorio`; it suppresses first-logon/privacy/diagnostic prompts, `SGU - Windows client experience` is linked to `OU=Laboratorio`; it suppresses
disables location, and enforces always-on display, sleep, and hibernation first-logon/privacy/diagnostic prompts, disables location, and enforces
settings for managed clients. always-on display, sleep, and hibernation settings for managed clients. The
same computer GPO configures Edge with `HideFirstRunExperience=1`,
`BrowserSignin=0`, and `SyncDisabled=1`, so shared machines do not show consumer
onboarding or permit personal browser sign-in and cloud synchronization.
That computer GPO also owns the base lock-screen image and a per-logon command That computer GPO also owns the base lock-screen image and a per-logon command
for the personalized desktop wallpaper. The client-side renderer reads the for the personalized desktop wallpaper. The client-side renderer reads the
+16
View File
@@ -0,0 +1,16 @@
# SGU Credential Provider 0.6.10
Esta versión administra Microsoft Edge en los equipos Windows del laboratorio.
- `HideFirstRunExperience=1` omite la experiencia de primera ejecución y la
pantalla de presentación.
- `BrowserSignin=0` impide iniciar sesión en Edge con cuentas personales o de
organización.
- `SyncDisabled=1` deshabilita Microsoft Sync y su solicitud de consentimiento.
- Las tres configuraciones se publican como valores obligatorios de equipo en
`SGU - Windows client experience`, vinculada a `OU=Laboratorio`.
Las directivas se escriben directamente en
`HKLM\Software\Policies\Microsoft\Edge`; las plantillas `MSEdge.admx` sólo son
necesarias para editarlas mediante la interfaz de Administrative Templates, no
para su aplicación.
+16
View File
@@ -0,0 +1,16 @@
# SGU Credential Provider 0.6.9
Esta versión completa la autoridad de contraseñas del Auth Broker en la
interfaz de Windows.
- La GPO `SGU - User session restrictions` habilita la directiva **Remove
Change Password** para todas las cuentas bajo `OU=Usuarios-SGU`.
- La opción **Cambiar una contraseña** deja de aparecer en la pantalla de
seguridad de Ctrl+Alt+Supr.
- La protección real continúa en Active Directory mediante las denegaciones
del derecho extendido `Change Password`; la GPO únicamente evita mostrar una
acción que esas cuentas no pueden completar.
El Auth Broker conserva el derecho administrativo separado `Reset Password`
para sincronizar la contraseña institucional después de una autenticación SGU
válida.
+4
View File
@@ -21,6 +21,10 @@ the same source list. RDP uses a separate allowlist. See
- Managed `Usuarios-SGU` accounts deny the SELF and Everyone `Change Password` - Managed `Usuarios-SGU` accounts deny the SELF and Everyone `Change Password`
extended right. Only an administrator or the broker through the separate extended right. Only an administrator or the broker through the separate
`Reset Password` right can replace the AD password. `Reset Password` right can replace the AD password.
- The `SGU - User session restrictions` GPO also hides the **Change a
password** command from the Windows Ctrl+Alt+Delete security screen for
managed users. This is a user-interface complement to the directory ACL,
not a substitute for it.
- There is no HMAC password, pepper, local password cache, Supabase password, or - There is no HMAC password, pepper, local password cache, Supabase password, or
other derived credential in this Windows path. other derived credential in this Windows path.
- Neither application logs request bodies or passwords. Deployment configuration - Neither application logs request bodies or passwords. Deployment configuration
+8 -1
View File
@@ -82,6 +82,7 @@ $runPolicyKey = 'HKLM\Software\Microsoft\Windows\CurrentVersion\Run'
$personalizationPolicyKey = 'HKLM\Software\Policies\Microsoft\Windows\Personalization' $personalizationPolicyKey = 'HKLM\Software\Policies\Microsoft\Windows\Personalization'
$personalizationCspKey = 'HKLM\Software\Microsoft\Windows\CurrentVersion\PersonalizationCSP' $personalizationCspKey = 'HKLM\Software\Microsoft\Windows\CurrentVersion\PersonalizationCSP'
$cloudContentPolicyKey = 'HKLM\Software\Policies\Microsoft\Windows\CloudContent' $cloudContentPolicyKey = 'HKLM\Software\Policies\Microsoft\Windows\CloudContent'
$edgePolicyKey = 'HKLM\Software\Policies\Microsoft\Edge'
$providerClassId = '{D789CFD8-5AD4-489F-9B83-7EB5D9D09335}' $providerClassId = '{D789CFD8-5AD4-489F-9B83-7EB5D9D09335}'
$welcomeWallpaperCommand = 'powershell.exe -NoLogo -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File "{0}" -BaseImagePath "{1}"' -f ` $welcomeWallpaperCommand = 'powershell.exe -NoLogo -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File "{0}" -BaseImagePath "{1}"' -f `
$WelcomeWallpaperScriptPath,$WelcomeWallpaperBasePath $WelcomeWallpaperScriptPath,$WelcomeWallpaperBasePath
@@ -124,7 +125,13 @@ $policies = @(
@{ Key = $personalizationCspKey; Name = 'LockScreenImageUrl'; Type = 'String'; Value = $WelcomeLockScreenBasePath }, @{ Key = $personalizationCspKey; Name = 'LockScreenImageUrl'; Type = 'String'; Value = $WelcomeLockScreenBasePath },
@{ Key = $personalizationCspKey; Name = 'LockScreenImageStatus'; Type = 'DWord'; Value = 1 }, @{ Key = $personalizationCspKey; Name = 'LockScreenImageStatus'; Type = 'DWord'; Value = 1 },
@{ Key = $cloudContentPolicyKey; Name = 'DisableWindowsSpotlightFeatures'; Type = 'DWord'; Value = 1 }, @{ Key = $cloudContentPolicyKey; Name = 'DisableWindowsSpotlightFeatures'; Type = 'DWord'; Value = 1 },
@{ Key = $cloudContentPolicyKey; Name = 'DisableWindowsSpotlightOnLockScreen'; Type = 'DWord'; Value = 1 } @{ Key = $cloudContentPolicyKey; Name = 'DisableWindowsSpotlightOnLockScreen'; Type = 'DWord'; Value = 1 },
# Shared laboratory machines should open Edge without consumer onboarding,
# personal browser profiles, or Microsoft cloud synchronization.
@{ Key = $edgePolicyKey; Name = 'HideFirstRunExperience'; Type = 'DWord'; Value = 1 },
@{ Key = $edgePolicyKey; Name = 'BrowserSignin'; Type = 'DWord'; Value = 0 },
@{ Key = $edgePolicyKey; Name = 'SyncDisabled'; Type = 'DWord'; Value = 1 }
) )
$powerSettingIds = @( $powerSettingIds = @(
+19
View File
@@ -10,6 +10,7 @@ param(
$ErrorActionPreference = 'Stop' $ErrorActionPreference = 'Stop'
$policyKey = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System' $policyKey = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System'
$policyValueName = 'DisableLockWorkstation' $policyValueName = 'DisableLockWorkstation'
$disableChangePasswordValueName = 'DisableChangePassword'
$desktopPolicyKey = 'HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop' $desktopPolicyKey = 'HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop'
$themeKey = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize' $themeKey = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize'
@@ -76,6 +77,17 @@ if ($PSCmdlet.ShouldProcess($GpoName, 'Prevent SGU users from manually locking w
-Type DWord ` -Type DWord `
-Value 1 | Out-Null -Value 1 | Out-Null
# The directory ACL remains the security boundary. This user policy also
# removes the unusable Change a password action from Ctrl+Alt+Delete.
Set-GPRegistryValue `
-Name $GpoName `
-Domain $domainName `
-Server $DomainController `
-Key $policyKey `
-ValueName $disableChangePasswordValueName `
-Type DWord `
-Value 1 | Out-Null
Set-GPRegistryValue ` Set-GPRegistryValue `
-Name $GpoName ` -Name $GpoName `
-Domain $domainName ` -Domain $domainName `
@@ -135,6 +147,12 @@ $configuredValue = Get-GPRegistryValue `
-Server $DomainController ` -Server $DomainController `
-Key $policyKey ` -Key $policyKey `
-ValueName $policyValueName -ValueName $policyValueName
$disableChangePasswordValue = Get-GPRegistryValue `
-Name $GpoName `
-Domain $domainName `
-Server $DomainController `
-Key $policyKey `
-ValueName $disableChangePasswordValueName
$screenSaverValue = Get-GPRegistryValue ` $screenSaverValue = Get-GPRegistryValue `
-Name $GpoName ` -Name $GpoName `
-Domain $domainName ` -Domain $domainName `
@@ -175,6 +193,7 @@ if ($WallpaperPath) {
TargetOu = $TargetOuDn TargetOu = $TargetOuDn
LinkEnabled = [bool]$linkEnabled LinkEnabled = [bool]$linkEnabled
DisableLockWorkstation = [int]$configuredValue.Value DisableLockWorkstation = [int]$configuredValue.Value
DisableChangePassword = [int]$disableChangePasswordValue.Value
ScreenSaverDisabled = [string]$screenSaverValue.Value -eq '0' ScreenSaverDisabled = [string]$screenSaverValue.Value -eq '0'
DarkMode = ([int]$appsThemeValue.Value -eq 0) -and ([int]$systemThemeValue.Value -eq 0) DarkMode = ([int]$appsThemeValue.Value -eq 0) -and ([int]$systemThemeValue.Value -eq 0)
Wallpaper = $configuredWallpaper Wallpaper = $configuredWallpaper
@@ -1,8 +1,10 @@
$repositoryRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path $repositoryRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
$synchronizerPath = Join-Path $repositoryRoot 'src\SGU.AuthBroker\Services\ActiveDirectorySynchronizer.cs' $synchronizerPath = Join-Path $repositoryRoot 'src\SGU.AuthBroker\Services\ActiveDirectorySynchronizer.cs'
$deployPath = Join-Path $repositoryRoot 'scripts\Deploy-AuthBroker.ps1' $deployPath = Join-Path $repositoryRoot 'scripts\Deploy-AuthBroker.ps1'
$userPolicyPath = Join-Path $repositoryRoot 'scripts\Set-SguDomainUserPolicies.ps1'
$synchronizer = Get-Content -LiteralPath $synchronizerPath -Raw $synchronizer = Get-Content -LiteralPath $synchronizerPath -Raw
$deploy = Get-Content -LiteralPath $deployPath -Raw $deploy = Get-Content -LiteralPath $deployPath -Raw
$userPolicy = Get-Content -LiteralPath $userPolicyPath -Raw
Describe 'SGU Auth Broker password authority' { Describe 'SGU Auth Broker password authority' {
It 'denies the Change Password extended right to SELF and Everyone before SetPassword' { It 'denies the Change Password extended right to SELF and Everyone before SetPassword' {
@@ -18,4 +20,9 @@ Describe 'SGU Auth Broker password authority' {
$deploy | Should Match 'Get-ADUser.*-SearchBase \$usersOuDn.*-SearchScope Subtree' $deploy | Should Match 'Get-ADUser.*-SearchBase \$usersOuDn.*-SearchScope Subtree'
$deploy | Should Match '(?s)Set-ADAccountControl.*-CannotChangePassword \$true' $deploy | Should Match '(?s)Set-ADAccountControl.*-CannotChangePassword \$true'
} }
It 'removes Change Password from the Windows security screen for managed users' {
$userPolicy | Should Match "disableChangePasswordValueName = 'DisableChangePassword'"
$userPolicy | Should Match '(?s)-ValueName \$disableChangePasswordValueName.*-Type DWord.*-Value 1'
}
} }
+21
View File
@@ -0,0 +1,21 @@
$repositoryRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
$policyPath = Join-Path $repositoryRoot 'scripts\Set-SguDomainComputerPolicies.ps1'
$packagePath = Join-Path $repositoryRoot 'scripts\New-SguBootstrapPackages.ps1'
$initializePath = Join-Path $repositoryRoot 'scripts\Initialize-SguDomainController.ps1'
$policy = Get-Content -LiteralPath $policyPath -Raw
$package = Get-Content -LiteralPath $packagePath -Raw
$initialize = Get-Content -LiteralPath $initializePath -Raw
Describe 'Managed Microsoft Edge laboratory policy' {
It 'suppresses onboarding, browser sign-in and cloud sync through mandatory machine policy' {
$policy | Should Match "edgePolicyKey = 'HKLM\\Software\\Policies\\Microsoft\\Edge'"
$policy | Should Match "Name = 'HideFirstRunExperience'; Type = 'DWord'; Value = 1"
$policy | Should Match "Name = 'BrowserSignin'; Type = 'DWord'; Value = 0"
$policy | Should Match "Name = 'SyncDisabled'; Type = 'DWord'; Value = 1"
}
It 'ships the policy script and invokes it during server initialization' {
$package | Should Match "'Set-SguDomainComputerPolicies.ps1'"
$initialize | Should Match 'Join-Path \$scriptsRoot ''Set-SguDomainComputerPolicies.ps1'''
}
}