Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: add incoming request logging filter #255

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

mcoburnmx
Copy link
Collaborator

@mcoburnmx mcoburnmx commented Oct 8, 2024

Summary of Changes

Added the PathRequestLoggingFilter to log incoming requests to a Path connector in OpenSearch (e.g. requests from Synchronicity) including the connector's response. Added support for masking out sensitive fields in the MDX model separately from the upstream request logger LogValueMasker so that masker regular expressions in one do not affect the other.

Note that this requires these path-core changes as well.

Fixes # MC-3689

Public API Additions/Changes

Nothing public was modified; however, the FilterOrderSequence was updated to include the PathRequestLoggingFilter so any connector that picks up these changes will automatically start using the PathRequestLoggingFilter. To actually get the connector to output the logs changes like this will need to made to add an IncomingLogstash appender and reference it from the "sandbox,qa,integration,production" Spring profile. For local development purposes you can reference the appender from the "development" Spring profile.

Downstream Consumer Impact

This has an indirect way of impacting any connector that picks up these changes so careful testing locally and after deploying to pre-prod is recommended.

How Has This Been Tested?

I added unit tests and also tested this out with a connector by adding a reference to the IncomingLogstash appender from the "development" Spring profile and ran the Arsenal test suite locally. Then I inspected the log for each incoming request to the Path connector initiated by Arsenal to confirm that the logstasher fields were assigned the expected values and that masking was leveraged where expected. I recommend another Path developer vets out these changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • [] I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@mcoburnmx mcoburnmx force-pushed the mpc/mc-3689 branch 3 times, most recently from 6e71aef to 2193207 Compare October 9, 2024 17:53
@mcoburnmx mcoburnmx force-pushed the mpc/mc-3689 branch 5 times, most recently from 28af8c1 to 8d38b36 Compare January 31, 2025 17:48
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant