From 8b09a13b86a320d1f76e2d090808a8e76d793dc9 Mon Sep 17 00:00:00 2001 From: Gustavo Lopes Date: Wed, 25 Oct 2023 19:52:35 +0100 Subject: [PATCH 1/2] Akka: skip sythentic header Raw-Request-Uri Causes the content of the request uri to be reported to the WAF as a header. --- .../instrumentation/akkahttp/AkkaHttpServerHeaders.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dd-java-agent/instrumentation/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/AkkaHttpServerHeaders.java b/dd-java-agent/instrumentation/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/AkkaHttpServerHeaders.java index 589bc3d81b4..c5aabac9926 100644 --- a/dd-java-agent/instrumentation/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/AkkaHttpServerHeaders.java +++ b/dd-java-agent/instrumentation/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/AkkaHttpServerHeaders.java @@ -1,6 +1,7 @@ package datadog.trace.instrumentation.akkahttp; import akka.http.javadsl.model.HttpHeader; +import akka.http.javadsl.model.headers.RawRequestURI; import akka.http.javadsl.model.headers.RemoteAddress; import akka.http.javadsl.model.headers.TimeoutAccess; import akka.http.scaladsl.model.ContentType; @@ -45,7 +46,9 @@ private static void doForEachKey( for (final HttpHeader header : carrier.getHeaders()) { // skip synthetic headers - if (header instanceof RemoteAddress || header instanceof TimeoutAccess) { + if (header instanceof RemoteAddress + || header instanceof TimeoutAccess + || header instanceof RawRequestURI) { continue; } if (!classifier.accept(header.lowercaseName(), header.value())) { From cc7aa2249e98912b66b6d0eedb09cd6b71d05e66 Mon Sep 17 00:00:00 2001 From: Gustavo Lopes Date: Thu, 26 Oct 2023 10:47:45 +0100 Subject: [PATCH 2/2] Fix play muzzle against 2.9.0 --- dd-java-agent/instrumentation/play-2.6/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dd-java-agent/instrumentation/play-2.6/build.gradle b/dd-java-agent/instrumentation/play-2.6/build.gradle index a0bb7cf8858..3a0f2f419df 100644 --- a/dd-java-agent/instrumentation/play-2.6/build.gradle +++ b/dd-java-agent/instrumentation/play-2.6/build.gradle @@ -13,6 +13,7 @@ muzzle { module = "play_$scalaVersion" versions = "[$playVersion,)" assertInverse = true + javaVersion = 11 } pass { name = 'play26Plus' @@ -20,6 +21,7 @@ muzzle { module = 'play_2.12' versions = "[$playVersion,)" assertInverse = true + javaVersion = 11 } pass { name = 'play26Plus' @@ -27,6 +29,7 @@ muzzle { module = 'play_2.13' versions = "[$playVersion,)" assertInverse = true + javaVersion = 11 } pass {