somethinglikegames.de

Mein Blog über Spieleentwicklung und das Drumherum


Kategorien


Tags

Aus dem 6. Netzwerktutorial ist noch eine Fragestellung offen. Ich hatte damals zur unterstützten DTLS-Version geschrieben:

Welche Version konkret von Godot eingesetzt wird, konnte ich zwar noch nicht herausfinden, aber sobald ich es weiß, werde ich es mitteilen.

Und jetzt ist der Zeitpunkt gekommen, diese Information mit euch zu teilen.

Als ich Anfang April angefangen habe, mich mit dem Thema DTLS bei Godot näher zu beschäftigen, wollte ich herausfinden, welche DTLS-Versionen unterstützt werden. Ich hatte mir zwar den Quellcode angesehen und so herausgefunden, dass damals mbedtls 2.18.2 eingesetzt wurde. Ich hatte mir auch die zugehörigen Konfigurationsdateien in Godot angeschaut, war mir aber unsicher, ob ich alles richtig interpretiere und hatte daher damals im Godot Contributors Chat nachgefragt:

Security is a very important and (unfortunately) often a very complex topic. Especially if you offer multiplayer servers with their own user database for authentication over the Internet, you should take special care. Therefore I tried to find out which DTLS version with which cipher suites is effectively used when setting up server and client via the usual way for ENet + DTLS

But unfortunately my rudimentary C knowledge is not sufficient to answer my question by reading the source code. I know by now that Godot relies on Mbed TLS for (D)TLS. The documentation is very rudimentary, but as far as I understand, you can make general settings regarding (D)TLS versions and cipher suites via the parameters in config.h and ./thirdparty/mbedtls/include/mbedtls/config.h respectively. If this is really the case, I am surprised to see that MBEDTLS_SSL_PROTO_TLS1 as well as MBEDTLS_SSL_PROTO_TLS1_1 is configured there, since according to RFC7525 from 2015 TLS 1.0 and 1.1 or DTLS 1.0 should not be supported anymore. Especially because with Godot in general you can fortunately influence both client and server and thus can be much less permissive than e.g. browsers, where even the mozilla SSL Configuration Generator in the Intermediate configuration (“recommended for almost all systems”) suggests TLS 1.2 as the oldest version.

Long story short: Is there an “easy” way to find out with which security parameters (DTLS version, cipher suite, …) the network connections at Godot 4 are running? Is it possible to influence/restrict these security parameters without having to compile Godot itself?

Leider habe ich auf diese Nachricht nie eine Antwort erhalten, sie muss wohl irgendwie untergegangen sein. Aber bei meinen Recherchen für die neue Option Watch in der ReplicationAPI, die ich ja bereits kurz im Scene-Replication-Artikel behandelt habe, bin ich auf einen interessanten Commit gestoßen: mbedTLS: disable weak crypto and TLS versions. Die weitere Beschreibung lautet:

This commit adds a new mbedTLS configuration header to customize the built-in library (and can be optionally replaced by a platform-specific one).

Currently, it disables most weak cryptographic functions (with the notable exceptions of MD5 and SHA-1), along with removing support for TLS versions 1.0 and 1.1 (making TLSv1.2 the only supported one).

Damit steht nun fest, dass ab Godot 4.1 standardmäßig (D)TLS 1.2 die einzig unterstützte Version ist und ein Großteil der schwachen kryptographischen Funktionen deaktiviert wurde. Damit ist meiner Meinung nach ein großer Schritt zu mehr Sicherheit bei Netzwerkspielen mit Godot gemacht. Da nun standardmäßig jeder, der die vorkompilierte Version benutzt, von diesen Änderungen profitiert.

So wie es aussieht, habe ich zwar keine direkte Antwort erhalten, aber meine Anmerkung scheint zur Kenntnis genommen worden zu sein, zumindest kann ich es mir nun einreden 😆.