You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/articles/networking/serialization.md
+51
Original file line number
Diff line number
Diff line change
@@ -304,6 +304,57 @@ akka {
304
304
}
305
305
```
306
306
307
+
## Danger of polymorphic serializer
308
+
One of the danger of polymorphic serializers is the danger of unsafe object type injection into
309
+
the serialization-deserialization chain. This issue applies to any type of polymorphic serializer,
310
+
including JSON, BinaryFormatter, etc. In Akka, this issue primarily affects developers who allow third parties to pass messages directly
311
+
to unsecured Akka.Remote endpoints, a [practice that we do not encourage](https://getakka.net/articles/remoting/security.html#akkaremote-with-virtual-private-networks).
312
+
313
+
Generally, there are two approaches you can take to alleviate this problem:
314
+
1. Implement a schema-based serialization that are contract bound, which is more expensive to setup at first but fundamentally faster and more secure.
315
+
2. Implement a filtering or blacklist to block dangerous types.
316
+
317
+
An example of using a schema-based serialization in Akka can be read under the title "Using Google
318
+
Protocol Buffers to Version State and Messages" in [this documentation](https://petabridge.com/cluster/lesson3)
319
+
320
+
Hyperion chose to implement the second approach by blacklisting a set of potentially dangerous types
> This feature is turned on as default since Akka.NET v1.4.24
352
+
353
+
> [!WARNING]
354
+
> Hyperion is __NOT__ designed as a safe serializer to be used in an open network as a client-server
355
+
> communication protocol, instead it is designed to be used as a server-server communication protocol,
356
+
> preferably inside a closed network system.
357
+
307
358
## Cross platform serialization compatibility in Hyperion
308
359
There are problems that can arise when migrating from old .NET Framework to the new .NET Core standard, mainly because of breaking namespace and assembly name changes between these platforms.
309
360
Hyperion implements a generic way of addressing this issue by transforming the names of these incompatible names during deserialization.
0 commit comments