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

When mask is turned on, AuditHandler fails to log the request #935

Closed
jsu216 opened this issue Apr 26, 2021 · 2 comments
Closed

When mask is turned on, AuditHandler fails to log the request #935

jsu216 opened this issue Apr 26, 2021 · 2 comments
Assignees

Comments

@jsu216
Copy link
Contributor

jsu216 commented Apr 26, 2021

When the request body is a valid json object, the BodyHandler converts it to a java object (Map or List).
Since masking cannot be done on the object directly, the AuditHandler converts it to a String first. But it calls the toString() method of the object instead of the reserialize it. The result of the toString() method is not a valid Json format (e.g. missing double quote for key name). So this stops the masking and no audit log recorded.

There is an outstanding issue related to this #13

@jsu216 jsu216 self-assigned this Apr 27, 2021
jsu216 added a commit that referenced this issue Apr 28, 2021
@stevehu
Copy link
Contributor

stevehu commented May 8, 2021

I think it makes sense to implement #13 in a long run. I will pick it up once I have free cycles. Thanks a lot for raising the issue.

stevehu added a commit that referenced this issue May 8, 2021
* Fix audit issue #935 and #936

* Add missing unit test for the JsonPayload

* Move auditInfo into exchange.addExchangeCompleteListener in case other handlers populate it after AuditHandler

Co-authored-by: Steve Hu <[email protected]>
@stevehu
Copy link
Contributor

stevehu commented May 8, 2021

@stevehu stevehu closed this as completed Jan 5, 2023
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

2 participants