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: README.md
+56-2Lines changed: 56 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,20 +48,74 @@ var serializer = new Serializer(options);
48
48
49
49
This is essential for frameworks like Akka.NET where we need to be able to resolve live Actor References in the deserializing system.
50
50
51
+
## Whitelisting Types On Deserialization
52
+
53
+
Sometimes we need to limit the types that are allowed to be deserialized for security reasons. For this reason, you can either pass a class instance that implements the `ITypeFilter` interface into the `SerializerOptions` or use the `TypeFilterBuilder` class to build a `TypeFilter` that Hyperion can use to filter out any possibly harmful injection attack during deserialization.
Hyperion has been designed to work in multiple modes in terms of version tolerance vs. performance.
54
108
55
109
1. Pre Register Types, when using "Pre registered types", Hyperion will only emit a type ID in the output stream.
56
110
This results in the best performance, but is also fragile if different clients have different versions of the contract types.
57
111
2. Non Versioned, this is largely the same as the above, but the serializer does not need to know about your types up front. it will embed the fully qualified typename
58
-
in the outputstream. this results in a larger payload and some performance overhead.
112
+
in the output stream. this results in a larger payload and some performance overhead.
59
113
3. Versioned, in this mode, Hyperion will emit both type names and field information in the output stream.
60
114
This allows systems to have slightly different versions of the contract types where some fields may have been added or removed.
61
115
62
116
Hyperion has been designed as a wire format, point to point for soft realtime scenarios.
63
117
If you need a format that is durable for persistence over time.
64
-
e.g. EventSourcing or for message queues, then Protobuf or MS Bond is probably a better choise as those formats have been designed for true version tolerance.
118
+
e.g. EventSourcing or for message queues, then Protobuf or MS Bond is probably a better choice as those formats have been designed for true version tolerance.
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,21 @@
1
+
### 0.12.0 January 12 2022 ####
2
+
3
+
* Allow explicit control over which types can be deserialized [#281](https://github.com/akkadotnet/Hyperion/pull/281)
4
+
5
+
We've expanded our deserialization safety check to block dangerous types from being deserialized; we recommend this method as a best practice to prevent [deserialization of untrusted data](https://cwe.mitre.org/data/definitions/502.html). You can now create a custom deserialize layer type filter programmatically:
6
+
7
+
```c#
8
+
vartypeFilter=TypeFilterBuilder.Create()
9
+
.Include<AllowedClassA>()
10
+
.Include<AllowedClassB>()
11
+
.Build();
12
+
varoptions=SerializerOptions.Default
13
+
.WithTypeFilter(typeFilter);
14
+
varserializer=newSerializer(options);
15
+
```
16
+
17
+
For complete documentation, please read the [readme on filtering types for secure deserialization.](https://github.com/akkadotnet/Hyperion#whitelisting-types-on-deserialization)
18
+
1
19
### 0.11.2 October 7 2021 ####
2
20
* Fix exception thrown during deserialization when preserve object reference was turned on
3
21
and a surrogate instance was inserted into a collection multiple times. [#264](https://github.com/akkadotnet/Hyperion/pull/264)
0 commit comments