Require strict target SPN match on remote procedure calls
Exiger une correspondance stricte des noms de principaux du service cibles dans les appels de procédure distante
Explanation
This policy setting allows you to configure this server so that Kerberos can decrypt a ticket that contains this system-generated SPN. When an application attempts to make a remote procedure call (RPC) to this server with a NULL value for the service principal name (SPN), computers running Windows 7 or later attempt to use Kerberos by generating an SPN.
If you enable this policy setting, only services running as LocalSystem or NetworkService are allowed to accept these connections. Services running as identities different from LocalSystem or NetworkService might fail to authenticate.
If you disable or do not configure this policy setting, any service is allowed to accept incoming connections by using this system-generated SPN.
Ce paramètre de stratégie vous permet de configurer ce serveur de sorte que Kerberos puisse déchiffrer un ticket contenant le nom de principal du service généré par le système. Lorsqu’une application essaie d’effectuer un appel de procédure distante vers ce serveur avec une valeur NULL en tant que nom de principal du service, les ordinateurs exécutant Windows 7 essaient d’utiliser Kerberos en générant un nom de principal du service.
Si vous activez ce paramètre de stratégie, seuls les services s’exécutant en tant que LocalSystem ou NetworkService sont autorisés à accepter ces connexions. Les services qui s’exécutent avec une autre identité que LocalSystem ou NetworkService peuvent ne pas être authentifiés.
Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, tous les services sont autorisés à accepter les connexions entrantes en utilisant le nom de principal du service généré par le système.
Registry
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters- Value name
StrictTargetContext
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: Kerberos/StrictTarget
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'StrictTargetContext' -Value 1 -Type DWordDisable
# Disable: Kerberos/StrictTarget
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'StrictTargetContext' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": Kerberos/StrictTarget
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters'
Remove-ItemProperty -Path $k -Name 'StrictTargetContext' -ErrorAction SilentlyContinue