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

Mongo instrumentation's 'db.statement' tag could be leaking sensitive data #3388

Open
dubonzi opened this issue Feb 16, 2023 · 4 comments
Open

Comments

@dubonzi
Copy link
Contributor

dubonzi commented Feb 16, 2023

The Mongo instrumentation adds a 'db.statement' tag to spans containing the raw query which might leak sensitive information. I see a TODO in the sanitization function that would be doing the obfuscation of these values, and since it's not yet done, maybe this feature should be disabled by default to avoid leaks by users that are unaware of this.

@dmathieu
Copy link
Member

You are absolutely right. Do you want to open a PR?

@dubonzi
Copy link
Contributor Author

dubonzi commented Feb 22, 2023

I could, you mean to disable the feature by default? I'm not really sure how to implement the obfuscation but I could try also.

@dmathieu
Copy link
Member

I think we should first disable the feature. Implementing obfuscation is going to take longer.

dubonzi added a commit to dubonzi/opentelemetry-go-contrib that referenced this issue Mar 2, 2023
As of now, the 'db.statement' tag is not obfuscated, which can lead
to sensitive information being leaked through the tag.

See open-telemetry#3388
@dubonzi
Copy link
Contributor Author

dubonzi commented Mar 2, 2023

Done.

MrAlias added a commit that referenced this issue Apr 26, 2023
…3519)

* Disable adding the mongo 'db.statement' tag by default

As of now, the 'db.statement' tag is not obfuscated, which can lead
to sensitive information being leaked through the tag.

See #3388

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update mongo.go

* fix reverted changelog change in conflict resolution

* Move changelog entry to unreleased

---------

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
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