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

Avoid logging BLOB values #126

Closed
etedpet opened this issue Oct 4, 2019 · 0 comments
Closed

Avoid logging BLOB values #126

etedpet opened this issue Oct 4, 2019 · 0 comments
Assignees

Comments

@etedpet
Copy link
Contributor

etedpet commented Oct 4, 2019

BLOBs are probably not that interesting to log. Also they take up a lot of space when printing in ASCII-format. Logging just a few large blobs (can be of MB size) will fill up the logs.

Example log output from a prepared statement (with small blobs):
1570025092487|127.0.0.1:45176|127.0.0.1|cassandra|ATTEMPT|UPDATE "standard1" SET "C0" = ?,"C1" = ?,"C2" = ? WHERE KEY=12345 [0x28029cc8622a9724bf1cf40452459cffcf8d59c9ab5ebb00c91ff72de420d1a346b9, 0x6b986a3cb238eafd3953c7109ca2b92c7ece025076ffa573623b7994a915fb9ea209, 0x11c6d2fb29c9f643dae00c72e9f79a9f0858fd93bf1bbd79cd24d4124971a99ba9e8]

It should be possible to configure whether or not to print the blob values when logging prepared statements. The actual blob could be replaced by a "marker" (e.g. <BLOB>) to indicate that a blob was present. For example:
1570025092487|127.0.0.1:45176|127.0.0.1|cassandra|ATTEMPT|UPDATE "standard1" SET "C0" = ?,"C1" = ?,"C2" = ? WHERE KEY=12345 [<BLOB>, <BLOB>, <BLOB>]

This issue is related/similar to #124. Maybe both of them are relevant?

Note that CollectionTypes (LIST, SET, MAP) can also contain blobs. These values should also be considered (not logged) if "normal" blobs are configured not to be logged.

@etedpet etedpet self-assigned this Oct 7, 2019
etedpet added a commit to etedpet/ecaudit that referenced this issue Oct 9, 2019
The HideBlobsObfuscator can be used to avoid logging blob values
in prepared statements. The obfuscator will also handle collections
containing blobs.

Closes Ericsson#126
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

Successfully merging a pull request may close this issue.

1 participant