Commit be24f60
authored
[PROF-14281] Ensure API key redaction in flares (#49417)
### What does this PR do?
- Adds `dd-api-key` to the flare scrubber's key-name-aware replacers
- Removes a debug log that printed the full generated OTel config, which included arbitrary `AdditionalHTTPHeaders` values the scrubber cannot pattern-match
### Motivation
The Host Profiler and OTel exporters write their effective config to flare bundles via `runtime.cfg`, which includes `dd-api-key` headers. While these values are always standard 32-char hex API keys caught by the value-pattern scrubber, `dd-api-key` should also be recognized as sensitive by key name; consistent with other known headers already in the list.
### Describe how you validated your changes
Added a `assertClean` case in `pkg/util/scrubber/default_test.go` covering a non-hex `dd-api-key` value.
### Additional Notes
Co-authored-by: theo.demagalhaes <theo.demagalhaes@datadoghq.com>1 parent 57f18de commit be24f60
3 files changed
Lines changed: 5 additions & 5 deletions
File tree
- comp/host-profiler/collector/impl/agentprovider
- pkg/util/scrubber
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
202 | | - | |
203 | | - | |
204 | 201 | | |
205 | 202 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | | - | |
| 279 | + | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
998 | 1001 | | |
999 | 1002 | | |
1000 | 1003 | | |
| |||
0 commit comments