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

Sanitizing raw data (JSON) #1623

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jonathanschmittcs
Copy link

  1. sanitezer.go: Improved the sanitizeRequest method adding sanitizeRawData method that sanitizes JSON body of http requests.
  2. sanitizer_test.go: Created a unit test TestSanitizeRaw.

Example:

Matchers: ["id", "cardNumber", "balance"]
Input: {"id": "dce2be67-89e2-4232-9052-589f23b44224", "name": "jonathan", "accountInfo": {"cardNumber": "1234123412341234", "balance": 3520.50}}
Output: {"id": "[REDACTED]", "name": "jonathan", "accountInfo": {"cardNumber": "[REDACTED]", "balance": "[REDACTED]"}}

@jonathanschmittcs jonathanschmittcs requested a review from a team as a code owner May 15, 2024 13:19
Copy link

❌ Author of the following commits did not sign a Contributor Agreement:
c0c8e29, 21eb099

Please, read and sign the above mentioned agreement if you want to contribute to this project

@dmathieu
Copy link
Member

I don't know about this. It could lead to unexpected performance issues
Also, this would be a new feature and this repository is in maintenance only.

@xcloudscript
Copy link

This is a real need, we adjust as necessary and contribute if you want. If it is not interesting or necessary, we can simply maintain a fork in our project here and meet our needs. Please report future updates.

@dmathieu
Copy link
Member

Rather than maintain a fork, have you considered migrating to OpenTelemetry?
It doesn't have sensitive data redaction (though that's being worked on open-telemetry/oteps#255), but it's way more modular than our agent, and censoring some data in a custom exporter would be rather easy.

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

Successfully merging this pull request may close these issues.

None yet

3 participants