Allow certificates with no extended key usage certificate attribute
Autoriser les certificats sans attribut d’utilisation avancée de la clé
Explanation
This policy setting lets you allow certificates without an Extended Key Usage (EKU) set to be used for logon.
In versions of Windows prior to Windows Vista, smart card certificates that are used for logon require an enhanced key usage (EKU) extension with a smart card logon object identifier. This policy setting can be used to modify that restriction.
If you enable this policy setting, certificates with the following attributes can also be used to log on with a smart card:
- Certificates with no EKU
- Certificates with an All Purpose EKU
- Certificates with a Client Authentication EKU
If you disable or do not configure this policy setting, only certificates that contain the smart card logon object identifier can be used to log on with a smart card.
Ce paramètre de stratégie vous permet d’autoriser les certificats ne disposant pas d’un attribut d’utilisation de clé étendue (EKU) pour l’ouverture de session.
Dans les versions Windows antérieures à Windows Vista, l’extension EKU était nécessaire à l’identificateur d’objet pour une ouverture de session par carte à puce. Ce paramètre de stratégie contrôle cette restriction.
Si vous activez ce paramètre de stratégie, il est possible de tirer parti des certificats possédant les attributs suivants pour ouvrir une session à l'aide d'une carte à puce :
- Certificats sans extension EKU
- Certificats avec une extension EKU universelle
- Certificats avec une extension EKU d'authentification client.
Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, seuls les certificats contenant l’identificateur d’objet pour une ouverture de session par carte à puce autorisent l'ouverture d'une session avec une carte à puce.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\SmartCardCredentialProvider- Value name
AllowCertificatesWithNoEKU
| 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: Smartcard/AllowCertificatesWithNoEKU
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\SmartCardCredentialProvider'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowCertificatesWithNoEKU' -Value 1 -Type DWordDisable
# Disable: Smartcard/AllowCertificatesWithNoEKU
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\SmartCardCredentialProvider'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowCertificatesWithNoEKU' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": Smartcard/AllowCertificatesWithNoEKU
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\SmartCardCredentialProvider'
Remove-ItemProperty -Path $k -Name 'AllowCertificatesWithNoEKU' -ErrorAction SilentlyContinue