Open in the explorer

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

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › System › Kerberos FR: Configuration ordinateur › Stratégies › Modèles d'administration › Système › Kerberos
Supported on
At least Windows Server 2008 R2 or Windows 7 FR: Au minimum Windows Server 2008 R2 ou Windows 7
ADMX file
Kerberos.admx
Internal name
Kerberos/StrictTarget

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.

French text from Windows 11 26H2

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
StateValue written
EnabledREG_DWORD = 1
DisabledREG_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 DWord

Disable

# 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 DWord

Revert 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

Availability