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

[processor/redactionprocessor] fix mask when multiple patterns exist #27646

Merged
merged 1 commit into from Oct 13, 2023

Conversation

ArchangelSDY
Copy link
Contributor

Description:
Fix mask when multiple patterns exist

With following input:

attr: <secret1> <secret2>

and config:

redaction:
  blocked_values:
    - '<secret1>'
    - '<secret2>'

Output before fix:

attr: <secret1> ****

Output after fix:

attr: **** ****

Link to tracking Issue:

Testing:

Documentation:

Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

Please add a changelog

@ArchangelSDY ArchangelSDY force-pushed the redact-multi branch 2 times, most recently from a25daf8 to 978495d Compare October 12, 2023 14:50
@ArchangelSDY
Copy link
Contributor Author

@songy23 Added.

Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

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

Sneaky bug, nice find!

processor/redactionprocessor/processor.go Outdated Show resolved Hide resolved
@ArchangelSDY ArchangelSDY force-pushed the redact-multi branch 2 times, most recently from 65da1a6 to 455fe92 Compare October 12, 2023 15:42
Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

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

Thank you!

@mx-psi mx-psi merged commit ab93d6c into open-telemetry:main Oct 13, 2023
85 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 13, 2023
JaredTan95 pushed a commit to openinsight-proj/opentelemetry-collector-contrib that referenced this pull request Oct 18, 2023
…pen-telemetry#27646)

**Description:**
Fix mask when multiple patterns exist

With following input:

```
attr: <secret1> <secret2>
```

and config:

```
redaction:
  blocked_values:
    - '<secret1>'
    - '<secret2>'
```

Output before fix:

```
attr: <secret1> ****
```

Output after fix:

```
attr: **** ****
```

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
…pen-telemetry#27646)

**Description:**
Fix mask when multiple patterns exist

With following input:

```
attr: <secret1> <secret2>
```

and config:

```
redaction:
  blocked_values:
    - '<secret1>'
    - '<secret2>'
```

Output before fix:

```
attr: <secret1> ****
```

Output after fix:

```
attr: **** ****
```

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
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.

None yet

5 participants