web-dev-qa-db-fra.com

La désactivation de TLS 1.0 interrompt l'application ASP.NET

Fonctionnant sur Windows Server 2012R2

J'essaie de désactiver TLS 1.0 sur IIS parce que le client a un scanner de site qui met cela en évidence comme un problème de sécurité.

J'ai un serveur de test propre configuré et l'application fonctionne correctement jusqu'à ce que je désactive TLS 1.0.

J'ai mis à jour tous les paramètres appropriés:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
"Enabled"=dword:00000000
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
"Enabled"=dword:00000000
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"Enabled"=dword:ffffffff
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
"Enabled"=dword:ffffffff
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"Enabled"=dword:ffffffff
"DisabledByDefault"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"Enabled"=dword:ffffffff
"DisabledByDefault"=dword:00000000

Dans l'observateur d'événements, j'obtiens:

Une alerte fatale a été générée et envoyée au point de terminaison distant. Cela peut entraîner la fin de la connexion. Le code d'erreur irrécupérable défini par le protocole TLS est 70. L'état d'erreur Windows SChannel est 105.

Si je rétablis les paramètres de registre uniquement pour TLS 1.0 (Enabled, pas DisabledByDefault), tout va bien de nouveau.

Utilisation dans system.web:

<httpRuntime targetFramework="4.7.2" />

Qu'est-ce que je rate?

10
Cade Roux

Votre site pourrait communiquer avec quelque chose via SSL qui ne prend pas en charge TLS 1.1+. Vous pouvez autoriser les connexions TLS 1.0 sortantes que l'analyseur de site ne verrait pas, mais ces connexions seraient moins sécurisées.

2
C.M.

L'application elle-même doit être mise à jour pour prendre en charge les poignées de main TLS 1.2, donc ce n'est pas quelque chose que vous pouvez nécessairement changer si vous n'avez accès qu'à la configuration. Si le code sous-jacent ne le prend pas en charge, cela ne fonctionnera pas.

Si le code cible .NET 4.6, je crois, TLS 1.2 fonctionnera en natif. En 4.5, une ligne de code doit être mise en place de telle sorte qu'elle soit exécutée avant toute mise en réseau. Le code:

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12
6
hurlman

Avez-vous essayé d'activer la journalisation de canal pour obtenir plus d'informations?

https://support.Microsoft.com/en-us/help/260729/how-to-enable-schannel-event-logging-in-iis

J'espère que cela révélera la pièce manquante.

1
frostshoxx