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
Webhook Event Log response should probably not deserialize the original event
Description
We should probably just store this as a string, and return it a a string. We could also try and de-serialize it as a Map<String, Object> or a JsonNode.
One of these two types would be safe(er) than what we have today, but still maybe not ideal.
The issue with trying to deserialize the event object is that this functionally means that we have to be able to deserialize all events we store which are by definition past events - forever.
This may be very difficult to do successfully.
Even if we try and use Map<String, Object> or JsonNode it is still possible that a data type such as a Big Integer could de-serialize different in the future than it did when it was serialized. This could manifest in the form of a time precision error, or some other change from the original content.
The only thing we really know for sure is what the event looked like when we first sent it. After that, it is just really a historical event, and I don't know that it we need to type it.
The only issue with making this change would be when we try and display it in the FusionAuth Admin UI. But I think we can simply parse it and pretty print it to come up with the same result as we have today with less risk of not being able to de-serialize it in the future.
Webhook Event Log response should probably not deserialize the original event
Description
We should probably just store this as a string, and return it a a string. We could also try and de-serialize it as a
Map<String, Object>
or aJsonNode
.One of these two types would be safe(er) than what we have today, but still maybe not ideal.
The issue with trying to deserialize the event object is that this functionally means that we have to be able to deserialize all events we store which are by definition past events - forever.
This may be very difficult to do successfully.
Even if we try and use
Map<String, Object>
orJsonNode
it is still possible that a data type such as a Big Integer could de-serialize different in the future than it did when it was serialized. This could manifest in the form of a time precision error, or some other change from the original content.The only thing we really know for sure is what the event looked like when we first sent it. After that, it is just really a historical event, and I don't know that it we need to type it.
The only issue with making this change would be when we try and display it in the FusionAuth Admin UI. But I think we can simply parse it and pretty print it to come up with the same result as we have today with less risk of not being able to de-serialize it in the future.
Related
event
object #2874Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
The text was updated successfully, but these errors were encountered: