Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook Event Log response should probably not deserialize the original event #2901

Open
robotdan opened this issue Oct 15, 2024 · 0 comments

Comments

@robotdan
Copy link
Member

robotdan commented Oct 15, 2024

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.

Related

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant