Commit c329d08
authored
Allow agent to be automatically injected when running aside Log4J patch agent (#8648)
# What Does This Do
* add an exception in double injection check for log4j patch agent
# Motivation
This fix is meant for DJM running in AWS EMR.
AWS adds a javaagent on their spark processes to patch the log4j vulnerability. This wouldn't pass the current double injection check so the injector is currently configured to pass `DD_INJECT_FORCE` on EMR to force the check.
The issue is that this is configuration is currently passed to the injector in a legacy way we want to remove, so we wouldn't be able to skip checks. This exception is also, in general, a bit scary because it applies everywhere we will inject everything on EMR regardless of deny lists.
So this PR adds a more restricted exception in the AgentBootstrap, and only works if there 2 agents one of them being for log4j.1 parent 745b2f1 commit c329d08
File tree
2 files changed
+78
-23
lines changed- dd-java-agent/src/main/java/datadog/trace/bootstrap
- dd-smoke-tests/lib-injection/src/test/groovy/datadog/smoketest
2 files changed
+78
-23
lines changedLines changed: 34 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
295 | 303 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 307 | + | |
| 308 | + | |
307 | 309 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | 310 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | 311 | | |
319 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
320 | 333 | | |
321 | 334 | | |
322 | 335 | | |
| |||
Lines changed: 44 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
9 | | - | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
13 | | - | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
28 | 43 | | |
29 | 44 | | |
30 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
31 | 50 | | |
32 | 51 | | |
33 | 52 | | |
| |||
78 | 97 | | |
79 | 98 | | |
80 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
0 commit comments