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

Added setting to config to redact data of all types #37631

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Tiberius202
Copy link

Description
The redaction is done based on its AsString value
rather than SDR. This is based on this issue:
#36684

The bug is that credit card numbers (as in the example on the README) are often provided as int numbers. The current redaction processor ignores all fields that are not of type int.

Link to tracking issue
#36684

Fixes No way to redact non string values

Documentation
I added the setting and turned it to true in the README as redacting un-delimited credit cards would definitely be under the scope of this setting.
(This issue didn't pass the CLI due to the first commit not having an email)

Copy link

linux-foundation-easycla bot commented Jan 31, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the processor/redaction Redaction processor label Jan 31, 2025
The redaction is done based on its AsString value
rather than SDR. This is based on this issue:
open-telemetry#36684
@Tiberius202
Copy link
Author

Tiberius202 commented Feb 2, 2025

I fixed the email. Sorry for the delay. I'm not a git wizard.

I also started the CLA process

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 20, 2025
@mx-psi
Copy link
Member

mx-psi commented Feb 20, 2025

@Tiberius202 any news about the CLA?

@Tiberius202
Copy link
Author

Still waiting on my legal team. I'm surprised it is taking so long. I am reaching out to them today and am going to get this done.

Thanks for your patience so far @mx-psi

@mx-psi
Copy link
Member

mx-psi commented Feb 20, 2025

No worries, no rush at all :)

@github-actions github-actions bot removed the Stale label Feb 21, 2025
Tiberius202 and others added 2 commits March 3, 2025 13:54
…emetry#37196)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google.golang.org/grpc](https://redirect.github.com/grpc/grpc-go) |
`v1.69.2` -> `v1.69.4` |
[![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc/v1.69.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc/v1.69.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc/v1.69.2/v1.69.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc/v1.69.2/v1.69.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>grpc/grpc-go (google.golang.org/grpc)</summary>

###
[`v1.69.4`](https://redirect.github.com/grpc/grpc-go/releases/tag/v1.69.4):
Release 1.69.4

[Compare
Source](https://redirect.github.com/grpc/grpc-go/compare/v1.69.2...v1.69.4)

### Bug Fixes

- rbac: fix support for :path header matchers, which would previously
never successfully match
([#&open-telemetry#8203;7965](https://redirect.github.com/grpc/grpc-go/issues/7965)).

### Documentation

- examples/features/csm_observability: update example client and server
to use the helloworld service instead of echo service
([#&open-telemetry#8203;7945](https://redirect.github.com/grpc/grpc-go/issues/7945)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTA3LjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyIsInJlbm92YXRlYm90Il19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <[email protected]>
Co-authored-by: Yang Song <[email protected]>
@Tiberius202
Copy link
Author

@mx-psi I have done the CLA and fixed the old commit. Anything else that needs to be done?

@atoulme
Copy link
Contributor

atoulme commented Mar 3, 2025

Please resolve the conflicts.

Comment on lines +208 to +210
if s.config.RedactAllTypes {
strVal = value.AsString()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some tests for this? In particular, what happens with an attribute that does not have sensitive data? Does it get cast to string but not redacted?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some unit tests that show that ints are typecast if and only if they are redacted. An attribute that does not have sensitive data will remain unchanged. The tests are currently going through my company's approval process.

The same principle will apply to maps and slices with sensitive data in them. They will be converted to their string representation. Let me know if this is acceptable and if you would like me to put more work into the unit tests to show this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable to me, yep

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added two unit tests under processor_test.go. Let me know if you need anything else

@atoulme
Copy link
Contributor

atoulme commented Mar 18, 2025

Please check the failing build, fix the issues and mark the PR as ready to review again.

@atoulme atoulme marked this pull request as draft March 18, 2025 19:03
@Tiberius202
Copy link
Author

Thanks for marking it draft. Sorry about that. Been busy with work and meaning to fix these compile issues. I'll get it done soon, unmark this draft, and ping you all when it's time.

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

Successfully merging this pull request may close these issues.

4 participants