diff --git a/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/IntrospectorServiceManager.java b/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/IntrospectorServiceManager.java index 4ac40878f..19c8c324b 100644 --- a/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/IntrospectorServiceManager.java +++ b/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/IntrospectorServiceManager.java @@ -125,6 +125,7 @@ public static IntrospectorServiceManager createAndInitialize(Map Map sec = new HashMap<>(); sec.put("enable", true); sec.put("validator_service_url", "ws://192.168.5.138:54321"); + sec.put("low-priority-instrumentation", Collections.singletonMap("enabled", true)); config.put("security", sec); if (configOverrides != null) { diff --git a/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/TransformingClassLoader.java b/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/TransformingClassLoader.java index d3e34e26f..c3718dd50 100644 --- a/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/TransformingClassLoader.java +++ b/instrumentation-security-test/src/main/java/com/newrelic/agent/security/introspec/internal/TransformingClassLoader.java @@ -22,7 +22,7 @@ class TransformingClassLoader extends URLClassLoader { "java.lang.ProcessImpl", "java.io", "java.nio", "javax.servlet" }; private static final String[] PROTECTED_PREFIXES = new String[]{"java.", "javax.", "com.sun.", "sun.", - "org.junit.", "junit.framework", "com.newrelic", "org.xml", "org.w3c"}; + "org.junit.", "junit.framework", "com.newrelic.agent", "com.newrelic.api", "org.xml", "org.w3c"}; private static final String[] INTROSPECTOR_MUST_LOADS = new String[]{ // This class needs to be woven. diff --git a/instrumentation-security/akka-http-core-10.0/src/main/scala/akka/http/scaladsl/HttpExt_Instrumentation.java b/instrumentation-security/akka-http-core-10.0/src/main/scala/akka/http/scaladsl/HttpExt_Instrumentation.java index aebfc59a1..05860b658 100644 --- a/instrumentation-security/akka-http-core-10.0/src/main/scala/akka/http/scaladsl/HttpExt_Instrumentation.java +++ b/instrumentation-security/akka-http-core-10.0/src/main/scala/akka/http/scaladsl/HttpExt_Instrumentation.java @@ -25,7 +25,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.akka.core.AkkaCoreUtils; +import com.newrelic.agent.security.instrumentation.akka.core.AkkaCoreUtils; import scala.concurrent.Future; import java.net.URI; diff --git a/instrumentation-security/akka-http-core-10.0/src/main/scala/com/nr/agent/security/akka/core/AkkaCoreUtils.java b/instrumentation-security/akka-http-core-10.0/src/main/scala/com/newrelic/agent/security/instrumentation/akka/core/AkkaCoreUtils.java similarity index 76% rename from instrumentation-security/akka-http-core-10.0/src/main/scala/com/nr/agent/security/akka/core/AkkaCoreUtils.java rename to instrumentation-security/akka-http-core-10.0/src/main/scala/com/newrelic/agent/security/instrumentation/akka/core/AkkaCoreUtils.java index f8a7329bb..dc70cb610 100644 --- a/instrumentation-security/akka-http-core-10.0/src/main/scala/com/nr/agent/security/akka/core/AkkaCoreUtils.java +++ b/instrumentation-security/akka-http-core-10.0/src/main/scala/com/newrelic/agent/security/instrumentation/akka/core/AkkaCoreUtils.java @@ -1,4 +1,4 @@ -package com.nr.agent.security.akka.core; +package com.newrelic.agent.security.instrumentation.akka.core; public class AkkaCoreUtils { diff --git a/instrumentation-security/akka-http-core-10.0/src/test/scala/com/agent/instrumentation/akka/http/core_10/AkkaHttpCoreTest.scala b/instrumentation-security/akka-http-core-10.0/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaHttpCoreTest.scala similarity index 98% rename from instrumentation-security/akka-http-core-10.0/src/test/scala/com/agent/instrumentation/akka/http/core_10/AkkaHttpCoreTest.scala rename to instrumentation-security/akka-http-core-10.0/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaHttpCoreTest.scala index 4fb2d3ddd..2593415f9 100644 --- a/instrumentation-security/akka-http-core-10.0/src/test/scala/com/agent/instrumentation/akka/http/core_10/AkkaHttpCoreTest.scala +++ b/instrumentation-security/akka-http-core-10.0/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaHttpCoreTest.scala @@ -5,18 +5,18 @@ * */ -package com.agent.instrumentation.akka.http.core_10 +package com.nr.agent.security.instrumentation.akka.http.core_10 import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model.{HttpHeader, HttpRequest, HttpResponse} import akka.stream.ActorMaterializer +import com.newrelic.agent.security.instrumentation.akka.core.AkkaCoreUtils import com.newrelic.agent.security.introspec.{InstrumentationTestConfig, SecurityInstrumentationTestRunner, SecurityIntrospector} import com.newrelic.api.agent.Trace import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper import com.newrelic.api.agent.security.schema.VulnerabilityCaseType import com.newrelic.api.agent.security.schema.operation.SSRFOperation -import com.nr.agent.security.akka.core.AkkaCoreUtils import org.junit.runner.RunWith import org.junit.{After, Assert, Test} diff --git a/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/agent/instrumentation/akka/http/core_211_10011/AkkaServer.scala b/instrumentation-security/akka-http-core-10.0/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaServer.scala similarity index 97% rename from instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/agent/instrumentation/akka/http/core_211_10011/AkkaServer.scala rename to instrumentation-security/akka-http-core-10.0/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaServer.scala index 669eab8ab..6e9d879e8 100644 --- a/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/agent/instrumentation/akka/http/core_211_10011/AkkaServer.scala +++ b/instrumentation-security/akka-http-core-10.0/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaServer.scala @@ -5,7 +5,7 @@ * */ -package com.agent.instrumentation.akka.http.core_211_10011 +package com.nr.agent.security.instrumentation.akka.http.core_10 import akka.actor.ActorSystem import akka.event.Logging diff --git a/instrumentation-security/akka-http-core-10.0/src/test/scala/com/agent/instrumentation/akka/http/core_10/PlayServer.scala b/instrumentation-security/akka-http-core-10.0/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/PlayServer.scala similarity index 96% rename from instrumentation-security/akka-http-core-10.0/src/test/scala/com/agent/instrumentation/akka/http/core_10/PlayServer.scala rename to instrumentation-security/akka-http-core-10.0/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/PlayServer.scala index b81dae863..dc478a44d 100644 --- a/instrumentation-security/akka-http-core-10.0/src/test/scala/com/agent/instrumentation/akka/http/core_10/PlayServer.scala +++ b/instrumentation-security/akka-http-core-10.0/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/PlayServer.scala @@ -5,7 +5,7 @@ * */ -package com.agent.instrumentation.akka.http.core_10 +package com.nr.agent.security.instrumentation.akka.http.core_10 import akka.actor.ActorSystem import akka.event.Logging diff --git a/instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/akka/http/scaladsl/HttpExt_Instrumentation.java b/instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/akka/http/scaladsl/HttpExt_Instrumentation.java index 0ba6aa38f..beb68e310 100644 --- a/instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/akka/http/scaladsl/HttpExt_Instrumentation.java +++ b/instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/akka/http/scaladsl/HttpExt_Instrumentation.java @@ -24,7 +24,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.akka.core.AkkaCoreUtils; +import com.newrelic.agent.security.instrumentation.akka.core.AkkaCoreUtils; import scala.concurrent.Future; import java.net.URI; diff --git a/instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/com/nr/agent/security/akka/core/AkkaCoreUtils.java b/instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/com/newrelic/agent/security/instrumentation/akka/core/AkkaCoreUtils.java similarity index 76% rename from instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/com/nr/agent/security/akka/core/AkkaCoreUtils.java rename to instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/com/newrelic/agent/security/instrumentation/akka/core/AkkaCoreUtils.java index f8a7329bb..dc70cb610 100644 --- a/instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/com/nr/agent/security/akka/core/AkkaCoreUtils.java +++ b/instrumentation-security/akka-http-core-2.11_10.0.11/src/main/scala/com/newrelic/agent/security/instrumentation/akka/core/AkkaCoreUtils.java @@ -1,4 +1,4 @@ -package com.nr.agent.security.akka.core; +package com.newrelic.agent.security.instrumentation.akka.core; public class AkkaCoreUtils { diff --git a/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/agent/instrumentation/akka/http/core_211_10011/AkkaHttpCoreTest.scala b/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaHttpCoreTest.scala similarity index 98% rename from instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/agent/instrumentation/akka/http/core_211_10011/AkkaHttpCoreTest.scala rename to instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaHttpCoreTest.scala index f74cb0630..2593415f9 100644 --- a/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/agent/instrumentation/akka/http/core_211_10011/AkkaHttpCoreTest.scala +++ b/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaHttpCoreTest.scala @@ -5,19 +5,18 @@ * */ -package com.agent.instrumentation.akka.http.core_10 +package com.nr.agent.security.instrumentation.akka.http.core_10 import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model.{HttpHeader, HttpRequest, HttpResponse} import akka.stream.ActorMaterializer -import com.agent.instrumentation.akka.http.core_211_10011.{AkkaServer, PlayServer} +import com.newrelic.agent.security.instrumentation.akka.core.AkkaCoreUtils import com.newrelic.agent.security.introspec.{InstrumentationTestConfig, SecurityInstrumentationTestRunner, SecurityIntrospector} import com.newrelic.api.agent.Trace import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper import com.newrelic.api.agent.security.schema.VulnerabilityCaseType import com.newrelic.api.agent.security.schema.operation.SSRFOperation -import com.nr.agent.security.akka.core.AkkaCoreUtils import org.junit.runner.RunWith import org.junit.{After, Assert, Test} diff --git a/instrumentation-security/akka-http-core-10.0/src/test/scala/com/agent/instrumentation/akka/http/core_10/AkkaServer.scala b/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaServer.scala similarity index 97% rename from instrumentation-security/akka-http-core-10.0/src/test/scala/com/agent/instrumentation/akka/http/core_10/AkkaServer.scala rename to instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaServer.scala index 7469cd90a..6e9d879e8 100644 --- a/instrumentation-security/akka-http-core-10.0/src/test/scala/com/agent/instrumentation/akka/http/core_10/AkkaServer.scala +++ b/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/AkkaServer.scala @@ -5,7 +5,7 @@ * */ -package com.agent.instrumentation.akka.http.core_10 +package com.nr.agent.security.instrumentation.akka.http.core_10 import akka.actor.ActorSystem import akka.event.Logging diff --git a/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/agent/instrumentation/akka/http/core_211_10011/PlayServer.scala b/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/PlayServer.scala similarity index 95% rename from instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/agent/instrumentation/akka/http/core_211_10011/PlayServer.scala rename to instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/PlayServer.scala index cc28674bd..dc478a44d 100644 --- a/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/agent/instrumentation/akka/http/core_211_10011/PlayServer.scala +++ b/instrumentation-security/akka-http-core-2.11_10.0.11/src/test/scala/com/nr/agent/security/instrumentation/akka/http/core_10/PlayServer.scala @@ -5,7 +5,7 @@ * */ -package com.agent.instrumentation.akka.http.core_211_10011 +package com.nr.agent.security.instrumentation.akka.http.core_10 import akka.actor.ActorSystem import akka.event.Logging @@ -13,7 +13,6 @@ import akka.http.scaladsl.Http import akka.http.scaladsl.model.HttpMethods._ import akka.http.scaladsl.model._ import akka.stream.ActorMaterializer -import akka.stream.scaladsl.{Source, _} import akka.util.Timeout import com.typesafe.config.ConfigFactory diff --git a/instrumentation-security/apache-ldap/src/main/java/com/nr/instrumentation/security/apache/ldap/LDAPUtils.java b/instrumentation-security/apache-ldap/src/main/java/com/newrelic/agent/security/instrumentation/apache/ldap/LDAPUtils.java similarity index 79% rename from instrumentation-security/apache-ldap/src/main/java/com/nr/instrumentation/security/apache/ldap/LDAPUtils.java rename to instrumentation-security/apache-ldap/src/main/java/com/newrelic/agent/security/instrumentation/apache/ldap/LDAPUtils.java index f189074e2..6f065267e 100644 --- a/instrumentation-security/apache-ldap/src/main/java/com/nr/instrumentation/security/apache/ldap/LDAPUtils.java +++ b/instrumentation-security/apache-ldap/src/main/java/com/newrelic/agent/security/instrumentation/apache/ldap/LDAPUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.apache.ldap; +package com.newrelic.agent.security.instrumentation.apache.ldap; public class LDAPUtils { diff --git a/instrumentation-security/apache-ldap/src/main/java/org/apache/directory/ldap/client/api/LdapAsyncConnection_Instrumentation.java b/instrumentation-security/apache-ldap/src/main/java/org/apache/directory/ldap/client/api/LdapAsyncConnection_Instrumentation.java index a940da71d..02458155b 100644 --- a/instrumentation-security/apache-ldap/src/main/java/org/apache/directory/ldap/client/api/LdapAsyncConnection_Instrumentation.java +++ b/instrumentation-security/apache-ldap/src/main/java/org/apache/directory/ldap/client/api/LdapAsyncConnection_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.apache.ldap.LDAPUtils; +import com.newrelic.agent.security.instrumentation.apache.ldap.LDAPUtils; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.message.SearchRequest; import org.apache.directory.api.ldap.model.message.SearchScope; diff --git a/instrumentation-security/apache-ldap/src/main/java/org/apache/directory/ldap/client/api/LdapConnection_Instrumentation.java b/instrumentation-security/apache-ldap/src/main/java/org/apache/directory/ldap/client/api/LdapConnection_Instrumentation.java index 855f4c78d..ddda6176e 100644 --- a/instrumentation-security/apache-ldap/src/main/java/org/apache/directory/ldap/client/api/LdapConnection_Instrumentation.java +++ b/instrumentation-security/apache-ldap/src/main/java/org/apache/directory/ldap/client/api/LdapConnection_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.apache.ldap.LDAPUtils; +import com.newrelic.agent.security.instrumentation.apache.ldap.LDAPUtils; import org.apache.directory.api.ldap.model.cursor.EntryCursor; import org.apache.directory.api.ldap.model.cursor.SearchCursor; import org.apache.directory.api.ldap.model.exception.LdapException; diff --git a/instrumentation-security/apache-ldap/src/test/java/com/nr/instrumentation/security/apache/ldap/LdapAsyncConnectionTest.java b/instrumentation-security/apache-ldap/src/test/java/com/nr/agent/security/instrumentation/apache/ldap/LdapAsyncConnectionTest.java similarity index 98% rename from instrumentation-security/apache-ldap/src/test/java/com/nr/instrumentation/security/apache/ldap/LdapAsyncConnectionTest.java rename to instrumentation-security/apache-ldap/src/test/java/com/nr/agent/security/instrumentation/apache/ldap/LdapAsyncConnectionTest.java index df20665b3..1728d3427 100644 --- a/instrumentation-security/apache-ldap/src/test/java/com/nr/instrumentation/security/apache/ldap/LdapAsyncConnectionTest.java +++ b/instrumentation-security/apache-ldap/src/test/java/com/nr/agent/security/instrumentation/apache/ldap/LdapAsyncConnectionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.apache.ldap; +package com.nr.agent.security.instrumentation.apache.ldap; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -25,7 +25,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "org.apache.directory.ldap.client.api", "com.nr.instrumentation.security.apache.ldap" }) +@InstrumentationTestConfig(includePrefixes = { "org.apache.directory.ldap.client.api", "com.newrelic.agent.security.instrumentation.apache.ldap" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class LdapAsyncConnectionTest { public static final String DOMAIN_DSN = "dc=example,dc=com"; diff --git a/instrumentation-security/apache-ldap/src/test/java/com/nr/instrumentation/security/apache/ldap/LdapConnectionTest.java b/instrumentation-security/apache-ldap/src/test/java/com/nr/agent/security/instrumentation/apache/ldap/LdapConnectionTest.java similarity index 98% rename from instrumentation-security/apache-ldap/src/test/java/com/nr/instrumentation/security/apache/ldap/LdapConnectionTest.java rename to instrumentation-security/apache-ldap/src/test/java/com/nr/agent/security/instrumentation/apache/ldap/LdapConnectionTest.java index 1718bb64a..49868d6af 100644 --- a/instrumentation-security/apache-ldap/src/test/java/com/nr/instrumentation/security/apache/ldap/LdapConnectionTest.java +++ b/instrumentation-security/apache-ldap/src/test/java/com/nr/agent/security/instrumentation/apache/ldap/LdapConnectionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.apache.ldap; +package com.nr.agent.security.instrumentation.apache.ldap; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -28,7 +28,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "org.apache.directory.ldap.client.api", "com.nr.instrumentation.security.apache.ldap" }) +@InstrumentationTestConfig(includePrefixes = { "org.apache.directory.ldap.client.api", "com.newrelic.agent.security.instrumentation.apache.ldap" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class LdapConnectionTest { public static final String DOMAIN_DSN = "dc=example,dc=com"; diff --git a/instrumentation-security/camel-xpath/src/main/java/com/nr/instrumentation/security/xpath/camel/XPATHUtils.java b/instrumentation-security/camel-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/camel/XPATHUtils.java similarity index 72% rename from instrumentation-security/camel-xpath/src/main/java/com/nr/instrumentation/security/xpath/camel/XPATHUtils.java rename to instrumentation-security/camel-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/camel/XPATHUtils.java index 95609654d..9ada28ff9 100644 --- a/instrumentation-security/camel-xpath/src/main/java/com/nr/instrumentation/security/xpath/camel/XPATHUtils.java +++ b/instrumentation-security/camel-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/camel/XPATHUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xpath.camel; +package com.newrelic.agent.security.instrumentation.xpath.camel; public class XPATHUtils { diff --git a/instrumentation-security/camel-xpath/src/main/java/org/apache/camel/builder/BuilderSupport_Instrumentation.java b/instrumentation-security/camel-xpath/src/main/java/org/apache/camel/builder/BuilderSupport_Instrumentation.java index 8e06b3524..56cd88223 100644 --- a/instrumentation-security/camel-xpath/src/main/java/org/apache/camel/builder/BuilderSupport_Instrumentation.java +++ b/instrumentation-security/camel-xpath/src/main/java/org/apache/camel/builder/BuilderSupport_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.xpath.camel.XPATHUtils; +import com.newrelic.agent.security.instrumentation.xpath.camel.XPATHUtils; import org.apache.camel.support.builder.Namespaces; @Weave(type = MatchType.BaseClass, originalName = "org.apache.camel.builder.BuilderSupport") diff --git a/instrumentation-security/camel-xpath/src/test/java/com/nr/instrumentation/security/camel/xpath/BuilderSupportTest.java b/instrumentation-security/camel-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/camel/BuilderSupportTest.java similarity index 98% rename from instrumentation-security/camel-xpath/src/test/java/com/nr/instrumentation/security/camel/xpath/BuilderSupportTest.java rename to instrumentation-security/camel-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/camel/BuilderSupportTest.java index d4eeaddc7..2cc5b7525 100644 --- a/instrumentation-security/camel-xpath/src/test/java/com/nr/instrumentation/security/camel/xpath/BuilderSupportTest.java +++ b/instrumentation-security/camel-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/camel/BuilderSupportTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.camel.xpath; +package com.nr.agent.security.instrumentation.xpath.camel; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/commons-jxpath/src/main/java/com/nr/instrumentation/security/xpath/commons/jxpath/XPATHUtils.java b/instrumentation-security/commons-jxpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/commons/jxpath/XPATHUtils.java similarity index 83% rename from instrumentation-security/commons-jxpath/src/main/java/com/nr/instrumentation/security/xpath/commons/jxpath/XPATHUtils.java rename to instrumentation-security/commons-jxpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/commons/jxpath/XPATHUtils.java index 1cae168f3..7536a5bd5 100644 --- a/instrumentation-security/commons-jxpath/src/main/java/com/nr/instrumentation/security/xpath/commons/jxpath/XPATHUtils.java +++ b/instrumentation-security/commons-jxpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/commons/jxpath/XPATHUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xpath.commons.jxpath; +package com.newrelic.agent.security.instrumentation.xpath.commons.jxpath; public class XPATHUtils { public static final String NR_SEC_CUSTOM_ATTRIB_NAME = "XPATH_OPERATION_LOCK_COMMONS_JXPATH-"; diff --git a/instrumentation-security/commons-jxpath/src/main/java/org/apache/commons/jxpath/ri/compiler/JXPathContextReferenceImpl_Instrumentation.java b/instrumentation-security/commons-jxpath/src/main/java/org/apache/commons/jxpath/ri/compiler/JXPathContextReferenceImpl_Instrumentation.java index a0ddb3649..f286b4c9b 100644 --- a/instrumentation-security/commons-jxpath/src/main/java/org/apache/commons/jxpath/ri/compiler/JXPathContextReferenceImpl_Instrumentation.java +++ b/instrumentation-security/commons-jxpath/src/main/java/org/apache/commons/jxpath/ri/compiler/JXPathContextReferenceImpl_Instrumentation.java @@ -9,8 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.xpath.commons.jxpath.XPATHUtils; -import org.apache.commons.jxpath.ri.EvalContext; +import com.newrelic.agent.security.instrumentation.xpath.commons.jxpath.XPATHUtils; import java.util.Iterator; diff --git a/instrumentation-security/commons-jxpath/src/test/java/JXPathTest.java b/instrumentation-security/commons-jxpath/src/test/java/com/nr/agent/security/instrumentation/xpath/commons/jxpath/JXPathTest.java similarity index 98% rename from instrumentation-security/commons-jxpath/src/test/java/JXPathTest.java rename to instrumentation-security/commons-jxpath/src/test/java/com/nr/agent/security/instrumentation/xpath/commons/jxpath/JXPathTest.java index fa48a72b4..e74d55e1c 100644 --- a/instrumentation-security/commons-jxpath/src/test/java/JXPathTest.java +++ b/instrumentation-security/commons-jxpath/src/test/java/com/nr/agent/security/instrumentation/xpath/commons/jxpath/JXPathTest.java @@ -1,3 +1,5 @@ +package com.nr.agent.security.instrumentation.xpath.commons.jxpath; + import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; @@ -6,7 +8,6 @@ import com.newrelic.api.agent.security.schema.operation.XPathOperation; import org.apache.commons.jxpath.Container; import org.apache.commons.jxpath.JXPathContext; -import org.apache.commons.jxpath.ri.compiler.Expression; import org.apache.commons.jxpath.xml.DocumentContainer; import org.junit.Assert; import org.junit.Test; diff --git a/instrumentation-security/dynamodb-1.11.390/src/main/java/com/amazonaws/services/dynamodbv2_1_11_390/AmazonDynamoDBClient_Instrumentation.java b/instrumentation-security/dynamodb-1.11.390/src/main/java/com/amazonaws/services/dynamodbv2_1_11_390/AmazonDynamoDBClient_Instrumentation.java index 3161b559b..6089a79eb 100644 --- a/instrumentation-security/dynamodb-1.11.390/src/main/java/com/amazonaws/services/dynamodbv2_1_11_390/AmazonDynamoDBClient_Instrumentation.java +++ b/instrumentation-security/dynamodb-1.11.390/src/main/java/com/amazonaws/services/dynamodbv2_1_11_390/AmazonDynamoDBClient_Instrumentation.java @@ -18,7 +18,7 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_1_11_390.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_1_11_390.DynamoDBUtil; import java.net.URI; diff --git a/instrumentation-security/dynamodb-1.11.390/src/main/java/com/nr/agent/security/dynamodb_1_11_390/DynamoDBUtil.java b/instrumentation-security/dynamodb-1.11.390/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_390/DynamoDBUtil.java similarity index 99% rename from instrumentation-security/dynamodb-1.11.390/src/main/java/com/nr/agent/security/dynamodb_1_11_390/DynamoDBUtil.java rename to instrumentation-security/dynamodb-1.11.390/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_390/DynamoDBUtil.java index e479ede76..59b2a21a9 100644 --- a/instrumentation-security/dynamodb-1.11.390/src/main/java/com/nr/agent/security/dynamodb_1_11_390/DynamoDBUtil.java +++ b/instrumentation-security/dynamodb-1.11.390/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_390/DynamoDBUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.dynamodb_1_11_390; +package com.newrelic.agent.security.instrumentation.dynamodb_1_11_390; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; diff --git a/instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/instrumentation/security/dynamodb453/DynamoServer.java b/instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_390/DynamoServer.java similarity index 99% rename from instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/instrumentation/security/dynamodb453/DynamoServer.java rename to instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_390/DynamoServer.java index 7193e387a..38a5a31de 100644 --- a/instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/instrumentation/security/dynamodb453/DynamoServer.java +++ b/instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_390/DynamoServer.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.dynamodb453; +package com.nr.agent.security.instrumentation.dynamodb_1_11_390; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; @@ -90,7 +90,6 @@ public class DynamoServer extends ExternalResource { private void setUp() throws Exception { System.setProperty("sqlite4java.library.path", "src/test/resources/libs/"); - server = ServerRunner.createServerFromCommandLineArgs(new String[]{ "-inMemory", "-port", String.valueOf(PORT) }); server.start(); diff --git a/instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/instrumentation/security/dynamodb453/DynamodbTest.java b/instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_390/DynamodbTest.java similarity index 98% rename from instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/instrumentation/security/dynamodb453/DynamodbTest.java rename to instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_390/DynamodbTest.java index e9238a437..25463009d 100644 --- a/instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/instrumentation/security/dynamodb453/DynamodbTest.java +++ b/instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_390/DynamodbTest.java @@ -1,15 +1,7 @@ -package com.nr.instrumentation.security.dynamodb453; +package com.nr.agent.security.instrumentation.dynamodb_1_11_390; import com.amazonaws.services.dynamodbv2.model.AttributeValue; import com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate; -import com.amazonaws.services.dynamodbv2.model.DeleteItemRequest; -import com.amazonaws.services.dynamodbv2.model.GetItemRequest; -import com.amazonaws.services.dynamodbv2.model.KeysAndAttributes; -import com.amazonaws.services.dynamodbv2.model.PutItemRequest; -import com.amazonaws.services.dynamodbv2.model.PutRequest; -import com.amazonaws.services.dynamodbv2.model.QueryRequest; -import com.amazonaws.services.dynamodbv2.model.ScanRequest; -import com.amazonaws.services.dynamodbv2.model.UpdateItemRequest; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; @@ -29,7 +21,7 @@ @RunWith(SecurityInstrumentationTestRunner.class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) -@InstrumentationTestConfig(includePrefixes = {"com.nr.agent.security.dynamodb_1_11_453", "com.amazonaws.services"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.dynamodb_1_11_390", "com.amazonaws.services.dynamodbv2_1_11_390"}) public class DynamodbTest { @ClassRule public static DynamoServer dynamo = new DynamoServer(); diff --git a/instrumentation-security/dynamodb-1.11.453/src/main/java/com/amazonaws/services/dynamodbv2_1_11_453/AmazonDynamoDBClient_Instrumentation.java b/instrumentation-security/dynamodb-1.11.453/src/main/java/com/amazonaws/services/dynamodbv2_1_11_453/AmazonDynamoDBClient_Instrumentation.java index 7437c1ac6..0eb1a8180 100644 --- a/instrumentation-security/dynamodb-1.11.453/src/main/java/com/amazonaws/services/dynamodbv2_1_11_453/AmazonDynamoDBClient_Instrumentation.java +++ b/instrumentation-security/dynamodb-1.11.453/src/main/java/com/amazonaws/services/dynamodbv2_1_11_453/AmazonDynamoDBClient_Instrumentation.java @@ -18,7 +18,7 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_1_11_453.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_1_11_453.DynamoDBUtil; import java.net.URI; diff --git a/instrumentation-security/dynamodb-1.11.453/src/main/java/com/nr/agent/security/dynamodb_1_11_453/DynamoDBUtil.java b/instrumentation-security/dynamodb-1.11.453/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_453/DynamoDBUtil.java similarity index 99% rename from instrumentation-security/dynamodb-1.11.453/src/main/java/com/nr/agent/security/dynamodb_1_11_453/DynamoDBUtil.java rename to instrumentation-security/dynamodb-1.11.453/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_453/DynamoDBUtil.java index ff257e2a2..bfe59f2e6 100644 --- a/instrumentation-security/dynamodb-1.11.453/src/main/java/com/nr/agent/security/dynamodb_1_11_453/DynamoDBUtil.java +++ b/instrumentation-security/dynamodb-1.11.453/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_453/DynamoDBUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.dynamodb_1_11_453; +package com.newrelic.agent.security.instrumentation.dynamodb_1_11_453; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; diff --git a/instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/instrumentation/security/dynamodb459/DynamoServer.java b/instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_453/DynamoServer.java similarity index 99% rename from instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/instrumentation/security/dynamodb459/DynamoServer.java rename to instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_453/DynamoServer.java index 87f281c1b..04f658be5 100644 --- a/instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/instrumentation/security/dynamodb459/DynamoServer.java +++ b/instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_453/DynamoServer.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.dynamodb459; +package com.nr.agent.security.instrumentation.dynamodb_1_11_453; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; @@ -90,6 +90,7 @@ public class DynamoServer extends ExternalResource { private void setUp() throws Exception { System.setProperty("sqlite4java.library.path", "src/test/resources/libs/"); + server = ServerRunner.createServerFromCommandLineArgs(new String[]{ "-inMemory", "-port", String.valueOf(PORT) }); server.start(); diff --git a/instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/instrumentation/security/dynamodb390/DynamodbTest.java b/instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_453/DynamodbTest.java similarity index 98% rename from instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/instrumentation/security/dynamodb390/DynamodbTest.java rename to instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_453/DynamodbTest.java index 974376182..a1cb05462 100644 --- a/instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/instrumentation/security/dynamodb390/DynamodbTest.java +++ b/instrumentation-security/dynamodb-1.11.453/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_453/DynamodbTest.java @@ -1,15 +1,7 @@ -package com.nr.instrumentation.security.dynamodb390; +package com.nr.agent.security.instrumentation.dynamodb_1_11_453; import com.amazonaws.services.dynamodbv2.model.AttributeValue; import com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate; -import com.amazonaws.services.dynamodbv2.model.DeleteItemRequest; -import com.amazonaws.services.dynamodbv2.model.GetItemRequest; -import com.amazonaws.services.dynamodbv2.model.KeysAndAttributes; -import com.amazonaws.services.dynamodbv2.model.PutItemRequest; -import com.amazonaws.services.dynamodbv2.model.PutRequest; -import com.amazonaws.services.dynamodbv2.model.QueryRequest; -import com.amazonaws.services.dynamodbv2.model.ScanRequest; -import com.amazonaws.services.dynamodbv2.model.UpdateItemRequest; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; @@ -29,7 +21,7 @@ @RunWith(SecurityInstrumentationTestRunner.class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) -@InstrumentationTestConfig(includePrefixes = {"com.nr.agent.security.dynamodb_1_11_390", "com.amazonaws.services.dynamodbv2_1_11_390"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.dynamodb_1_11_453", "com.amazonaws.services"}) public class DynamodbTest { @ClassRule public static DynamoServer dynamo = new DynamoServer(); diff --git a/instrumentation-security/dynamodb-1.11.459/src/main/java/com/amazonaws/services/dynamodbv2_1_11_459/AmazonDynamoDBClient_Instrumentation.java b/instrumentation-security/dynamodb-1.11.459/src/main/java/com/amazonaws/services/dynamodbv2_1_11_459/AmazonDynamoDBClient_Instrumentation.java index 03bcfb538..396d82b1c 100644 --- a/instrumentation-security/dynamodb-1.11.459/src/main/java/com/amazonaws/services/dynamodbv2_1_11_459/AmazonDynamoDBClient_Instrumentation.java +++ b/instrumentation-security/dynamodb-1.11.459/src/main/java/com/amazonaws/services/dynamodbv2_1_11_459/AmazonDynamoDBClient_Instrumentation.java @@ -18,7 +18,7 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_1_11_459.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_1_11_459.DynamoDBUtil; import java.net.URI; diff --git a/instrumentation-security/dynamodb-1.11.459/src/main/java/com/nr/agent/security/dynamodb_1_11_459/DynamoDBUtil.java b/instrumentation-security/dynamodb-1.11.459/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_459/DynamoDBUtil.java similarity index 99% rename from instrumentation-security/dynamodb-1.11.459/src/main/java/com/nr/agent/security/dynamodb_1_11_459/DynamoDBUtil.java rename to instrumentation-security/dynamodb-1.11.459/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_459/DynamoDBUtil.java index 8ca0078cd..bd1fdb1c6 100644 --- a/instrumentation-security/dynamodb-1.11.459/src/main/java/com/nr/agent/security/dynamodb_1_11_459/DynamoDBUtil.java +++ b/instrumentation-security/dynamodb-1.11.459/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_459/DynamoDBUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.dynamodb_1_11_459; +package com.newrelic.agent.security.instrumentation.dynamodb_1_11_459; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; diff --git a/instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/instrumentation/security/dynamodb390/DynamoServer.java b/instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_459/DynamoServer.java similarity index 99% rename from instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/instrumentation/security/dynamodb390/DynamoServer.java rename to instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_459/DynamoServer.java index bb3943530..454f1df2a 100644 --- a/instrumentation-security/dynamodb-1.11.390/src/test/java/com/nr/instrumentation/security/dynamodb390/DynamoServer.java +++ b/instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_459/DynamoServer.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.dynamodb390; +package com.nr.agent.security.instrumentation.dynamodb_1_11_459; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; diff --git a/instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/instrumentation/security/dynamodb459/DynamodbTest.java b/instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_459/DynamodbTest.java similarity index 98% rename from instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/instrumentation/security/dynamodb459/DynamodbTest.java rename to instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_459/DynamodbTest.java index cd1a4c47f..c574afb71 100644 --- a/instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/instrumentation/security/dynamodb459/DynamodbTest.java +++ b/instrumentation-security/dynamodb-1.11.459/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_459/DynamodbTest.java @@ -1,15 +1,7 @@ -package com.nr.instrumentation.security.dynamodb459; +package com.nr.agent.security.instrumentation.dynamodb_1_11_459; import com.amazonaws.services.dynamodbv2.model.AttributeValue; import com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate; -import com.amazonaws.services.dynamodbv2.model.DeleteItemRequest; -import com.amazonaws.services.dynamodbv2.model.GetItemRequest; -import com.amazonaws.services.dynamodbv2.model.KeysAndAttributes; -import com.amazonaws.services.dynamodbv2.model.PutItemRequest; -import com.amazonaws.services.dynamodbv2.model.PutRequest; -import com.amazonaws.services.dynamodbv2.model.QueryRequest; -import com.amazonaws.services.dynamodbv2.model.ScanRequest; -import com.amazonaws.services.dynamodbv2.model.UpdateItemRequest; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; @@ -29,7 +21,7 @@ @RunWith(SecurityInstrumentationTestRunner.class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) -@InstrumentationTestConfig(includePrefixes = {"com.nr.agent.security.dynamodb_1_11_459", "com.amazonaws.services.dynamodbv2_1_11_459"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.dynamodb_1_11_459", "com.amazonaws.services.dynamodbv2_1_11_459"}) public class DynamodbTest { @ClassRule public static DynamoServer dynamo = new DynamoServer(); diff --git a/instrumentation-security/dynamodb-1.11.80/src/main/java/com/amazonaws/services/dynamodbv2_1_11_80/AmazonDynamoDBClient_Instrumentation.java b/instrumentation-security/dynamodb-1.11.80/src/main/java/com/amazonaws/services/dynamodbv2_1_11_80/AmazonDynamoDBClient_Instrumentation.java index 73d35d5e3..111c18e68 100644 --- a/instrumentation-security/dynamodb-1.11.80/src/main/java/com/amazonaws/services/dynamodbv2_1_11_80/AmazonDynamoDBClient_Instrumentation.java +++ b/instrumentation-security/dynamodb-1.11.80/src/main/java/com/amazonaws/services/dynamodbv2_1_11_80/AmazonDynamoDBClient_Instrumentation.java @@ -18,7 +18,7 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_1_11_80.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_1_11_80.DynamoDBUtil; /** * This provides external instrumentation for Amazon's DynamoDB Java API 1.9.0+. Metrics are all generated in diff --git a/instrumentation-security/dynamodb-1.11.80/src/main/java/com/nr/agent/security/dynamodb_1_11_80/DynamoDBUtil.java b/instrumentation-security/dynamodb-1.11.80/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_80/DynamoDBUtil.java similarity index 99% rename from instrumentation-security/dynamodb-1.11.80/src/main/java/com/nr/agent/security/dynamodb_1_11_80/DynamoDBUtil.java rename to instrumentation-security/dynamodb-1.11.80/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_80/DynamoDBUtil.java index 28f79e586..f14a1e885 100644 --- a/instrumentation-security/dynamodb-1.11.80/src/main/java/com/nr/agent/security/dynamodb_1_11_80/DynamoDBUtil.java +++ b/instrumentation-security/dynamodb-1.11.80/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_1_11_80/DynamoDBUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.dynamodb_1_11_80; +package com.newrelic.agent.security.instrumentation.dynamodb_1_11_80; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; diff --git a/instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/instrumentation/security/dynamodb80/DynamoServer.java b/instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_80/DynamoServer.java similarity index 99% rename from instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/instrumentation/security/dynamodb80/DynamoServer.java rename to instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_80/DynamoServer.java index eb66b99d5..4e53bf183 100644 --- a/instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/instrumentation/security/dynamodb80/DynamoServer.java +++ b/instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_80/DynamoServer.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.dynamodb80; +package com.nr.agent.security.instrumentation.dynamodb_1_11_80; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; diff --git a/instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/instrumentation/security/dynamodb80/DynamodbTest.java b/instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_80/DynamodbTest.java similarity index 98% rename from instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/instrumentation/security/dynamodb80/DynamodbTest.java rename to instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_80/DynamodbTest.java index 1165f6e03..39038a7b7 100644 --- a/instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/instrumentation/security/dynamodb80/DynamodbTest.java +++ b/instrumentation-security/dynamodb-1.11.80/src/test/java/com/nr/agent/security/instrumentation/dynamodb_1_11_80/DynamodbTest.java @@ -1,15 +1,7 @@ -package com.nr.instrumentation.security.dynamodb80; +package com.nr.agent.security.instrumentation.dynamodb_1_11_80; import com.amazonaws.services.dynamodbv2.model.AttributeValue; import com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate; -import com.amazonaws.services.dynamodbv2.model.DeleteItemRequest; -import com.amazonaws.services.dynamodbv2.model.GetItemRequest; -import com.amazonaws.services.dynamodbv2.model.KeysAndAttributes; -import com.amazonaws.services.dynamodbv2.model.PutItemRequest; -import com.amazonaws.services.dynamodbv2.model.PutRequest; -import com.amazonaws.services.dynamodbv2.model.QueryRequest; -import com.amazonaws.services.dynamodbv2.model.ScanRequest; -import com.amazonaws.services.dynamodbv2.model.UpdateItemRequest; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; @@ -23,14 +15,13 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; -import org.w3c.dom.Attr; import java.util.List; import java.util.Map; @RunWith(SecurityInstrumentationTestRunner.class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) -@InstrumentationTestConfig(includePrefixes = {"com.nr.agent.security.dynamodb_1_11_80", "com.amazonaws.services.dynamodbv2_1_11_80"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.dynamodb_1_11_80", "com.amazonaws.services.dynamodbv2_1_11_80"}) public class DynamodbTest { @ClassRule public static DynamoServer dynamo = new DynamoServer(); diff --git a/instrumentation-security/dynamodb-2.1.0/src/main/java/com/nr/agent/security/dynamodb_210/DynamoDBUtil.java b/instrumentation-security/dynamodb-2.1.0/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_210/DynamoDBUtil.java similarity index 99% rename from instrumentation-security/dynamodb-2.1.0/src/main/java/com/nr/agent/security/dynamodb_210/DynamoDBUtil.java rename to instrumentation-security/dynamodb-2.1.0/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_210/DynamoDBUtil.java index 06778fa33..934d294a5 100644 --- a/instrumentation-security/dynamodb-2.1.0/src/main/java/com/nr/agent/security/dynamodb_210/DynamoDBUtil.java +++ b/instrumentation-security/dynamodb-2.1.0/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_210/DynamoDBUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.dynamodb_210; +package com.newrelic.agent.security.instrumentation.dynamodb_210; import com.newrelic.api.agent.DatastoreParameters; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/dynamodb-2.1.0/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java b/instrumentation-security/dynamodb-2.1.0/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java index 5a5a85444..7d85f8b4d 100644 --- a/instrumentation-security/dynamodb-2.1.0/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java +++ b/instrumentation-security/dynamodb-2.1.0/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_210.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_210.DynamoDBUtil; import software.amazon.awssdk.core.SdkRequest; import software.amazon.awssdk.core.SdkResponse; import software.amazon.awssdk.core.async.AsyncResponseTransformer; diff --git a/instrumentation-security/dynamodb-2.1.0/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java b/instrumentation-security/dynamodb-2.1.0/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java index 9c6c4c5cf..a93a1e247 100644 --- a/instrumentation-security/dynamodb-2.1.0/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java +++ b/instrumentation-security/dynamodb-2.1.0/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_210.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_210.DynamoDBUtil; import software.amazon.awssdk.core.SdkRequest; import software.amazon.awssdk.core.SdkResponse; import software.amazon.awssdk.core.sync.ResponseTransformer; diff --git a/instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/instrumentation/security/dynamodb210/DynamoUtil.java b/instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/agent/security/instrumentation/dynamodb_210/DynamoUtil.java similarity index 97% rename from instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/instrumentation/security/dynamodb210/DynamoUtil.java rename to instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/agent/security/instrumentation/dynamodb_210/DynamoUtil.java index cc26993a2..a0a71dcb0 100644 --- a/instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/instrumentation/security/dynamodb210/DynamoUtil.java +++ b/instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/agent/security/instrumentation/dynamodb_210/DynamoUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.dynamodb210; +package com.nr.agent.security.instrumentation.dynamodb_210; import software.amazon.awssdk.services.dynamodb.model.AttributeDefinition; import software.amazon.awssdk.services.dynamodb.model.AttributeValue; diff --git a/instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/instrumentation/security/dynamodb210/DynamodbTest.java b/instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/agent/security/instrumentation/dynamodb_210/DynamodbTest.java similarity index 98% rename from instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/instrumentation/security/dynamodb210/DynamodbTest.java rename to instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/agent/security/instrumentation/dynamodb_210/DynamodbTest.java index e2d4b7f60..ae3cf914a 100644 --- a/instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/instrumentation/security/dynamodb210/DynamodbTest.java +++ b/instrumentation-security/dynamodb-2.1.0/src/test/java/com/nr/agent/security/instrumentation/dynamodb_210/DynamodbTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.dynamodb210; +package com.nr.agent.security.instrumentation.dynamodb_210; import com.amazonaws.services.dynamodbv2.local.main.ServerRunner; import com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer; @@ -22,13 +22,10 @@ import software.amazon.awssdk.services.dynamodb.DynamoDbClient; import software.amazon.awssdk.services.dynamodb.model.AttributeValue; import software.amazon.awssdk.services.dynamodb.model.AttributeValueUpdate; -import software.amazon.awssdk.services.dynamodb.model.BatchExecuteStatementRequest; import software.amazon.awssdk.services.dynamodb.model.BatchGetItemRequest; -import software.amazon.awssdk.services.dynamodb.model.BatchStatementRequest; import software.amazon.awssdk.services.dynamodb.model.BatchWriteItemRequest; import software.amazon.awssdk.services.dynamodb.model.DeleteItemRequest; import software.amazon.awssdk.services.dynamodb.model.DescribeTableRequest; -import software.amazon.awssdk.services.dynamodb.model.ExecuteStatementRequest; import software.amazon.awssdk.services.dynamodb.model.GetItemRequest; import software.amazon.awssdk.services.dynamodb.model.PutItemRequest; import software.amazon.awssdk.services.dynamodb.model.PutRequest; @@ -46,7 +43,7 @@ @FixMethodOrder(MethodSorters.NAME_ASCENDING) @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.nr.agent.security.dynamodb_210", "software.amazon.awssdk.core"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.dynamodb_210", "software.amazon.awssdk.core"}) public class DynamodbTest { private static final int PORT = DynamoUtil.getRandomPort(); private static DynamoDBProxyServer server; diff --git a/instrumentation-security/dynamodb-2.1.2/src/main/java/com/nr/agent/security/dynamodb_212/DynamoDBUtil.java b/instrumentation-security/dynamodb-2.1.2/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_212/DynamoDBUtil.java similarity index 99% rename from instrumentation-security/dynamodb-2.1.2/src/main/java/com/nr/agent/security/dynamodb_212/DynamoDBUtil.java rename to instrumentation-security/dynamodb-2.1.2/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_212/DynamoDBUtil.java index 1382dd1b1..35600235d 100644 --- a/instrumentation-security/dynamodb-2.1.2/src/main/java/com/nr/agent/security/dynamodb_212/DynamoDBUtil.java +++ b/instrumentation-security/dynamodb-2.1.2/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_212/DynamoDBUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.dynamodb_212; +package com.newrelic.agent.security.instrumentation.dynamodb_212; import com.newrelic.api.agent.DatastoreParameters; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/dynamodb-2.1.2/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java b/instrumentation-security/dynamodb-2.1.2/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java index c14562ce4..3110471c3 100644 --- a/instrumentation-security/dynamodb-2.1.2/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java +++ b/instrumentation-security/dynamodb-2.1.2/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_212.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_212.DynamoDBUtil; import software.amazon.awssdk.core.SdkRequest; import software.amazon.awssdk.core.SdkResponse; import software.amazon.awssdk.core.async.AsyncResponseTransformer; diff --git a/instrumentation-security/dynamodb-2.1.2/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java b/instrumentation-security/dynamodb-2.1.2/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java index 9d9cdcc4d..074d4e364 100644 --- a/instrumentation-security/dynamodb-2.1.2/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java +++ b/instrumentation-security/dynamodb-2.1.2/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_212.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_212.DynamoDBUtil; import software.amazon.awssdk.core.SdkRequest; import software.amazon.awssdk.core.SdkResponse; import software.amazon.awssdk.core.sync.ResponseTransformer; diff --git a/instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/instrumentation/security/dynamodb212/DynamoUtil.java b/instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/agent/security/instrumentation/dynamodb_212/DynamoUtil.java similarity index 97% rename from instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/instrumentation/security/dynamodb212/DynamoUtil.java rename to instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/agent/security/instrumentation/dynamodb_212/DynamoUtil.java index 82a7c25cc..1b8e2dde8 100644 --- a/instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/instrumentation/security/dynamodb212/DynamoUtil.java +++ b/instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/agent/security/instrumentation/dynamodb_212/DynamoUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.dynamodb212; +package com.nr.agent.security.instrumentation.dynamodb_212; import software.amazon.awssdk.services.dynamodb.model.AttributeDefinition; import software.amazon.awssdk.services.dynamodb.model.AttributeValue; diff --git a/instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/instrumentation/security/dynamodb212/DynamodbTest.java b/instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/agent/security/instrumentation/dynamodb_212/DynamodbTest.java similarity index 99% rename from instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/instrumentation/security/dynamodb212/DynamodbTest.java rename to instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/agent/security/instrumentation/dynamodb_212/DynamodbTest.java index e406e0736..ee7eb25f5 100644 --- a/instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/instrumentation/security/dynamodb212/DynamodbTest.java +++ b/instrumentation-security/dynamodb-2.1.2/src/test/java/com/nr/agent/security/instrumentation/dynamodb_212/DynamodbTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.dynamodb212; +package com.nr.agent.security.instrumentation.dynamodb_212; import com.amazonaws.services.dynamodbv2.local.main.ServerRunner; import com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer; @@ -50,7 +50,7 @@ @FixMethodOrder(MethodSorters.NAME_ASCENDING) @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.nr.agent.security.dynamodb_212", "software.amazon.awssdk.core"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.dynamodb_212", "software.amazon.awssdk.core"}) public class DynamodbTest { private static final int PORT = DynamoUtil.getRandomPort(); private static DynamoDBProxyServer server; diff --git a/instrumentation-security/dynamodb-2.15.34/src/main/java/com/nr/agent/security/dynamodb_215/DynamoDBUtil.java b/instrumentation-security/dynamodb-2.15.34/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_215/DynamoDBUtil.java similarity index 99% rename from instrumentation-security/dynamodb-2.15.34/src/main/java/com/nr/agent/security/dynamodb_215/DynamoDBUtil.java rename to instrumentation-security/dynamodb-2.15.34/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_215/DynamoDBUtil.java index 36d139821..f676de8d6 100644 --- a/instrumentation-security/dynamodb-2.15.34/src/main/java/com/nr/agent/security/dynamodb_215/DynamoDBUtil.java +++ b/instrumentation-security/dynamodb-2.15.34/src/main/java/com/newrelic/agent/security/instrumentation/dynamodb_215/DynamoDBUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.dynamodb_215; +package com.newrelic.agent.security.instrumentation.dynamodb_215; import com.newrelic.api.agent.DatastoreParameters; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/dynamodb-2.15.34/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java b/instrumentation-security/dynamodb-2.15.34/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java index 99d2623be..6d6843f89 100644 --- a/instrumentation-security/dynamodb-2.15.34/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java +++ b/instrumentation-security/dynamodb-2.15.34/src/main/java/software/amazon/awssdk/core/client/handler/AsyncClientHandler_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_215.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_215.DynamoDBUtil; import software.amazon.awssdk.core.SdkRequest; import software.amazon.awssdk.core.SdkResponse; import software.amazon.awssdk.core.async.AsyncResponseTransformer; diff --git a/instrumentation-security/dynamodb-2.15.34/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java b/instrumentation-security/dynamodb-2.15.34/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java index c6d441837..24f812967 100644 --- a/instrumentation-security/dynamodb-2.15.34/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java +++ b/instrumentation-security/dynamodb-2.15.34/src/main/java/software/amazon/awssdk/core/client/handler/SyncClientHandler_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.dynamodb_215.DynamoDBUtil; +import com.newrelic.agent.security.instrumentation.dynamodb_215.DynamoDBUtil; import software.amazon.awssdk.core.SdkRequest; import software.amazon.awssdk.core.SdkResponse; import software.amazon.awssdk.core.sync.ResponseTransformer; diff --git a/instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/instrumentation/security/dynamodb215/DynamoUtil.java b/instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/agent/security/instrumentation/dynamodb_215/DynamoUtil.java similarity index 97% rename from instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/instrumentation/security/dynamodb215/DynamoUtil.java rename to instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/agent/security/instrumentation/dynamodb_215/DynamoUtil.java index a4ea56e84..f082663c1 100644 --- a/instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/instrumentation/security/dynamodb215/DynamoUtil.java +++ b/instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/agent/security/instrumentation/dynamodb_215/DynamoUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.dynamodb215; +package com.nr.agent.security.instrumentation.dynamodb_215; import software.amazon.awssdk.services.dynamodb.model.AttributeDefinition; import software.amazon.awssdk.services.dynamodb.model.AttributeValue; diff --git a/instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/instrumentation/security/dynamodb215/DynamodbTest.java b/instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/agent/security/instrumentation/dynamodb_215/DynamodbTest.java similarity index 99% rename from instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/instrumentation/security/dynamodb215/DynamodbTest.java rename to instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/agent/security/instrumentation/dynamodb_215/DynamodbTest.java index e92c64b9b..3c58a81b1 100644 --- a/instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/instrumentation/security/dynamodb215/DynamodbTest.java +++ b/instrumentation-security/dynamodb-2.15.34/src/test/java/com/nr/agent/security/instrumentation/dynamodb_215/DynamodbTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.dynamodb215; +package com.nr.agent.security.instrumentation.dynamodb_215; import com.amazonaws.services.dynamodbv2.local.main.ServerRunner; import com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer; @@ -55,7 +55,7 @@ @FixMethodOrder(MethodSorters.NAME_ASCENDING) @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.nr.agent.security.dynamodb_215", "software.amazon.awssdk.core"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.dynamodb_215", "software.amazon.awssdk.core"}) public class DynamodbTest { private static final int PORT = DynamoUtil.getRandomPort(); private static DynamoDBProxyServer server; diff --git a/instrumentation-security/file-operation/src/main/java/java/io/File_Instrumentation.java b/instrumentation-security/file-operation/src/main/java/java/io/File_Instrumentation.java index 0e221a93d..8cc7e068b 100644 --- a/instrumentation-security/file-operation/src/main/java/java/io/File_Instrumentation.java +++ b/instrumentation-security/file-operation/src/main/java/java/io/File_Instrumentation.java @@ -1,9 +1,7 @@ package java.io; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.FileHelper; -import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.exceptions.NewRelicSecurityException; import com.newrelic.api.agent.security.schema.operation.FileOperation; @@ -14,9 +12,6 @@ import java.util.ArrayList; import java.util.List; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.BaseClass, originalName = "java.io.File") public abstract class File_Instrumentation { diff --git a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileInputStreamTest.java b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileInputStreamTest.java similarity index 98% rename from instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileInputStreamTest.java rename to instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileInputStreamTest.java index ebe41eb69..b163655fb 100644 --- a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileInputStreamTest.java +++ b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileInputStreamTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.javaio; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileOutputStreamTest.java b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileOutputStreamTest.java similarity index 97% rename from instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileOutputStreamTest.java rename to instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileOutputStreamTest.java index 2a47639fd..e7f9f8fec 100644 --- a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileOutputStreamTest.java +++ b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileOutputStreamTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.javaio; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileSystemTest.java b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileSystemTest.java similarity index 98% rename from instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileSystemTest.java rename to instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileSystemTest.java index 0b6058788..df689a492 100644 --- a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileSystemTest.java +++ b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileSystemTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.javaio; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileTest.java b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileTest.java similarity index 99% rename from instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileTest.java rename to instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileTest.java index d87d3e973..096799577 100644 --- a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/FileTest.java +++ b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/FileTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.javaio; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/TestSetupBringUp.java b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/TestSetupBringUp.java similarity index 95% rename from instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/TestSetupBringUp.java rename to instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/TestSetupBringUp.java index abcd911f9..98e43e533 100644 --- a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javaio/TestSetupBringUp.java +++ b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javaio/TestSetupBringUp.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.javaio; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javanio/FileSystemProviderTest.java b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javanio/FileSystemProviderTest.java similarity index 98% rename from instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javanio/FileSystemProviderTest.java rename to instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javanio/FileSystemProviderTest.java index ca73ee4a9..280230316 100644 --- a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javanio/FileSystemProviderTest.java +++ b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javanio/FileSystemProviderTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javanio; +package com.nr.agent.security.instrumentation.javanio; import com.fasterxml.jackson.databind.ObjectMapper; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; @@ -158,7 +158,7 @@ public void testNewFileChannel() throws IOException, URISyntaxException, Interru SecurityIntrospector introspector = SecurityInstrumentationTestRunner.getIntrospector(); List operations = introspector.getOperations(); Assert.assertTrue("No operations detected", operations.size() > 0); - System.out.println(operations.size()+" "+new ObjectMapper().writeValueAsString(operations)); + FileOperation operation = null; for (AbstractOperation op : operations) { if (FILE.equals(((FileOperation) op).getFileName().get(0))) { @@ -180,7 +180,7 @@ public void testNewAsynchronousFileChannel() throws IOException, URISyntaxExcept SecurityIntrospector introspector = SecurityInstrumentationTestRunner.getIntrospector(); List operations = introspector.getOperations(); Assert.assertTrue("No operations detected", operations.size() > 0); - System.out.println(operations.size()+" "+new ObjectMapper().writeValueAsString(operations)); + FileOperation operation = null; for (AbstractOperation op : operations) { if (FILE.equals(((FileOperation) op).getFileName().get(0))) { @@ -202,7 +202,7 @@ public void testNewByteFileChannel() throws IOException, URISyntaxException, Int SecurityIntrospector introspector = SecurityInstrumentationTestRunner.getIntrospector(); List operations = introspector.getOperations(); Assert.assertTrue("No operations detected", operations.size() > 0); - System.out.println(operations.size()+" "+new ObjectMapper().writeValueAsString(operations)); + FileOperation operation = null; for (AbstractOperation op : operations) { if (FILE.equals(((FileOperation) op).getFileName().get(0))) { diff --git a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javanio/TestSetupBringUp.java b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javanio/TestSetupBringUp.java similarity index 96% rename from instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javanio/TestSetupBringUp.java rename to instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javanio/TestSetupBringUp.java index 92497853b..225bb6d18 100644 --- a/instrumentation-security/file-operation/src/test/java/com/nr/instrumentation/security/javanio/TestSetupBringUp.java +++ b/instrumentation-security/file-operation/src/test/java/com/nr/agent/security/instrumentation/javanio/TestSetupBringUp.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javanio; +package com.nr.agent.security.instrumentation.javanio; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/nr/agent/security/mongo/jsinjection/graalvm/JSEngineUtils.java b/instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/newrelic/agent/security/instrumentation/graalvm19/JSEngineUtils.java similarity index 79% rename from instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/nr/agent/security/mongo/jsinjection/graalvm/JSEngineUtils.java rename to instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/newrelic/agent/security/instrumentation/graalvm19/JSEngineUtils.java index 2f49208b3..f41ae2893 100644 --- a/instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/nr/agent/security/mongo/jsinjection/graalvm/JSEngineUtils.java +++ b/instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/newrelic/agent/security/instrumentation/graalvm19/JSEngineUtils.java @@ -1,4 +1,4 @@ -package com.nr.agent.security.mongo.jsinjection.graalvm; +package com.newrelic.agent.security.instrumentation.graalvm19; public class JSEngineUtils { diff --git a/instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/oracle/truffle/polyglot/PolyglotContextImpl_Instrumentation.java b/instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/oracle/truffle/polyglot/PolyglotContextImpl_Instrumentation.java index af205db3c..c2e08ad3b 100644 --- a/instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/oracle/truffle/polyglot/PolyglotContextImpl_Instrumentation.java +++ b/instrumentation-security/graalvm-jsinjection-19.0.0/src/main/java/com/oracle/truffle/polyglot/PolyglotContextImpl_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.jsinjection.graalvm.JSEngineUtils; +import com.newrelic.agent.security.instrumentation.graalvm19.JSEngineUtils; import com.oracle.truffle.api.source.Source; import org.graalvm.polyglot.Value; diff --git a/instrumentation-security/graalvm-jsinjection-19.0.0/src/test/java/com/nr/agent/instrumentation/graalvm19/GraalVMTest.java b/instrumentation-security/graalvm-jsinjection-19.0.0/src/test/java/com/nr/agent/security/instrumentation/graalvm19/GraalVMTest.java similarity index 98% rename from instrumentation-security/graalvm-jsinjection-19.0.0/src/test/java/com/nr/agent/instrumentation/graalvm19/GraalVMTest.java rename to instrumentation-security/graalvm-jsinjection-19.0.0/src/test/java/com/nr/agent/security/instrumentation/graalvm19/GraalVMTest.java index 3c5e900a8..c15be5b9d 100644 --- a/instrumentation-security/graalvm-jsinjection-19.0.0/src/test/java/com/nr/agent/instrumentation/graalvm19/GraalVMTest.java +++ b/instrumentation-security/graalvm-jsinjection-19.0.0/src/test/java/com/nr/agent/security/instrumentation/graalvm19/GraalVMTest.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.graalvm19; +package com.nr.agent.security.instrumentation.graalvm19; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/nr/agent/security/mongo/jsinjection/graalvm/JSEngineUtils.java b/instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/newrelic/agent/security/instrumentation/graalvm22/JSEngineUtils.java similarity index 79% rename from instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/nr/agent/security/mongo/jsinjection/graalvm/JSEngineUtils.java rename to instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/newrelic/agent/security/instrumentation/graalvm22/JSEngineUtils.java index ec59162ac..07142efe0 100644 --- a/instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/nr/agent/security/mongo/jsinjection/graalvm/JSEngineUtils.java +++ b/instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/newrelic/agent/security/instrumentation/graalvm22/JSEngineUtils.java @@ -1,4 +1,4 @@ -package com.nr.agent.security.mongo.jsinjection.graalvm; +package com.newrelic.agent.security.instrumentation.graalvm22; public class JSEngineUtils { diff --git a/instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/oracle/truffle/polyglot/PolyglotContextImpl_Instrumentation.java b/instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/oracle/truffle/polyglot/PolyglotContextImpl_Instrumentation.java index d3fa9e571..410a14296 100644 --- a/instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/oracle/truffle/polyglot/PolyglotContextImpl_Instrumentation.java +++ b/instrumentation-security/graalvm-jsinjection-22.0.0/src/main/java/com/oracle/truffle/polyglot/PolyglotContextImpl_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.jsinjection.graalvm.JSEngineUtils; +import com.newrelic.agent.security.instrumentation.graalvm22.JSEngineUtils; import org.graalvm.polyglot.Source; import org.graalvm.polyglot.Value; diff --git a/instrumentation-security/graalvm-jsinjection-22.0.0/src/test/java/com/nr/agent/instrumentation/graalvm22/GraalVMTest.java b/instrumentation-security/graalvm-jsinjection-22.0.0/src/test/java/com/nr/agent/security/instrumentation/graalvm22/GraalVMTest.java similarity index 98% rename from instrumentation-security/graalvm-jsinjection-22.0.0/src/test/java/com/nr/agent/instrumentation/graalvm22/GraalVMTest.java rename to instrumentation-security/graalvm-jsinjection-22.0.0/src/test/java/com/nr/agent/security/instrumentation/graalvm22/GraalVMTest.java index a74ca7070..fa1504f14 100644 --- a/instrumentation-security/graalvm-jsinjection-22.0.0/src/test/java/com/nr/agent/instrumentation/graalvm22/GraalVMTest.java +++ b/instrumentation-security/graalvm-jsinjection-22.0.0/src/test/java/com/nr/agent/security/instrumentation/graalvm22/GraalVMTest.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.graalvm22; +package com.nr.agent.security.instrumentation.graalvm22; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/http-async-client-4/src/main/java/com/nr/agent/instrumentation/security/httpasyncclient4/HttpAsyncClient4_Instrumentation.java b/instrumentation-security/http-async-client-4/src/main/java/com/newrelic/agent/security/instrumentation/httpasyncclient4/HttpAsyncClient4_Instrumentation.java similarity index 99% rename from instrumentation-security/http-async-client-4/src/main/java/com/nr/agent/instrumentation/security/httpasyncclient4/HttpAsyncClient4_Instrumentation.java rename to instrumentation-security/http-async-client-4/src/main/java/com/newrelic/agent/security/instrumentation/httpasyncclient4/HttpAsyncClient4_Instrumentation.java index d8a84d242..72e94f1e8 100644 --- a/instrumentation-security/http-async-client-4/src/main/java/com/nr/agent/instrumentation/security/httpasyncclient4/HttpAsyncClient4_Instrumentation.java +++ b/instrumentation-security/http-async-client-4/src/main/java/com/newrelic/agent/security/instrumentation/httpasyncclient4/HttpAsyncClient4_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.security.httpasyncclient4; +package com.newrelic.agent.security.instrumentation.httpasyncclient4; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; diff --git a/instrumentation-security/http-async-client-4/src/main/java/com/nr/agent/instrumentation/security/httpasyncclient4/HttpPipeliningClient_Instrumentation.java b/instrumentation-security/http-async-client-4/src/main/java/com/newrelic/agent/security/instrumentation/httpasyncclient4/HttpPipeliningClient_Instrumentation.java similarity index 94% rename from instrumentation-security/http-async-client-4/src/main/java/com/nr/agent/instrumentation/security/httpasyncclient4/HttpPipeliningClient_Instrumentation.java rename to instrumentation-security/http-async-client-4/src/main/java/com/newrelic/agent/security/instrumentation/httpasyncclient4/HttpPipeliningClient_Instrumentation.java index c2804244c..f5d1adb17 100644 --- a/instrumentation-security/http-async-client-4/src/main/java/com/nr/agent/instrumentation/security/httpasyncclient4/HttpPipeliningClient_Instrumentation.java +++ b/instrumentation-security/http-async-client-4/src/main/java/com/newrelic/agent/security/instrumentation/httpasyncclient4/HttpPipeliningClient_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.security.httpasyncclient4; +package com.newrelic.agent.security.instrumentation.httpasyncclient4; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; diff --git a/instrumentation-security/http-async-client-4/src/main/java/com/nr/agent/instrumentation/security/httpasyncclient4/SecurityHelper.java b/instrumentation-security/http-async-client-4/src/main/java/com/newrelic/agent/security/instrumentation/httpasyncclient4/SecurityHelper.java similarity index 73% rename from instrumentation-security/http-async-client-4/src/main/java/com/nr/agent/instrumentation/security/httpasyncclient4/SecurityHelper.java rename to instrumentation-security/http-async-client-4/src/main/java/com/newrelic/agent/security/instrumentation/httpasyncclient4/SecurityHelper.java index 0593c731d..4b387a30e 100644 --- a/instrumentation-security/http-async-client-4/src/main/java/com/nr/agent/instrumentation/security/httpasyncclient4/SecurityHelper.java +++ b/instrumentation-security/http-async-client-4/src/main/java/com/newrelic/agent/security/instrumentation/httpasyncclient4/SecurityHelper.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.security.httpasyncclient4; +package com.newrelic.agent.security.instrumentation.httpasyncclient4; public class SecurityHelper { public static final String METHOD_NAME_EXECUTE = "execute"; diff --git a/instrumentation-security/http-async-client-4/src/test/java/com/nr/instrumentation/security/httpAsyncClient/HttpAsyncClient4Test.java b/instrumentation-security/http-async-client-4/src/test/java/com/nr/agent/security/instrumentation/httpasyncclient4/HttpAsyncClient4Test.java similarity index 98% rename from instrumentation-security/http-async-client-4/src/test/java/com/nr/instrumentation/security/httpAsyncClient/HttpAsyncClient4Test.java rename to instrumentation-security/http-async-client-4/src/test/java/com/nr/agent/security/instrumentation/httpasyncclient4/HttpAsyncClient4Test.java index 9acf5ecb4..e51d301da 100644 --- a/instrumentation-security/http-async-client-4/src/test/java/com/nr/instrumentation/security/httpAsyncClient/HttpAsyncClient4Test.java +++ b/instrumentation-security/http-async-client-4/src/test/java/com/nr/agent/security/instrumentation/httpasyncclient4/HttpAsyncClient4Test.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.httpAsyncClient; +package com.nr.agent.security.instrumentation.httpasyncclient4; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -28,7 +28,7 @@ import java.util.concurrent.Future; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "com.nr.agent.instrumentation.security.httpasyncclient4") +@InstrumentationTestConfig(includePrefixes = "com.newrelic.agent.security.instrumentation.httpasyncclient4") public class HttpAsyncClient4Test { @ClassRule public static HttpServerRule server = new HttpServerRule(); diff --git a/instrumentation-security/httpclient-3/src/main/java/com/nr/agent/instrumentation/security/httpclient3/HttpMethodBase_Instrumentation.java b/instrumentation-security/httpclient-3/src/main/java/com/newrelic/agent/security/instrumentation/httpclient3/HttpMethodBase_Instrumentation.java similarity index 98% rename from instrumentation-security/httpclient-3/src/main/java/com/nr/agent/instrumentation/security/httpclient3/HttpMethodBase_Instrumentation.java rename to instrumentation-security/httpclient-3/src/main/java/com/newrelic/agent/security/instrumentation/httpclient3/HttpMethodBase_Instrumentation.java index 051286999..0bcb77c87 100644 --- a/instrumentation-security/httpclient-3/src/main/java/com/nr/agent/instrumentation/security/httpclient3/HttpMethodBase_Instrumentation.java +++ b/instrumentation-security/httpclient-3/src/main/java/com/newrelic/agent/security/instrumentation/httpclient3/HttpMethodBase_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.security.httpclient3; +package com.newrelic.agent.security.instrumentation.httpclient3; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; diff --git a/instrumentation-security/httpclient-3/src/main/java/com/nr/agent/instrumentation/security/httpclient3/SecurityHelper.java b/instrumentation-security/httpclient-3/src/main/java/com/newrelic/agent/security/instrumentation/httpclient3/SecurityHelper.java similarity index 94% rename from instrumentation-security/httpclient-3/src/main/java/com/nr/agent/instrumentation/security/httpclient3/SecurityHelper.java rename to instrumentation-security/httpclient-3/src/main/java/com/newrelic/agent/security/instrumentation/httpclient3/SecurityHelper.java index 942a99abd..e68dc9141 100644 --- a/instrumentation-security/httpclient-3/src/main/java/com/nr/agent/instrumentation/security/httpclient3/SecurityHelper.java +++ b/instrumentation-security/httpclient-3/src/main/java/com/newrelic/agent/security/instrumentation/httpclient3/SecurityHelper.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.security.httpclient3; +package com.newrelic.agent.security.instrumentation.httpclient3; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; diff --git a/instrumentation-security/httpclient-3/src/test/java/com/nr/instrumentation/security/httpclient3/HttpClientTest.java b/instrumentation-security/httpclient-3/src/test/java/com/nr/agent/security/instrumentation/httpclient3/HttpClientTest.java similarity index 97% rename from instrumentation-security/httpclient-3/src/test/java/com/nr/instrumentation/security/httpclient3/HttpClientTest.java rename to instrumentation-security/httpclient-3/src/test/java/com/nr/agent/security/instrumentation/httpclient3/HttpClientTest.java index feb2d5d16..b52d203dd 100644 --- a/instrumentation-security/httpclient-3/src/test/java/com/nr/instrumentation/security/httpclient3/HttpClientTest.java +++ b/instrumentation-security/httpclient-3/src/test/java/com/nr/agent/security/instrumentation/httpclient3/HttpClientTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.httpclient3; +package com.nr.agent.security.instrumentation.httpclient3; import com.newrelic.agent.security.introspec.HttpTestServer; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; @@ -25,7 +25,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "com.nr.agent.instrumentation.security.httpclient3") +@InstrumentationTestConfig(includePrefixes = "com.newrelic.agent.security.instrumentation.httpclient3") public class HttpClientTest { @Rule public HttpServerRule server = new HttpServerRule(); diff --git a/instrumentation-security/httpclient-4.0/src/main/java/com/nr/agent/instrumentation/security/httpclient40/HttpClient_Instrumentation.java b/instrumentation-security/httpclient-4.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient40/HttpClient_Instrumentation.java similarity index 99% rename from instrumentation-security/httpclient-4.0/src/main/java/com/nr/agent/instrumentation/security/httpclient40/HttpClient_Instrumentation.java rename to instrumentation-security/httpclient-4.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient40/HttpClient_Instrumentation.java index e76201de5..ab0728901 100644 --- a/instrumentation-security/httpclient-4.0/src/main/java/com/nr/agent/instrumentation/security/httpclient40/HttpClient_Instrumentation.java +++ b/instrumentation-security/httpclient-4.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient40/HttpClient_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.security.httpclient40; +package com.newrelic.agent.security.instrumentation.httpclient40; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; diff --git a/instrumentation-security/httpclient-4.0/src/main/java/com/nr/agent/instrumentation/security/httpclient40/SecurityHelper.java b/instrumentation-security/httpclient-4.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient40/SecurityHelper.java similarity index 91% rename from instrumentation-security/httpclient-4.0/src/main/java/com/nr/agent/instrumentation/security/httpclient40/SecurityHelper.java rename to instrumentation-security/httpclient-4.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient40/SecurityHelper.java index 60ad46bcd..16ca3906d 100644 --- a/instrumentation-security/httpclient-4.0/src/main/java/com/nr/agent/instrumentation/security/httpclient40/SecurityHelper.java +++ b/instrumentation-security/httpclient-4.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient40/SecurityHelper.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.security.httpclient40; +package com.newrelic.agent.security.instrumentation.httpclient40; public class SecurityHelper { diff --git a/instrumentation-security/httpclient-4.0/src/test/java/com/nr/instrumentation/security/httpclient4/HttpClientTest.java b/instrumentation-security/httpclient-4.0/src/test/java/com/nr/agent/security/instrumentation/httpclient40/HttpClientTest.java similarity index 99% rename from instrumentation-security/httpclient-4.0/src/test/java/com/nr/instrumentation/security/httpclient4/HttpClientTest.java rename to instrumentation-security/httpclient-4.0/src/test/java/com/nr/agent/security/instrumentation/httpclient40/HttpClientTest.java index 813bd169f..116d224ce 100644 --- a/instrumentation-security/httpclient-4.0/src/test/java/com/nr/instrumentation/security/httpclient4/HttpClientTest.java +++ b/instrumentation-security/httpclient-4.0/src/test/java/com/nr/agent/security/instrumentation/httpclient40/HttpClientTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.httpclient4; +package com.nr.agent.security.instrumentation.httpclient40; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -29,7 +29,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "com.nr.agent.instrumentation.security.httpclient40") +@InstrumentationTestConfig(includePrefixes = "com.newrelic.agent.security.instrumentation.httpclient40") public class HttpClientTest { @ClassRule public static HttpServerRule server = new HttpServerRule(); diff --git a/instrumentation-security/httpclient-jdk11/src/main/java/nr/security/java/net/http/helper/SecurityHelper.java b/instrumentation-security/httpclient-jdk11/src/main/java/com/newrelic/agent/security/instrumentation/helper/SecurityHelper.java similarity index 75% rename from instrumentation-security/httpclient-jdk11/src/main/java/nr/security/java/net/http/helper/SecurityHelper.java rename to instrumentation-security/httpclient-jdk11/src/main/java/com/newrelic/agent/security/instrumentation/helper/SecurityHelper.java index bab592143..4e0ebc711 100644 --- a/instrumentation-security/httpclient-jdk11/src/main/java/nr/security/java/net/http/helper/SecurityHelper.java +++ b/instrumentation-security/httpclient-jdk11/src/main/java/com/newrelic/agent/security/instrumentation/helper/SecurityHelper.java @@ -1,4 +1,4 @@ -package nr.security.java.net.http.helper; +package com.newrelic.agent.security.instrumentation.helper; public class SecurityHelper { public static final String METHOD_NAME_SEND = "sendAsync"; diff --git a/instrumentation-security/httpclient-jdk11/src/main/java/nr/jdk/internal/net/http/HttpClientImpl_Instrumentation.java b/instrumentation-security/httpclient-jdk11/src/main/java/com/newrelic/agent/security/instrumentation/http/HttpClientImpl_Instrumentation.java similarity index 97% rename from instrumentation-security/httpclient-jdk11/src/main/java/nr/jdk/internal/net/http/HttpClientImpl_Instrumentation.java rename to instrumentation-security/httpclient-jdk11/src/main/java/com/newrelic/agent/security/instrumentation/http/HttpClientImpl_Instrumentation.java index bcf3932d0..60504c931 100644 --- a/instrumentation-security/httpclient-jdk11/src/main/java/nr/jdk/internal/net/http/HttpClientImpl_Instrumentation.java +++ b/instrumentation-security/httpclient-jdk11/src/main/java/com/newrelic/agent/security/instrumentation/http/HttpClientImpl_Instrumentation.java @@ -1,5 +1,6 @@ -package nr.jdk.internal.net.http; +package com.newrelic.agent.security.instrumentation.http; +import com.newrelic.agent.security.instrumentation.helper.SecurityHelper; import com.newrelic.api.agent.Trace; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; @@ -13,7 +14,6 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import nr.security.java.net.http.helper.SecurityHelper; import java.net.http.HttpRequest; import java.net.http.HttpResponse; diff --git a/instrumentation-security/httpclient-jdk11/src/main/java/nr/java/net/http/HttpRequest_Instrumentation.java b/instrumentation-security/httpclient-jdk11/src/main/java/com/newrelic/agent/security/instrumentation/http/HttpRequest_Instrumentation.java similarity index 85% rename from instrumentation-security/httpclient-jdk11/src/main/java/nr/java/net/http/HttpRequest_Instrumentation.java rename to instrumentation-security/httpclient-jdk11/src/main/java/com/newrelic/agent/security/instrumentation/http/HttpRequest_Instrumentation.java index 3ce582882..0f683c9b8 100644 --- a/instrumentation-security/httpclient-jdk11/src/main/java/nr/java/net/http/HttpRequest_Instrumentation.java +++ b/instrumentation-security/httpclient-jdk11/src/main/java/com/newrelic/agent/security/instrumentation/http/HttpRequest_Instrumentation.java @@ -1,10 +1,10 @@ -package nr.java.net.http; +package com.newrelic.agent.security.instrumentation.http; +import com.newrelic.agent.security.instrumentation.helper.SecurityHelper; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import nr.security.java.net.http.helper.SecurityHelper; import java.net.http.HttpRequest; diff --git a/instrumentation-security/httpclient-jdk11/src/test/java/com/nr/instrumentation/security/httpclientJDK11/HttpClientTest.java b/instrumentation-security/httpclient-jdk11/src/test/java/com/nr/agent/security/instrumentation/httpclientJDK11/HttpClientTest.java similarity index 97% rename from instrumentation-security/httpclient-jdk11/src/test/java/com/nr/instrumentation/security/httpclientJDK11/HttpClientTest.java rename to instrumentation-security/httpclient-jdk11/src/test/java/com/nr/agent/security/instrumentation/httpclientJDK11/HttpClientTest.java index 181622434..a9eee6ba5 100644 --- a/instrumentation-security/httpclient-jdk11/src/test/java/com/nr/instrumentation/security/httpclientJDK11/HttpClientTest.java +++ b/instrumentation-security/httpclient-jdk11/src/test/java/com/nr/agent/security/instrumentation/httpclientJDK11/HttpClientTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.httpclientJDK11; +package com.nr.agent.security.instrumentation.httpclientJDK11; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -28,7 +28,7 @@ @Category({ Java8IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "nr.java.net.http", "nr.jdk.internal.net.http", "nr.security.java.net.http.helper" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.agent.security.instrumentation.http", "com.newrelic.agent.security.instrumentation.helper" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class HttpClientTest { diff --git a/instrumentation-security/java-io-inputstream-jdk8/src/main/java/com/nr/instrumentation/security/javaio/InputStreamHelper.java b/instrumentation-security/java-io-inputstream-jdk8/src/main/java/com/newrelic/agent/security/instrumentation/javaio/InputStreamHelper.java similarity index 93% rename from instrumentation-security/java-io-inputstream-jdk8/src/main/java/com/nr/instrumentation/security/javaio/InputStreamHelper.java rename to instrumentation-security/java-io-inputstream-jdk8/src/main/java/com/newrelic/agent/security/instrumentation/javaio/InputStreamHelper.java index 18ee99c33..396466e06 100644 --- a/instrumentation-security/java-io-inputstream-jdk8/src/main/java/com/nr/instrumentation/security/javaio/InputStreamHelper.java +++ b/instrumentation-security/java-io-inputstream-jdk8/src/main/java/com/newrelic/agent/security/instrumentation/javaio/InputStreamHelper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.newrelic.agent.security.instrumentation.javaio; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/java-io-inputstream-jdk8/src/main/java/java/io/InputStream_Instrumentation.java b/instrumentation-security/java-io-inputstream-jdk8/src/main/java/java/io/InputStream_Instrumentation.java index 7c943fb56..fd61a2aa1 100644 --- a/instrumentation-security/java-io-inputstream-jdk8/src/main/java/java/io/InputStream_Instrumentation.java +++ b/instrumentation-security/java-io-inputstream-jdk8/src/main/java/java/io/InputStream_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.weaver.*; -import com.nr.instrumentation.security.javaio.InputStreamHelper; +import com.newrelic.agent.security.instrumentation.javaio.InputStreamHelper; @Weave(type = MatchType.BaseClass, originalName = "java.io.InputStream") public abstract class InputStream_Instrumentation { diff --git a/instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/instrumentation/security/inputstream/InputStreamJdk8Test.java b/instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/agent/security/instrumentation/javaio/InputStreamJdk8Test.java similarity index 98% rename from instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/instrumentation/security/inputstream/InputStreamJdk8Test.java rename to instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/agent/security/instrumentation/javaio/InputStreamJdk8Test.java index cc45448aa..3dacd2124 100644 --- a/instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/instrumentation/security/inputstream/InputStreamJdk8Test.java +++ b/instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/agent/security/instrumentation/javaio/InputStreamJdk8Test.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.inputstream; +package com.nr.agent.security.instrumentation.javaio; import com.fasterxml.jackson.core.JsonProcessingException; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; @@ -29,7 +29,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"java.io","com.nr.instrumentation.security.javaio"}) +@InstrumentationTestConfig(includePrefixes = {"java.io","com.newrelic.agent.security.instrumentation.javaio"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class InputStreamJdk8Test { private static String FILE; diff --git a/instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/instrumentation/security/inputstream/TestSetupBringUp.java b/instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/agent/security/instrumentation/javaio/TestSetupBringUp.java similarity index 91% rename from instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/instrumentation/security/inputstream/TestSetupBringUp.java rename to instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/agent/security/instrumentation/javaio/TestSetupBringUp.java index d4eb9da47..a26d642b1 100644 --- a/instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/instrumentation/security/inputstream/TestSetupBringUp.java +++ b/instrumentation-security/java-io-inputstream-jdk8/src/test/java/com/nr/agent/security/instrumentation/javaio/TestSetupBringUp.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.inputstream; +package com.nr.agent.security.instrumentation.javaio; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/nr/instrumentation/security/javaio/InputStreamHelper.java b/instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/newrelic/agent/security/instrumentation/javaio/InputStreamHelper.java similarity index 93% rename from instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/nr/instrumentation/security/javaio/InputStreamHelper.java rename to instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/newrelic/agent/security/instrumentation/javaio/InputStreamHelper.java index 18ee99c33..396466e06 100644 --- a/instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/nr/instrumentation/security/javaio/InputStreamHelper.java +++ b/instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/newrelic/agent/security/instrumentation/javaio/InputStreamHelper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.newrelic.agent.security.instrumentation.javaio; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/java-io-inputstream-jdk9/src/main/java/nr/java/io/InputStream_Instrumentation.java b/instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/newrelic/agent/security/instrumentation/javaio/io/InputStream_Instrumentation.java similarity index 97% rename from instrumentation-security/java-io-inputstream-jdk9/src/main/java/nr/java/io/InputStream_Instrumentation.java rename to instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/newrelic/agent/security/instrumentation/javaio/io/InputStream_Instrumentation.java index 38de8dc6d..6392adcea 100644 --- a/instrumentation-security/java-io-inputstream-jdk9/src/main/java/nr/java/io/InputStream_Instrumentation.java +++ b/instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/newrelic/agent/security/instrumentation/javaio/io/InputStream_Instrumentation.java @@ -5,11 +5,11 @@ * */ -package nr.java.io; +package com.newrelic.agent.security.instrumentation.javaio.io; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.weaver.*; -import com.nr.instrumentation.security.javaio.InputStreamHelper; +import com.newrelic.agent.security.instrumentation.javaio.InputStreamHelper; import java.io.IOException; @Weave(type = MatchType.BaseClass, originalName = "java.io.InputStream") diff --git a/instrumentation-security/java-io-inputstream-jdk9/src/main/java/nr/java/lang/ProcessHandle_Instrumentation.java b/instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/newrelic/agent/security/instrumentation/javaio/lang/ProcessHandle_Instrumentation.java similarity index 77% rename from instrumentation-security/java-io-inputstream-jdk9/src/main/java/nr/java/lang/ProcessHandle_Instrumentation.java rename to instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/newrelic/agent/security/instrumentation/javaio/lang/ProcessHandle_Instrumentation.java index ad79a58f1..e9cdb6482 100644 --- a/instrumentation-security/java-io-inputstream-jdk9/src/main/java/nr/java/lang/ProcessHandle_Instrumentation.java +++ b/instrumentation-security/java-io-inputstream-jdk9/src/main/java/com/newrelic/agent/security/instrumentation/javaio/lang/ProcessHandle_Instrumentation.java @@ -1,4 +1,4 @@ -package nr.java.lang; +package com.newrelic.agent.security.instrumentation.javaio.lang; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; diff --git a/instrumentation-security/java-io-inputstream-jdk9/src/test/java/com/nr/instrumentation/security/inputstream/jdk9/InputStreamJdk9Test.java b/instrumentation-security/java-io-inputstream-jdk9/src/test/java/com/nr/instrumentation/security/inputstream/jdk9/InputStreamJdk9Test.java index ffb81ab27..8b45fda3e 100644 --- a/instrumentation-security/java-io-inputstream-jdk9/src/test/java/com/nr/instrumentation/security/inputstream/jdk9/InputStreamJdk9Test.java +++ b/instrumentation-security/java-io-inputstream-jdk9/src/test/java/com/nr/instrumentation/security/inputstream/jdk9/InputStreamJdk9Test.java @@ -32,7 +32,7 @@ @Category({ Java8IncompatibleTest.class, Java11IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"nr.java.io","com.nr.instrumentation.security.javaio"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.javaio.io","com.newrelic.agent.security.instrumentation.javaio"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class InputStreamJdk9Test { private static String FILE; diff --git a/instrumentation-security/java-io-stream/src/main/java/com/nr/instrumentation/security/javaio/IOStreamHelper.java b/instrumentation-security/java-io-stream/src/main/java/com/newrelic/agent/security/instrumentation/inputstream/IOStreamHelper.java similarity index 97% rename from instrumentation-security/java-io-stream/src/main/java/com/nr/instrumentation/security/javaio/IOStreamHelper.java rename to instrumentation-security/java-io-stream/src/main/java/com/newrelic/agent/security/instrumentation/inputstream/IOStreamHelper.java index bf1e549bb..01e767f9b 100644 --- a/instrumentation-security/java-io-stream/src/main/java/com/nr/instrumentation/security/javaio/IOStreamHelper.java +++ b/instrumentation-security/java-io-stream/src/main/java/com/newrelic/agent/security/instrumentation/inputstream/IOStreamHelper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.newrelic.agent.security.instrumentation.inputstream; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; diff --git a/instrumentation-security/java-io-stream/src/main/java/java/io/BufferedReader_Instrumentation.java b/instrumentation-security/java-io-stream/src/main/java/java/io/BufferedReader_Instrumentation.java index 703a72e17..06280fc79 100644 --- a/instrumentation-security/java-io-stream/src/main/java/java/io/BufferedReader_Instrumentation.java +++ b/instrumentation-security/java-io-stream/src/main/java/java/io/BufferedReader_Instrumentation.java @@ -13,7 +13,7 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.WeaveAllConstructors; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.javaio.IOStreamHelper; +import com.newrelic.agent.security.instrumentation.inputstream.IOStreamHelper; @Weave(type = MatchType.BaseClass, originalName = "java.io.BufferedReader") public abstract class BufferedReader_Instrumentation { diff --git a/instrumentation-security/java-io-stream/src/main/java/java/io/OutputStream_Instrumentation.java b/instrumentation-security/java-io-stream/src/main/java/java/io/OutputStream_Instrumentation.java index 234b0b206..74f7be6f1 100644 --- a/instrumentation-security/java-io-stream/src/main/java/java/io/OutputStream_Instrumentation.java +++ b/instrumentation-security/java-io-stream/src/main/java/java/io/OutputStream_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.javaio.IOStreamHelper; +import com.newrelic.agent.security.instrumentation.inputstream.IOStreamHelper; @Weave(type = MatchType.BaseClass, originalName = "java.io.OutputStream") public abstract class OutputStream_Instrumentation { diff --git a/instrumentation-security/java-io-stream/src/main/java/java/io/PrintWriter_Instrumentation.java b/instrumentation-security/java-io-stream/src/main/java/java/io/PrintWriter_Instrumentation.java index 76fdc7e14..ed9316057 100644 --- a/instrumentation-security/java-io-stream/src/main/java/java/io/PrintWriter_Instrumentation.java +++ b/instrumentation-security/java-io-stream/src/main/java/java/io/PrintWriter_Instrumentation.java @@ -10,7 +10,7 @@ import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.weaver.*; -import com.nr.instrumentation.security.javaio.IOStreamHelper; +import com.newrelic.agent.security.instrumentation.inputstream.IOStreamHelper; import java.util.Locale; diff --git a/instrumentation-security/java-io-stream/src/main/java/java/io/Reader_Instrumentation.java b/instrumentation-security/java-io-stream/src/main/java/java/io/Reader_Instrumentation.java index dc70a6eab..763f1c023 100644 --- a/instrumentation-security/java-io-stream/src/main/java/java/io/Reader_Instrumentation.java +++ b/instrumentation-security/java-io-stream/src/main/java/java/io/Reader_Instrumentation.java @@ -12,7 +12,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.javaio.IOStreamHelper; +import com.newrelic.agent.security.instrumentation.inputstream.IOStreamHelper; @Weave(type = MatchType.BaseClass, originalName = "java.io.Reader") public abstract class Reader_Instrumentation { diff --git a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/BufferedReaderTest.java b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/BufferedReaderTest.java similarity index 98% rename from instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/BufferedReaderTest.java rename to instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/BufferedReaderTest.java index 7ea1f83fd..85d995bb4 100644 --- a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/BufferedReaderTest.java +++ b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/BufferedReaderTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.inputstream; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -24,7 +24,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "java.io", "com.nr.instrumentation.security.javaio"}) +@InstrumentationTestConfig(includePrefixes = { "java.io", "com.newrelic.agent.security.instrumentation.inputstream"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class BufferedReaderTest { private static String FILE; diff --git a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/OutputStreamTest.java b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/OutputStreamTest.java similarity index 97% rename from instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/OutputStreamTest.java rename to instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/OutputStreamTest.java index a0175b596..486b24fed 100644 --- a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/OutputStreamTest.java +++ b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/OutputStreamTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.inputstream; import com.fasterxml.jackson.core.JsonProcessingException; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; @@ -23,7 +23,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "java.io", "com.nr.instrumentation.security.javaio"}) +@InstrumentationTestConfig(includePrefixes = { "java.io", "com.newrelic.agent.security.instrumentation.inputstream"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class OutputStreamTest { private static String FILE; diff --git a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/PrintWriterTest.java b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/PrintWriterTest.java similarity index 99% rename from instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/PrintWriterTest.java rename to instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/PrintWriterTest.java index ae8d60554..86a2c7e9a 100644 --- a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/PrintWriterTest.java +++ b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/PrintWriterTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.inputstream; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -21,7 +21,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "java.io", "com.nr.instrumentation.security.javaio"}) +@InstrumentationTestConfig(includePrefixes = { "java.io", "com.newrelic.agent.security.instrumentation.inputstream"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class PrintWriterTest { private static String FILE; diff --git a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/ReaderTest.java b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/ReaderTest.java similarity index 98% rename from instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/ReaderTest.java rename to instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/ReaderTest.java index 7c10017ed..bacdc00f9 100644 --- a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/ReaderTest.java +++ b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/ReaderTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.inputstream; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -28,7 +28,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "java.io", "com.nr.instrumentation.security.javaio"}) +@InstrumentationTestConfig(includePrefixes = { "java.io", "com.newrelic.agent.security.instrumentation.inputstream"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ReaderTest { private static String FILE; diff --git a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/TestSetupBringUp.java b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/TestSetupBringUp.java similarity index 90% rename from instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/TestSetupBringUp.java rename to instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/TestSetupBringUp.java index bf4bf4c10..debe2b1af 100644 --- a/instrumentation-security/java-io-stream/src/test/java/com/nr/instrumentation/security/javaio/TestSetupBringUp.java +++ b/instrumentation-security/java-io-stream/src/test/java/com/nr/agent/security/instrumentation/inputstream/TestSetupBringUp.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javaio; +package com.nr.agent.security.instrumentation.inputstream; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/java-lang/src/test/java/com/nr/instrumentation/java/lang/ProcessImplTest.java b/instrumentation-security/java-lang/src/test/java/com/nr/agent/security/instrumentation/java/lang/ProcessImplTest.java similarity index 98% rename from instrumentation-security/java-lang/src/test/java/com/nr/instrumentation/java/lang/ProcessImplTest.java rename to instrumentation-security/java-lang/src/test/java/com/nr/agent/security/instrumentation/java/lang/ProcessImplTest.java index 1a2d3ab89..28a81f395 100644 --- a/instrumentation-security/java-lang/src/test/java/com/nr/instrumentation/java/lang/ProcessImplTest.java +++ b/instrumentation-security/java-lang/src/test/java/com/nr/agent/security/instrumentation/java/lang/ProcessImplTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.java.lang; +package com.nr.agent.security.instrumentation.java.lang; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/javax-jndi/src/main/java/com/nr/instrumentation/security/javax/JNDIUtils.java b/instrumentation-security/javax-jndi/src/main/java/com/newrelic/agent/security/instrumentation/javax/jndi/JNDIUtils.java similarity index 96% rename from instrumentation-security/javax-jndi/src/main/java/com/nr/instrumentation/security/javax/JNDIUtils.java rename to instrumentation-security/javax-jndi/src/main/java/com/newrelic/agent/security/instrumentation/javax/jndi/JNDIUtils.java index c3047e062..d6bd2e826 100644 --- a/instrumentation-security/javax-jndi/src/main/java/com/nr/instrumentation/security/javax/JNDIUtils.java +++ b/instrumentation-security/javax-jndi/src/main/java/com/newrelic/agent/security/instrumentation/javax/jndi/JNDIUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javax; +package com.newrelic.agent.security.instrumentation.javax.jndi; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.schema.AbstractOperation; diff --git a/instrumentation-security/javax-jndi/src/main/java/javax/naming/Context_Instrumentation.java b/instrumentation-security/javax-jndi/src/main/java/javax/naming/Context_Instrumentation.java index 32dab59b1..f1a12fa26 100644 --- a/instrumentation-security/javax-jndi/src/main/java/javax/naming/Context_Instrumentation.java +++ b/instrumentation-security/javax-jndi/src/main/java/javax/naming/Context_Instrumentation.java @@ -9,9 +9,8 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.javax.JNDIUtils; +import com.newrelic.agent.security.instrumentation.javax.jndi.JNDIUtils; -import javax.naming.directory.SearchResult; import java.util.Enumeration; import java.util.List; diff --git a/instrumentation-security/javax-jndi/src/test/java/com/nr/instrumentation/security/javax/jndi/ContextRmiTest.java b/instrumentation-security/javax-jndi/src/test/java/com/nr/agent/security/instrumentation/javax/jndi/ContextRmiTest.java similarity index 97% rename from instrumentation-security/javax-jndi/src/test/java/com/nr/instrumentation/security/javax/jndi/ContextRmiTest.java rename to instrumentation-security/javax-jndi/src/test/java/com/nr/agent/security/instrumentation/javax/jndi/ContextRmiTest.java index f4b8fbbb8..6f0e71eae 100644 --- a/instrumentation-security/javax-jndi/src/test/java/com/nr/instrumentation/security/javax/jndi/ContextRmiTest.java +++ b/instrumentation-security/javax-jndi/src/test/java/com/nr/agent/security/instrumentation/javax/jndi/ContextRmiTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javax.jndi; +package com.nr.agent.security.instrumentation.javax.jndi; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,7 +6,7 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.VulnerabilityCaseType; import com.newrelic.api.agent.security.schema.operation.SSRFOperation; -import com.nr.instrumentation.security.javax.JNDIUtils; +import com.newrelic.agent.security.instrumentation.javax.jndi.JNDIUtils; import org.junit.Assert; import org.junit.FixMethodOrder; import org.junit.Test; @@ -28,7 +28,7 @@ import java.util.Properties; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "javax.naming", "com.nr.instrumentation.security.javax" } ) +@InstrumentationTestConfig(includePrefixes = { "javax.naming", "com.newrelic.agent.security.instrumentation.javax.jndi" } ) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ContextRmiTest { diff --git a/instrumentation-security/javax-jndi/src/test/java/com/nr/instrumentation/security/javax/jndi/ContextTest.java b/instrumentation-security/javax-jndi/src/test/java/com/nr/agent/security/instrumentation/javax/jndi/ContextTest.java similarity index 98% rename from instrumentation-security/javax-jndi/src/test/java/com/nr/instrumentation/security/javax/jndi/ContextTest.java rename to instrumentation-security/javax-jndi/src/test/java/com/nr/agent/security/instrumentation/javax/jndi/ContextTest.java index c13b7ae40..b4295dc77 100644 --- a/instrumentation-security/javax-jndi/src/test/java/com/nr/instrumentation/security/javax/jndi/ContextTest.java +++ b/instrumentation-security/javax-jndi/src/test/java/com/nr/agent/security/instrumentation/javax/jndi/ContextTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javax.jndi; +package com.nr.agent.security.instrumentation.javax.jndi; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,7 +6,7 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.VulnerabilityCaseType; import com.newrelic.api.agent.security.schema.operation.SSRFOperation; -import com.nr.instrumentation.security.javax.JNDIUtils; +import com.newrelic.agent.security.instrumentation.javax.jndi.JNDIUtils; import com.unboundid.ldap.sdk.LDAPException; import org.junit.Assert; import org.junit.BeforeClass; @@ -28,7 +28,7 @@ import java.util.Properties; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "javax.naming", "com.nr.instrumentation.security.javax" } ) +@InstrumentationTestConfig(includePrefixes = { "javax.naming", "com.newrelic.agent.security.instrumentation.javax.jndi" } ) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ContextTest { public static final String DOMAIN_DSN = "dc=example,dc=com"; diff --git a/instrumentation-security/javax-ldap/src/main/java/com/nr/instrumentation/security/javax/LDAPUtils.java b/instrumentation-security/javax-ldap/src/main/java/com/newrelic/agent/security/instrumentation/javax/ldap/LDAPUtils.java similarity index 72% rename from instrumentation-security/javax-ldap/src/main/java/com/nr/instrumentation/security/javax/LDAPUtils.java rename to instrumentation-security/javax-ldap/src/main/java/com/newrelic/agent/security/instrumentation/javax/ldap/LDAPUtils.java index a0884de13..4cc2d9b4c 100644 --- a/instrumentation-security/javax-ldap/src/main/java/com/nr/instrumentation/security/javax/LDAPUtils.java +++ b/instrumentation-security/javax-ldap/src/main/java/com/newrelic/agent/security/instrumentation/javax/ldap/LDAPUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javax; +package com.newrelic.agent.security.instrumentation.javax.ldap; public class LDAPUtils { diff --git a/instrumentation-security/javax-ldap/src/main/java/javax/naming/directory/DirContext_Instrumentation.java b/instrumentation-security/javax-ldap/src/main/java/javax/naming/directory/DirContext_Instrumentation.java index c009c4675..05852adcb 100644 --- a/instrumentation-security/javax-ldap/src/main/java/javax/naming/directory/DirContext_Instrumentation.java +++ b/instrumentation-security/javax-ldap/src/main/java/javax/naming/directory/DirContext_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.javax.LDAPUtils; +import com.newrelic.agent.security.instrumentation.javax.ldap.LDAPUtils; import javax.naming.Context; import javax.naming.Name; diff --git a/instrumentation-security/javax-ldap/src/test/java/com/nr/instrumentation/security/javax/ldap/DirContextTest.java b/instrumentation-security/javax-ldap/src/test/java/com/nr/agent/security/instrumentation/javax/ldap/DirContextTest.java similarity index 99% rename from instrumentation-security/javax-ldap/src/test/java/com/nr/instrumentation/security/javax/ldap/DirContextTest.java rename to instrumentation-security/javax-ldap/src/test/java/com/nr/agent/security/instrumentation/javax/ldap/DirContextTest.java index 4d7339aa5..4d50e493c 100644 --- a/instrumentation-security/javax-ldap/src/test/java/com/nr/instrumentation/security/javax/ldap/DirContextTest.java +++ b/instrumentation-security/javax-ldap/src/test/java/com/nr/agent/security/instrumentation/javax/ldap/DirContextTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.javax.ldap; +package com.nr.agent.security.instrumentation.javax.ldap; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -31,7 +31,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "javax.naming", "com.nr.instrumentation.security.javax.LDAPUtils" } ) +@InstrumentationTestConfig(includePrefixes = { "javax.naming", "com.newrelic.agent.security.instrumentation.javax.ldap.LDAPUtils" } ) @FixMethodOrder(MethodSorters.NAME_ASCENDING) //FIXME: after instrumentation works @Ignore diff --git a/instrumentation-security/javax-xpath/src/main/java/com/nr/instrumentation/security/xpath/javax/XPATHUtils.java b/instrumentation-security/javax-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/javax/XPATHUtils.java similarity index 79% rename from instrumentation-security/javax-xpath/src/main/java/com/nr/instrumentation/security/xpath/javax/XPATHUtils.java rename to instrumentation-security/javax-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/javax/XPATHUtils.java index 4902b10aa..852735fad 100644 --- a/instrumentation-security/javax-xpath/src/main/java/com/nr/instrumentation/security/xpath/javax/XPATHUtils.java +++ b/instrumentation-security/javax-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/javax/XPATHUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xpath.javax; +package com.newrelic.agent.security.instrumentation.xpath.javax; public class XPATHUtils { diff --git a/instrumentation-security/javax-xpath/src/main/java/com/sun/org/apache/xpath/internal/XPath_Instrumentation.java b/instrumentation-security/javax-xpath/src/main/java/com/sun/org/apache/xpath/internal/XPath_Instrumentation.java index 1a19de726..7d400d22f 100644 --- a/instrumentation-security/javax-xpath/src/main/java/com/sun/org/apache/xpath/internal/XPath_Instrumentation.java +++ b/instrumentation-security/javax-xpath/src/main/java/com/sun/org/apache/xpath/internal/XPath_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.xpath.javax.XPATHUtils; +import com.newrelic.agent.security.instrumentation.xpath.javax.XPATHUtils; import com.sun.org.apache.xml.internal.utils.PrefixResolver; import com.sun.org.apache.xpath.internal.objects.XObject; diff --git a/instrumentation-security/javax-xpath/src/main/java/javax/xml/xpath/XPath_Instrumentation.java b/instrumentation-security/javax-xpath/src/main/java/javax/xml/xpath/XPath_Instrumentation.java index 1cf7d43b5..8b94cca0d 100644 --- a/instrumentation-security/javax-xpath/src/main/java/javax/xml/xpath/XPath_Instrumentation.java +++ b/instrumentation-security/javax-xpath/src/main/java/javax/xml/xpath/XPath_Instrumentation.java @@ -9,8 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.xpath.javax.XPATHUtils; -import com.sun.org.apache.xpath.internal.objects.XObject; +import com.newrelic.agent.security.instrumentation.xpath.javax.XPATHUtils; import org.xml.sax.InputSource; import javax.xml.namespace.QName; diff --git a/instrumentation-security/javax-xpath/src/test/java/com/nr/instrumentation/security/xpath/XPathTest.java b/instrumentation-security/javax-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/javax/XPathTest.java similarity index 98% rename from instrumentation-security/javax-xpath/src/test/java/com/nr/instrumentation/security/xpath/XPathTest.java rename to instrumentation-security/javax-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/javax/XPathTest.java index beeb87819..a897dfdee 100644 --- a/instrumentation-security/javax-xpath/src/test/java/com/nr/instrumentation/security/xpath/XPathTest.java +++ b/instrumentation-security/javax-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/javax/XPathTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xpath; +package com.nr.agent.security.instrumentation.xpath.javax; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,7 +6,7 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.VulnerabilityCaseType; import com.newrelic.api.agent.security.schema.operation.XPathOperation; -import com.nr.instrumentation.security.xpath.javax.XPATHUtils; +import com.newrelic.agent.security.instrumentation.xpath.javax.XPATHUtils; import org.junit.Assert; import org.junit.FixMethodOrder; import org.junit.Ignore; diff --git a/instrumentation-security/javax-xpath/src/test/java/com/nr/instrumentation/security/xpath/internal/XPathInternalTest.java b/instrumentation-security/javax-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/javax/internal/XPathInternalTest.java similarity index 99% rename from instrumentation-security/javax-xpath/src/test/java/com/nr/instrumentation/security/xpath/internal/XPathInternalTest.java rename to instrumentation-security/javax-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/javax/internal/XPathInternalTest.java index 1026db01d..b0510aa95 100644 --- a/instrumentation-security/javax-xpath/src/test/java/com/nr/instrumentation/security/xpath/internal/XPathInternalTest.java +++ b/instrumentation-security/javax-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/javax/internal/XPathInternalTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xpath.internal; +package com.nr.agent.security.instrumentation.xpath.javax.internal; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jax-rs-1.0/src/main/java/com/nr/instrumentation/javax/ws/rs/api/Application_Instrumentation.java b/instrumentation-security/jax-rs-1.0/src/main/java/com/newrelic/agent/security/instrumentation/javax/ws/rs/api/Application_Instrumentation.java similarity index 76% rename from instrumentation-security/jax-rs-1.0/src/main/java/com/nr/instrumentation/javax/ws/rs/api/Application_Instrumentation.java rename to instrumentation-security/jax-rs-1.0/src/main/java/com/newrelic/agent/security/instrumentation/javax/ws/rs/api/Application_Instrumentation.java index 844fb058a..2007dfb78 100644 --- a/instrumentation-security/jax-rs-1.0/src/main/java/com/nr/instrumentation/javax/ws/rs/api/Application_Instrumentation.java +++ b/instrumentation-security/jax-rs-1.0/src/main/java/com/newrelic/agent/security/instrumentation/javax/ws/rs/api/Application_Instrumentation.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.javax.ws.rs.api; +package com.newrelic.agent.security.instrumentation.javax.ws.rs.api; import com.newrelic.api.agent.weaver.Weave; diff --git a/instrumentation-security/jax-rs-1.0/src/main/java/com/nr/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Instrumentation.java b/instrumentation-security/jax-rs-1.0/src/main/java/com/newrelic/agent/security/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Instrumentation.java similarity index 92% rename from instrumentation-security/jax-rs-1.0/src/main/java/com/nr/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Instrumentation.java rename to instrumentation-security/jax-rs-1.0/src/main/java/com/newrelic/agent/security/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Instrumentation.java index e6f1d94c9..b7211b1af 100644 --- a/instrumentation-security/jax-rs-1.0/src/main/java/com/nr/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Instrumentation.java +++ b/instrumentation-security/jax-rs-1.0/src/main/java/com/newrelic/agent/security/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.javax.ws.rs.api; +package com.newrelic.agent.security.instrumentation.javax.ws.rs.api; import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper; import com.newrelic.api.agent.weaver.MatchType; diff --git a/instrumentation-security/jax-rs-1.0/src/main/java/com/nr/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Subresource_Instrumentation.java b/instrumentation-security/jax-rs-1.0/src/main/java/com/newrelic/agent/security/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Subresource_Instrumentation.java similarity index 95% rename from instrumentation-security/jax-rs-1.0/src/main/java/com/nr/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Subresource_Instrumentation.java rename to instrumentation-security/jax-rs-1.0/src/main/java/com/newrelic/agent/security/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Subresource_Instrumentation.java index 8740739cf..15018dfc2 100644 --- a/instrumentation-security/jax-rs-1.0/src/main/java/com/nr/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Subresource_Instrumentation.java +++ b/instrumentation-security/jax-rs-1.0/src/main/java/com/newrelic/agent/security/instrumentation/javax/ws/rs/api/JavaxWsRsApi_Subresource_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.javax.ws.rs.api; +package com.newrelic.agent.security.instrumentation.javax.ws.rs.api; import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper; import com.newrelic.api.agent.weaver.WeaveIntoAllMethods; diff --git a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/App.java b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/App.java similarity index 95% rename from instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/App.java rename to instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/App.java index 3b15bf714..c7b90d193 100644 --- a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/App.java +++ b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/App.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs.app; +package com.nr.agent.security.instrumentation.javax.ws.rs.api.app; import com.newrelic.api.agent.Trace; diff --git a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/CustomerLocatorResource.java b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/CustomerLocatorResource.java similarity index 79% rename from instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/CustomerLocatorResource.java rename to instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/CustomerLocatorResource.java index 7a0cef75f..9da61e921 100644 --- a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/CustomerLocatorResource.java +++ b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/CustomerLocatorResource.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs.app; +package com.nr.agent.security.instrumentation.javax.ws.rs.api.app; import javax.ws.rs.Path; diff --git a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/IdSubResource.java b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/IdSubResource.java similarity index 94% rename from instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/IdSubResource.java rename to instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/IdSubResource.java index 4f4007f6a..8cf7a2527 100644 --- a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/IdSubResource.java +++ b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/IdSubResource.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs.app; +package com.nr.agent.security.instrumentation.javax.ws.rs.api.app; import javax.ws.rs.DELETE; import javax.ws.rs.GET; diff --git a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/OrdersSubResource.java b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/OrdersSubResource.java similarity index 75% rename from instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/OrdersSubResource.java rename to instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/OrdersSubResource.java index fcba9df59..421b221f9 100644 --- a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/OrdersSubResource.java +++ b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/OrdersSubResource.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs.app; +package com.nr.agent.security.instrumentation.javax.ws.rs.api.app; import javax.ws.rs.Path; diff --git a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/TestMapping.java b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/TestMapping.java similarity index 95% rename from instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/TestMapping.java rename to instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/TestMapping.java index 7491a3ed1..41682c058 100644 --- a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/app/TestMapping.java +++ b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/app/TestMapping.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs.app; +package com.nr.agent.security.instrumentation.javax.ws.rs.api.app; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; diff --git a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/test/JavaxWsRsApiTest.java b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/test/JavaxWsRsApiTest.java similarity index 94% rename from instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/test/JavaxWsRsApiTest.java rename to instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/test/JavaxWsRsApiTest.java index 32d115f33..4146f3dff 100644 --- a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/test/JavaxWsRsApiTest.java +++ b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/test/JavaxWsRsApiTest.java @@ -1,16 +1,16 @@ -package com.nr.instrumentation.security.jax.rs.test; +package com.nr.agent.security.instrumentation.javax.ws.rs.api.test; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; import com.newrelic.api.agent.security.schema.AgentMetaData; -import com.nr.instrumentation.security.jax.rs.app.App; +import com.nr.agent.security.instrumentation.javax.ws.rs.api.app.App; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "com.nr.instrumentation.javax.ws.rs.api") +@InstrumentationTestConfig(includePrefixes = "com.newrelic.agent.security.instrumentation.javax.ws.rs.api") public class JavaxWsRsApiTest { @Test public void testPut() { diff --git a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/test/SubresourceTest.java b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/test/SubresourceTest.java similarity index 93% rename from instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/test/SubresourceTest.java rename to instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/test/SubresourceTest.java index 4ee2da3d1..61befaaf5 100644 --- a/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/instrumentation/security/jax/rs/test/SubresourceTest.java +++ b/instrumentation-security/jax-rs-1.0/src/test/java/com/nr/agent/security/instrumentation/javax/ws/rs/api/test/SubresourceTest.java @@ -1,12 +1,12 @@ -package com.nr.instrumentation.security.jax.rs.test; +package com.nr.agent.security.instrumentation.javax.ws.rs.api.test; +import com.nr.agent.security.instrumentation.javax.ws.rs.api.app.CustomerLocatorResource; +import com.nr.agent.security.instrumentation.javax.ws.rs.api.app.IdSubResource; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; import com.newrelic.api.agent.security.schema.AgentMetaData; -import com.nr.instrumentation.security.jax.rs.app.CustomerLocatorResource; -import com.nr.instrumentation.security.jax.rs.app.IdSubResource; -import com.nr.instrumentation.security.jax.rs.app.OrdersSubResource; +import com.nr.agent.security.instrumentation.javax.ws.rs.api.app.OrdersSubResource; import org.glassfish.jersey.client.HttpUrlConnectorProvider; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.JerseyTest; @@ -20,7 +20,7 @@ import javax.ws.rs.core.Response; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "com.nr.instrumentation.javax.ws.rs.api") +@InstrumentationTestConfig(includePrefixes = "com.newrelic.agent.security.instrumentation.javax.ws.rs.api") public class SubresourceTest extends JerseyTest { @BeforeClass public static void bringUp() { diff --git a/instrumentation-security/jax-rs-3.0/src/main/java/com/nr/instrumentation/jakarta/ws/rs/api/Application_Instrumentation.java b/instrumentation-security/jax-rs-3.0/src/main/java/com/newrelic/agent/security/instrumentation/jakarta/ws/rs/api/Application_Instrumentation.java similarity index 83% rename from instrumentation-security/jax-rs-3.0/src/main/java/com/nr/instrumentation/jakarta/ws/rs/api/Application_Instrumentation.java rename to instrumentation-security/jax-rs-3.0/src/main/java/com/newrelic/agent/security/instrumentation/jakarta/ws/rs/api/Application_Instrumentation.java index 01057a3d7..b400f6073 100644 --- a/instrumentation-security/jax-rs-3.0/src/main/java/com/nr/instrumentation/jakarta/ws/rs/api/Application_Instrumentation.java +++ b/instrumentation-security/jax-rs-3.0/src/main/java/com/newrelic/agent/security/instrumentation/jakarta/ws/rs/api/Application_Instrumentation.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.jakarta.ws.rs.api; +package com.newrelic.agent.security.instrumentation.jakarta.ws.rs.api; import com.newrelic.api.agent.weaver.Weave; diff --git a/instrumentation-security/jax-rs-3.0/src/main/java/com/nr/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Instrumentation.java b/instrumentation-security/jax-rs-3.0/src/main/java/com/newrelic/agent/security/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Instrumentation.java similarity index 92% rename from instrumentation-security/jax-rs-3.0/src/main/java/com/nr/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Instrumentation.java rename to instrumentation-security/jax-rs-3.0/src/main/java/com/newrelic/agent/security/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Instrumentation.java index 4d45794e3..1414c047f 100644 --- a/instrumentation-security/jax-rs-3.0/src/main/java/com/nr/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Instrumentation.java +++ b/instrumentation-security/jax-rs-3.0/src/main/java/com/newrelic/agent/security/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.jakarta.ws.rs.api; +package com.newrelic.agent.security.instrumentation.jakarta.ws.rs.api; import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper; import com.newrelic.api.agent.weaver.MatchType; diff --git a/instrumentation-security/jax-rs-3.0/src/main/java/com/nr/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Subresource_Instrumentation.java b/instrumentation-security/jax-rs-3.0/src/main/java/com/newrelic/agent/security/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Subresource_Instrumentation.java similarity index 95% rename from instrumentation-security/jax-rs-3.0/src/main/java/com/nr/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Subresource_Instrumentation.java rename to instrumentation-security/jax-rs-3.0/src/main/java/com/newrelic/agent/security/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Subresource_Instrumentation.java index 68d44e8d5..1b99cdf70 100644 --- a/instrumentation-security/jax-rs-3.0/src/main/java/com/nr/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Subresource_Instrumentation.java +++ b/instrumentation-security/jax-rs-3.0/src/main/java/com/newrelic/agent/security/instrumentation/jakarta/ws/rs/api/JakartaWsRsApi_Subresource_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.jakarta.ws.rs.api; +package com.newrelic.agent.security.instrumentation.jakarta.ws.rs.api; import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper; import com.newrelic.api.agent.weaver.WeaveIntoAllMethods; diff --git a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/App.java b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/App.java similarity index 94% rename from instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/App.java rename to instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/App.java index a497ff469..975bb4510 100644 --- a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/App.java +++ b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/App.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs3.app; +package com.nr.agent.security.instrumentation.jakarta.ws.rs.api.app; import com.newrelic.api.agent.Trace; diff --git a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/CustomerLocatorResource.java b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/CustomerLocatorResource.java similarity index 79% rename from instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/CustomerLocatorResource.java rename to instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/CustomerLocatorResource.java index a441a57a3..0efa07f64 100644 --- a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/CustomerLocatorResource.java +++ b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/CustomerLocatorResource.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs3.app; +package com.nr.agent.security.instrumentation.jakarta.ws.rs.api.app; import jakarta.ws.rs.Path; diff --git a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/IdSubResource.java b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/IdSubResource.java similarity index 94% rename from instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/IdSubResource.java rename to instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/IdSubResource.java index d63c45f01..e1de1465d 100644 --- a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/IdSubResource.java +++ b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/IdSubResource.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs3.app; +package com.nr.agent.security.instrumentation.jakarta.ws.rs.api.app; import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; diff --git a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/OrdersSubResource.java b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/OrdersSubResource.java similarity index 75% rename from instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/OrdersSubResource.java rename to instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/OrdersSubResource.java index d757b4eda..5b0e3362f 100644 --- a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/OrdersSubResource.java +++ b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/OrdersSubResource.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs3.app; +package com.nr.agent.security.instrumentation.jakarta.ws.rs.api.app; import jakarta.ws.rs.Path; diff --git a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/TestMapping.java b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/TestMapping.java similarity index 94% rename from instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/TestMapping.java rename to instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/TestMapping.java index 2d3de319c..672fc71e0 100644 --- a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/app/TestMapping.java +++ b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/app/TestMapping.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jax.rs3.app; +package com.nr.agent.security.instrumentation.jakarta.ws.rs.api.app; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.DELETE; diff --git a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/test/JakartaWsRsApiTest.java b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/test/JakartaWsRsApiTest.java similarity index 94% rename from instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/test/JakartaWsRsApiTest.java rename to instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/test/JakartaWsRsApiTest.java index 0754d6471..25d0b1eba 100644 --- a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/test/JakartaWsRsApiTest.java +++ b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/test/JakartaWsRsApiTest.java @@ -1,16 +1,16 @@ -package com.nr.instrumentation.security.jax.rs3.test; +package com.nr.agent.security.instrumentation.jakarta.ws.rs.api.test; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; import com.newrelic.api.agent.security.schema.AgentMetaData; -import com.nr.instrumentation.security.jax.rs3.app.App; +import com.nr.agent.security.instrumentation.jakarta.ws.rs.api.app.App; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "com.nr.instrumentation.jakarta.ws.rs.api") +@InstrumentationTestConfig(includePrefixes = "com.newrelic.agent.security.instrumentation.jakarta.ws.rs.api") public class JakartaWsRsApiTest { @Test public void testPut() { diff --git a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/test/SubresourceTest.java b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/test/SubresourceTest.java similarity index 93% rename from instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/test/SubresourceTest.java rename to instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/test/SubresourceTest.java index 7eee3237b..3fc39262e 100644 --- a/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/instrumentation/security/jax/rs3/test/SubresourceTest.java +++ b/instrumentation-security/jax-rs-3.0/src/test/java/com/nr/agent/security/instrumentation/jakarta/ws/rs/api/test/SubresourceTest.java @@ -1,12 +1,12 @@ -package com.nr.instrumentation.security.jax.rs3.test; +package com.nr.agent.security.instrumentation.jakarta.ws.rs.api.test; +import com.nr.agent.security.instrumentation.jakarta.ws.rs.api.app.IdSubResource; +import com.nr.agent.security.instrumentation.jakarta.ws.rs.api.app.OrdersSubResource; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; import com.newrelic.api.agent.security.schema.AgentMetaData; -import com.nr.instrumentation.security.jax.rs3.app.CustomerLocatorResource; -import com.nr.instrumentation.security.jax.rs3.app.IdSubResource; -import com.nr.instrumentation.security.jax.rs3.app.OrdersSubResource; +import com.nr.agent.security.instrumentation.jakarta.ws.rs.api.app.CustomerLocatorResource; import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; import jakarta.ws.rs.core.Response; @@ -19,7 +19,7 @@ import org.junit.runner.RunWith; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "com.nr.instrumentation.jakarta.ws.rs.api") +@InstrumentationTestConfig(includePrefixes = "com.newrelic.agent.security.instrumentation.jakarta.ws.rs.api") public class SubresourceTest extends JerseyTest { @BeforeClass diff --git a/instrumentation-security/jaxen-xpath-1.1/src/main/java/com/nr/instrumentation/security/xpath/jaxen/XPATHUtils.java b/instrumentation-security/jaxen-xpath-1.1/src/main/java/com/newrelic/agent/security/instrumentation/xpath/jaxen/XPATHUtils.java similarity index 74% rename from instrumentation-security/jaxen-xpath-1.1/src/main/java/com/nr/instrumentation/security/xpath/jaxen/XPATHUtils.java rename to instrumentation-security/jaxen-xpath-1.1/src/main/java/com/newrelic/agent/security/instrumentation/xpath/jaxen/XPATHUtils.java index 6968491fa..6cc00af52 100644 --- a/instrumentation-security/jaxen-xpath-1.1/src/main/java/com/nr/instrumentation/security/xpath/jaxen/XPATHUtils.java +++ b/instrumentation-security/jaxen-xpath-1.1/src/main/java/com/newrelic/agent/security/instrumentation/xpath/jaxen/XPATHUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xpath.jaxen; +package com.newrelic.agent.security.instrumentation.xpath.jaxen; public class XPATHUtils { diff --git a/instrumentation-security/jaxen-xpath-1.1/src/main/java/org/jaxen/BaseXPath_Instrumentation.java b/instrumentation-security/jaxen-xpath-1.1/src/main/java/org/jaxen/BaseXPath_Instrumentation.java index e4fd8392b..b9ca64c16 100644 --- a/instrumentation-security/jaxen-xpath-1.1/src/main/java/org/jaxen/BaseXPath_Instrumentation.java +++ b/instrumentation-security/jaxen-xpath-1.1/src/main/java/org/jaxen/BaseXPath_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.xpath.jaxen.XPATHUtils; +import com.newrelic.agent.security.instrumentation.xpath.jaxen.XPATHUtils; import java.util.List; diff --git a/instrumentation-security/jaxen-xpath-1.1/src/test/java/com/nr/instrumentation/security/jaxen/xpath11/BaseXPathTest.java b/instrumentation-security/jaxen-xpath-1.1/src/test/java/com/nr/agent/security/instrumentation/xpath/jaxen/BaseXPathTest.java similarity index 97% rename from instrumentation-security/jaxen-xpath-1.1/src/test/java/com/nr/instrumentation/security/jaxen/xpath11/BaseXPathTest.java rename to instrumentation-security/jaxen-xpath-1.1/src/test/java/com/nr/agent/security/instrumentation/xpath/jaxen/BaseXPathTest.java index 33de62310..9e3579340 100644 --- a/instrumentation-security/jaxen-xpath-1.1/src/test/java/com/nr/instrumentation/security/jaxen/xpath11/BaseXPathTest.java +++ b/instrumentation-security/jaxen-xpath-1.1/src/test/java/com/nr/agent/security/instrumentation/xpath/jaxen/BaseXPathTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jaxen.xpath11; +package com.nr.agent.security.instrumentation.xpath.jaxen; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -25,7 +25,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.nr.instrumentation.security.xpath.jaxen", "org.jaxen" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.agent.security.instrumentation.xpath.jaxen", "org.jaxen" }) public class BaseXPathTest { private final String EXPRESSION = "/Customers/Customer"; private final String XML_DOC = "src/test/resources/Customer.xml"; diff --git a/instrumentation-security/jaxen-xpath/src/main/java/com/nr/instrumentation/security/xpath/jaxen/XPATHUtils.java b/instrumentation-security/jaxen-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/jaxen/XPATHUtils.java similarity index 74% rename from instrumentation-security/jaxen-xpath/src/main/java/com/nr/instrumentation/security/xpath/jaxen/XPATHUtils.java rename to instrumentation-security/jaxen-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/jaxen/XPATHUtils.java index 6968491fa..6cc00af52 100644 --- a/instrumentation-security/jaxen-xpath/src/main/java/com/nr/instrumentation/security/xpath/jaxen/XPATHUtils.java +++ b/instrumentation-security/jaxen-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xpath/jaxen/XPATHUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xpath.jaxen; +package com.newrelic.agent.security.instrumentation.xpath.jaxen; public class XPATHUtils { diff --git a/instrumentation-security/jaxen-xpath/src/main/java/org/jaxen/BaseXPath_Instrumentation.java b/instrumentation-security/jaxen-xpath/src/main/java/org/jaxen/BaseXPath_Instrumentation.java index 135cc2509..4df33771b 100644 --- a/instrumentation-security/jaxen-xpath/src/main/java/org/jaxen/BaseXPath_Instrumentation.java +++ b/instrumentation-security/jaxen-xpath/src/main/java/org/jaxen/BaseXPath_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.xpath.jaxen.XPATHUtils; +import com.newrelic.agent.security.instrumentation.xpath.jaxen.XPATHUtils; import java.util.List; diff --git a/instrumentation-security/jaxen-xpath/src/test/java/com/nr/instrumentation/security/jaxen/xpath/BaseXPathTest.java b/instrumentation-security/jaxen-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/jaxen/BaseXPathTest.java similarity index 97% rename from instrumentation-security/jaxen-xpath/src/test/java/com/nr/instrumentation/security/jaxen/xpath/BaseXPathTest.java rename to instrumentation-security/jaxen-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/jaxen/BaseXPathTest.java index e798ef0c5..a370cb9d2 100644 --- a/instrumentation-security/jaxen-xpath/src/test/java/com/nr/instrumentation/security/jaxen/xpath/BaseXPathTest.java +++ b/instrumentation-security/jaxen-xpath/src/test/java/com/nr/agent/security/instrumentation/xpath/jaxen/BaseXPathTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jaxen.xpath; +package com.nr.agent.security.instrumentation.xpath.jaxen; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -26,7 +26,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.nr.instrumentation.security.xpath.jaxen", "org.jaxen" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.instrumentation.security.xpath.jaxen", "org.jaxen" }) public class BaseXPathTest { private final String EXPRESSION = "/Customers/Customer"; private final String XML_DOC = "src/test/resources/Customer.xml"; diff --git a/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/DerbyAutoloadedDriverTest.java b/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/DerbyAutoloadedDriverTest.java similarity index 98% rename from instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/DerbyAutoloadedDriverTest.java rename to instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/DerbyAutoloadedDriverTest.java index d1bd9c9ca..d3f6c3dd8 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/DerbyAutoloadedDriverTest.java +++ b/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/DerbyAutoloadedDriverTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby10216; +package com.nr.agent.security.instrumentation.derby101011; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -26,7 +26,6 @@ public class DerbyAutoloadedDriverTest { private static final String DB_CONNECTION = "jdbc:derby:memory:test;create=true;DB_CLOSE_DELAY=-1"; private static final String DB_USER = ""; private static final String DB_PASSWORD = ""; - @Test public void testConnect() throws SQLException { getConnection(); @@ -107,4 +106,5 @@ private void getConnection2() throws SQLException { } } } + } diff --git a/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/DerbyDataStoreTest.java b/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/DerbyDataStoreTest.java similarity index 99% rename from instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/DerbyDataStoreTest.java rename to instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/DerbyDataStoreTest.java index ffd05ba37..694e4f5af 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/DerbyDataStoreTest.java +++ b/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/DerbyDataStoreTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby101011; +package com.nr.agent.security.instrumentation.derby101011; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/DerbyDriverTest.java b/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/DerbyDriverTest.java similarity index 98% rename from instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/DerbyDriverTest.java rename to instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/DerbyDriverTest.java index 47b5629b0..0dbcb614b 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/DerbyDriverTest.java +++ b/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/DerbyDriverTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby101011; +package com.nr.agent.security.instrumentation.derby101011; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/Helper.java b/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/Helper.java similarity index 92% rename from instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/Helper.java rename to instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/Helper.java index f76310bf7..a70588805 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/Helper.java +++ b/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101011/Helper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby101111; +package com.nr.agent.security.instrumentation.derby101011; import java.sql.Driver; import java.sql.DriverManager; diff --git a/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/DerbyAutoloadedDriverTest.java b/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/DerbyAutoloadedDriverTest.java similarity index 98% rename from instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/DerbyAutoloadedDriverTest.java rename to instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/DerbyAutoloadedDriverTest.java index eab0de759..d1b0383f5 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/DerbyAutoloadedDriverTest.java +++ b/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/DerbyAutoloadedDriverTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby101011; +package com.nr.agent.security.instrumentation.derby101111; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/DerbyDataStoreTest.java b/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/DerbyDataStoreTest.java similarity index 99% rename from instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/DerbyDataStoreTest.java rename to instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/DerbyDataStoreTest.java index 101732205..7a867cb58 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/DerbyDataStoreTest.java +++ b/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/DerbyDataStoreTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby101111; +package com.nr.agent.security.instrumentation.derby101111; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/DerbyDriverTest.java b/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/DerbyDriverTest.java similarity index 98% rename from instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/DerbyDriverTest.java rename to instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/DerbyDriverTest.java index 9aa340e69..7ae4fc0bb 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/DerbyDriverTest.java +++ b/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/DerbyDriverTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby101111; +package com.nr.agent.security.instrumentation.derby101111; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/Helper.java b/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/Helper.java similarity index 92% rename from instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/Helper.java rename to instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/Helper.java index 08eeb4642..7b28ffc05 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/Helper.java +++ b/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/agent/security/instrumentation/derby101111/Helper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby10216; +package com.nr.agent.security.instrumentation.derby101111; import java.sql.Driver; import java.sql.DriverManager; diff --git a/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/DerbyAutoloadedDriverTest.java b/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/DerbyAutoloadedDriverTest.java similarity index 98% rename from instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/DerbyAutoloadedDriverTest.java rename to instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/DerbyAutoloadedDriverTest.java index a22d0c34f..fdc76740d 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.11.1.1/src/test/java/com/nr/instrumentation/security/derby101111/DerbyAutoloadedDriverTest.java +++ b/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/DerbyAutoloadedDriverTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby101111; +package com.nr.agent.security.instrumentation.derby10216; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -26,6 +26,7 @@ public class DerbyAutoloadedDriverTest { private static final String DB_CONNECTION = "jdbc:derby:memory:test;create=true;DB_CLOSE_DELAY=-1"; private static final String DB_USER = ""; private static final String DB_PASSWORD = ""; + @Test public void testConnect() throws SQLException { getConnection(); @@ -106,5 +107,4 @@ private void getConnection2() throws SQLException { } } } - } diff --git a/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/DerbyDataStoreTest.java b/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/DerbyDataStoreTest.java similarity index 99% rename from instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/DerbyDataStoreTest.java rename to instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/DerbyDataStoreTest.java index b77917c9d..4f0d7f829 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/DerbyDataStoreTest.java +++ b/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/DerbyDataStoreTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby10216; +package com.nr.agent.security.instrumentation.derby10216; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/DerbyDriverTest.java b/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/DerbyDriverTest.java similarity index 98% rename from instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/DerbyDriverTest.java rename to instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/DerbyDriverTest.java index 28f2fbb0f..191ad3e2a 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/instrumentation/security/derby10216/DerbyDriverTest.java +++ b/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/DerbyDriverTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby10216; +package com.nr.agent.security.instrumentation.derby10216; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/Helper.java b/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/Helper.java similarity index 92% rename from instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/Helper.java rename to instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/Helper.java index 9e8f1f500..f89c18429 100644 --- a/instrumentation-security/jdbc-embedded-derby-10.10.1.1/src/test/java/com/nr/instrumentation/security/derby101011/Helper.java +++ b/instrumentation-security/jdbc-embedded-derby-10.2.1.6/src/test/java/com/nr/agent/security/instrumentation/derby10216/Helper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.derby101011; +package com.nr.agent.security.instrumentation.derby10216; import java.sql.Driver; import java.sql.DriverManager; diff --git a/instrumentation-security/jdbc-h2/src/test/java/com/nr/instrumentation/org/h2/DataStoreTest.java b/instrumentation-security/jdbc-h2/src/test/java/com/nr/agent/security/instrumentation/h2/org/DataStoreTest.java similarity index 98% rename from instrumentation-security/jdbc-h2/src/test/java/com/nr/instrumentation/org/h2/DataStoreTest.java rename to instrumentation-security/jdbc-h2/src/test/java/com/nr/agent/security/instrumentation/h2/org/DataStoreTest.java index b45e570f6..f2febe511 100644 --- a/instrumentation-security/jdbc-h2/src/test/java/com/nr/instrumentation/org/h2/DataStoreTest.java +++ b/instrumentation-security/jdbc-h2/src/test/java/com/nr/agent/security/instrumentation/h2/org/DataStoreTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.org.h2; +package com.nr.agent.security.instrumentation.h2.org; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-h2/src/test/java/com/nr/instrumentation/org/h2/H2Test.java b/instrumentation-security/jdbc-h2/src/test/java/com/nr/agent/security/instrumentation/h2/org/H2Test.java similarity index 98% rename from instrumentation-security/jdbc-h2/src/test/java/com/nr/instrumentation/org/h2/H2Test.java rename to instrumentation-security/jdbc-h2/src/test/java/com/nr/agent/security/instrumentation/h2/org/H2Test.java index 737537422..46b6a4019 100644 --- a/instrumentation-security/jdbc-h2/src/test/java/com/nr/instrumentation/org/h2/H2Test.java +++ b/instrumentation-security/jdbc-h2/src/test/java/com/nr/agent/security/instrumentation/h2/org/H2Test.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.org.h2; +package com.nr.agent.security.instrumentation.h2.org; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-h2/src/test/java/com/nr/instrumentation/security/h2/H2Test.java b/instrumentation-security/jdbc-h2/src/test/java/com/nr/agent/security/instrumentation/h2/security/H2Test.java similarity index 96% rename from instrumentation-security/jdbc-h2/src/test/java/com/nr/instrumentation/security/h2/H2Test.java rename to instrumentation-security/jdbc-h2/src/test/java/com/nr/agent/security/instrumentation/h2/security/H2Test.java index 1749f72ac..45923c873 100644 --- a/instrumentation-security/jdbc-h2/src/test/java/com/nr/instrumentation/security/h2/H2Test.java +++ b/instrumentation-security/jdbc-h2/src/test/java/com/nr/agent/security/instrumentation/h2/security/H2Test.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.h2; +package com.nr.agent.security.instrumentation.h2.security; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql1722DataStoreTest.java b/instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql1722DataStoreTest.java similarity index 98% rename from instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql1722DataStoreTest.java rename to instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql1722DataStoreTest.java index a645d4232..07413dec4 100644 --- a/instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql1722DataStoreTest.java +++ b/instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql1722DataStoreTest.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.jdbc.hs; +package com.nr.agent.security.instrumentation.jdbc.hs; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql1722DriverTest.java b/instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql1722DriverTest.java similarity index 98% rename from instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql1722DriverTest.java rename to instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql1722DriverTest.java index fff0bf50e..94d524d3c 100644 --- a/instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql1722DriverTest.java +++ b/instrumentation-security/jdbc-hsqldb-1.7.2.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql1722DriverTest.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.jdbc.hs; +package com.nr.agent.security.instrumentation.jdbc.hs; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql229DataStoreTest.java b/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql229DataStoreTest.java similarity index 98% rename from instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql229DataStoreTest.java rename to instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql229DataStoreTest.java index e485abeac..bd13e1ef7 100644 --- a/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql229DataStoreTest.java +++ b/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql229DataStoreTest.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.jdbc.hs; +package com.nr.agent.security.instrumentation.jdbc.hs; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql229DriverTest.java b/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql229DriverTest.java similarity index 98% rename from instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql229DriverTest.java rename to instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql229DriverTest.java index e0e1a947e..54fda392e 100644 --- a/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql229DriverTest.java +++ b/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql229DriverTest.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.jdbc.hs; +package com.nr.agent.security.instrumentation.jdbc.hs; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql229PoolTest.java b/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql229PoolTest.java similarity index 98% rename from instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql229PoolTest.java rename to instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql229PoolTest.java index a06096e50..83ce8b155 100644 --- a/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/instrumentation/jdbc/hs/HSql229PoolTest.java +++ b/instrumentation-security/jdbc-hsqldb-2.2.9/src/test/java/com/nr/agent/security/instrumentation/jdbc/hs/HSql229PoolTest.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.jdbc.hs; +package com.nr.agent.security.instrumentation.jdbc.hs; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/instrumentation/security/mariadb117/DataSourceTest.java b/instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb117/DataSourceTest.java similarity index 98% rename from instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/instrumentation/security/mariadb117/DataSourceTest.java rename to instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb117/DataSourceTest.java index c726bfc72..757462b40 100644 --- a/instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/instrumentation/security/mariadb117/DataSourceTest.java +++ b/instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb117/DataSourceTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mariadb117; +package com.nr.agent.security.instrumentation.jdbc.mariadb117; import ch.vorburger.mariadb4j.DB; import ch.vorburger.mariadb4j.DBConfigurationBuilder; diff --git a/instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/instrumentation/security/mariadb117/MariaDb117Test.java b/instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb117/MariaDb117Test.java similarity index 97% rename from instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/instrumentation/security/mariadb117/MariaDb117Test.java rename to instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb117/MariaDb117Test.java index 0c08fb4f4..affcf24e5 100644 --- a/instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/instrumentation/security/mariadb117/MariaDb117Test.java +++ b/instrumentation-security/jdbc-mariadb-1.1.7/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb117/MariaDb117Test.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.mariadb117; +package com.nr.agent.security.instrumentation.jdbc.mariadb117; import ch.vorburger.mariadb4j.DB; import ch.vorburger.mariadb4j.DBConfigurationBuilder; diff --git a/instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/instrumentation/security/mariadb130/DataSourceTest.java b/instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb130/DataSourceTest.java similarity index 98% rename from instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/instrumentation/security/mariadb130/DataSourceTest.java rename to instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb130/DataSourceTest.java index b121c71d1..1af644b47 100644 --- a/instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/instrumentation/security/mariadb130/DataSourceTest.java +++ b/instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb130/DataSourceTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mariadb130; +package com.nr.agent.security.instrumentation.jdbc.mariadb130; import ch.vorburger.mariadb4j.DB; import ch.vorburger.mariadb4j.DBConfigurationBuilder; diff --git a/instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/instrumentation/security/mariadb130/MariaDb130Test.java b/instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb130/MariaDb130Test.java similarity index 97% rename from instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/instrumentation/security/mariadb130/MariaDb130Test.java rename to instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb130/MariaDb130Test.java index 6000497b2..13b8e0c2c 100644 --- a/instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/instrumentation/security/mariadb130/MariaDb130Test.java +++ b/instrumentation-security/jdbc-mariadb-1.3.0/src/test/java/com/nr/agent/security/instrumentation/jdbc/mariadb130/MariaDb130Test.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.mariadb130; +package com.nr.agent.security.instrumentation.jdbc.mariadb130; import ch.vorburger.mariadb4j.DB; import ch.vorburger.mariadb4j.DBConfigurationBuilder; diff --git a/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/instrumentation/security/mysql602/MySql602DataStoreTest.java b/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql602/MySql602DataStoreTest.java similarity index 99% rename from instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/instrumentation/security/mysql602/MySql602DataStoreTest.java rename to instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql602/MySql602DataStoreTest.java index 51f4d98f5..d1f92957d 100644 --- a/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/instrumentation/security/mysql602/MySql602DataStoreTest.java +++ b/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql602/MySql602DataStoreTest.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysql602; +package com.nr.agent.security.instrumentation.jdbc.mysql602; import com.mysql.cj.fabric.jdbc.FabricMySQLDataSource; import com.mysql.cj.jdbc.MysqlConnectionPoolDataSource; diff --git a/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/instrumentation/security/mysql602/MySql602DriverTest.java b/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql602/MySql602DriverTest.java similarity index 98% rename from instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/instrumentation/security/mysql602/MySql602DriverTest.java rename to instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql602/MySql602DriverTest.java index 1fd51e20a..78c0c628e 100644 --- a/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/instrumentation/security/mysql602/MySql602DriverTest.java +++ b/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql602/MySql602DriverTest.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysql602; +package com.nr.agent.security.instrumentation.jdbc.mysql602; import com.mysql.cj.core.ConnectionString; import com.mysql.cj.jdbc.ConnectionImpl; diff --git a/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/instrumentation/security/mysql602/MySql602Test.java b/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql602/MySql602Test.java similarity index 99% rename from instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/instrumentation/security/mysql602/MySql602Test.java rename to instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql602/MySql602Test.java index 0fdece45c..3294a4e70 100644 --- a/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/instrumentation/security/mysql602/MySql602Test.java +++ b/instrumentation-security/jdbc-mysql-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql602/MySql602Test.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysql602; +package com.nr.agent.security.instrumentation.jdbc.mysql602; import com.mysql.cj.api.jdbc.JdbcConnection; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; diff --git a/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/instrumentation/security/mysql604/MySql604DataStoreTest.java b/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql604/MySql604DataStoreTest.java similarity index 99% rename from instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/instrumentation/security/mysql604/MySql604DataStoreTest.java rename to instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql604/MySql604DataStoreTest.java index 709dedc82..c217b603a 100644 --- a/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/instrumentation/security/mysql604/MySql604DataStoreTest.java +++ b/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql604/MySql604DataStoreTest.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysql604; +package com.nr.agent.security.instrumentation.jdbc.mysql604; import com.mysql.cj.fabric.jdbc.FabricMySQLDataSource; import com.mysql.cj.jdbc.MysqlConnectionPoolDataSource; diff --git a/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/instrumentation/security/mysql604/MySql604DriverTest.java b/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql604/MySql604DriverTest.java similarity index 99% rename from instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/instrumentation/security/mysql604/MySql604DriverTest.java rename to instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql604/MySql604DriverTest.java index 8d0cc691f..b23bb5e65 100644 --- a/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/instrumentation/security/mysql604/MySql604DriverTest.java +++ b/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql604/MySql604DriverTest.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysql604; +package com.nr.agent.security.instrumentation.jdbc.mysql604; import com.mysql.cj.core.conf.url.ConnectionUrl; import com.mysql.cj.core.conf.url.HostInfo; diff --git a/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/instrumentation/security/mysql604/MySql604Test.java b/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql604/MySql604Test.java similarity index 99% rename from instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/instrumentation/security/mysql604/MySql604Test.java rename to instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql604/MySql604Test.java index 3b7d53047..155476c25 100644 --- a/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/instrumentation/security/mysql604/MySql604Test.java +++ b/instrumentation-security/jdbc-mysql-6.0.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql604/MySql604Test.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysql604; +package com.nr.agent.security.instrumentation.jdbc.mysql604; import com.mysql.cj.api.jdbc.JdbcConnection; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; diff --git a/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/instrumentation/security/mysql8011/MySql8011DataStoreTest.java b/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql8011/MySql8011DataStoreTest.java similarity index 99% rename from instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/instrumentation/security/mysql8011/MySql8011DataStoreTest.java rename to instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql8011/MySql8011DataStoreTest.java index b96ddc16f..b4d84ac23 100644 --- a/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/instrumentation/security/mysql8011/MySql8011DataStoreTest.java +++ b/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql8011/MySql8011DataStoreTest.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysql8011; +package com.nr.agent.security.instrumentation.jdbc.mysql8011; import com.mysql.cj.jdbc.MysqlConnectionPoolDataSource; import com.mysql.cj.jdbc.MysqlDataSource; diff --git a/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/instrumentation/security/mysql8011/MySql8011DriverTest.java b/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql8011/MySql8011DriverTest.java similarity index 98% rename from instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/instrumentation/security/mysql8011/MySql8011DriverTest.java rename to instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql8011/MySql8011DriverTest.java index 9258946c2..4f63ad3f3 100644 --- a/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/instrumentation/security/mysql8011/MySql8011DriverTest.java +++ b/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql8011/MySql8011DriverTest.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysql8011; +package com.nr.agent.security.instrumentation.jdbc.mysql8011; import com.mysql.cj.conf.HostInfo; import com.mysql.cj.jdbc.ConnectionImpl; diff --git a/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/instrumentation/security/mysql8011/MySql8011Test.java b/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql8011/MySql8011Test.java similarity index 99% rename from instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/instrumentation/security/mysql8011/MySql8011Test.java rename to instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql8011/MySql8011Test.java index e91fef637..e82c984e3 100644 --- a/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/instrumentation/security/mysql8011/MySql8011Test.java +++ b/instrumentation-security/jdbc-mysql-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql8011/MySql8011Test.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysql8011; +package com.nr.agent.security.instrumentation.jdbc.mysql8011; import com.mysql.cj.jdbc.JdbcConnection; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; diff --git a/instrumentation-security/jdbc-mysql-connection-5.1.4/src/test/java/com/nr/instrumentation/security/mysqlconnection514/MySqlConnection514Test.java b/instrumentation-security/jdbc-mysql-connection-5.1.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysqlconnection514/MySqlConnection514Test.java similarity index 99% rename from instrumentation-security/jdbc-mysql-connection-5.1.4/src/test/java/com/nr/instrumentation/security/mysqlconnection514/MySqlConnection514Test.java rename to instrumentation-security/jdbc-mysql-connection-5.1.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysqlconnection514/MySqlConnection514Test.java index 69d3821f9..c027e8bbb 100644 --- a/instrumentation-security/jdbc-mysql-connection-5.1.4/src/test/java/com/nr/instrumentation/security/mysqlconnection514/MySqlConnection514Test.java +++ b/instrumentation-security/jdbc-mysql-connection-5.1.4/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysqlconnection514/MySqlConnection514Test.java @@ -5,7 +5,7 @@ * */ -package com.nr.instrumentation.security.mysqlconnection514; +package com.nr.agent.security.instrumentation.jdbc.mysqlconnection514; import com.mysql.jdbc.Connection; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; diff --git a/instrumentation-security/jdbc-mysql-connection-6.0.2/src/test/java/com/nr/instrumentation/security/mysqlconnection602/MySqlConnection602Test.java b/instrumentation-security/jdbc-mysql-connection-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysqlconnection602/MySqlConnection602Test.java similarity index 99% rename from instrumentation-security/jdbc-mysql-connection-6.0.2/src/test/java/com/nr/instrumentation/security/mysqlconnection602/MySqlConnection602Test.java rename to instrumentation-security/jdbc-mysql-connection-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysqlconnection602/MySqlConnection602Test.java index d8fd7ae0a..e3f3860ea 100644 --- a/instrumentation-security/jdbc-mysql-connection-6.0.2/src/test/java/com/nr/instrumentation/security/mysqlconnection602/MySqlConnection602Test.java +++ b/instrumentation-security/jdbc-mysql-connection-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysqlconnection602/MySqlConnection602Test.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysqlconnection602; +package com.nr.agent.security.instrumentation.jdbc.mysqlconnection602; import com.mysql.cj.api.jdbc.JdbcConnection; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; diff --git a/instrumentation-security/jdbc-mysql-connection-8.0.11/src/test/java/com/nr/instrumentation/security/mysqlconnection8011/MySqlConnection8011Test.java b/instrumentation-security/jdbc-mysql-connection-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysqlconnection8011/MySqlConnection8011Test.java similarity index 99% rename from instrumentation-security/jdbc-mysql-connection-8.0.11/src/test/java/com/nr/instrumentation/security/mysqlconnection8011/MySqlConnection8011Test.java rename to instrumentation-security/jdbc-mysql-connection-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysqlconnection8011/MySqlConnection8011Test.java index 02bd4b007..6b942b36b 100644 --- a/instrumentation-security/jdbc-mysql-connection-8.0.11/src/test/java/com/nr/instrumentation/security/mysqlconnection8011/MySqlConnection8011Test.java +++ b/instrumentation-security/jdbc-mysql-connection-8.0.11/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysqlconnection8011/MySqlConnection8011Test.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.mysqlconnection8011; +package com.nr.agent.security.instrumentation.jdbc.mysqlconnection8011; import com.mysql.cj.jdbc.JdbcConnection; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; diff --git a/instrumentation-security/jdbc-mysql-multihost-connections-5.1.3/src/test/java/com/nr/instrumentation/security/mysql/multihost/MysqlMultiHost513Test.java b/instrumentation-security/jdbc-mysql-multihost-connections-5.1.3/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql/multihost/MysqlMultiHost513Test.java similarity index 99% rename from instrumentation-security/jdbc-mysql-multihost-connections-5.1.3/src/test/java/com/nr/instrumentation/security/mysql/multihost/MysqlMultiHost513Test.java rename to instrumentation-security/jdbc-mysql-multihost-connections-5.1.3/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql/multihost/MysqlMultiHost513Test.java index a9aa710aa..e8989018c 100644 --- a/instrumentation-security/jdbc-mysql-multihost-connections-5.1.3/src/test/java/com/nr/instrumentation/security/mysql/multihost/MysqlMultiHost513Test.java +++ b/instrumentation-security/jdbc-mysql-multihost-connections-5.1.3/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql/multihost/MysqlMultiHost513Test.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mysql.multihost; +package com.nr.agent.security.instrumentation.jdbc.mysql.multihost; import com.mysql.fabric.jdbc.FabricMySQLDataSource; import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource; diff --git a/instrumentation-security/jdbc-mysql-multihost-connections-6.0.2/src/test/java/com/nr/instrumentation/security/mysql/multihost/MysqlMultiHost602Test.java b/instrumentation-security/jdbc-mysql-multihost-connections-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql/multihost/MysqlMultiHost602Test.java similarity index 99% rename from instrumentation-security/jdbc-mysql-multihost-connections-6.0.2/src/test/java/com/nr/instrumentation/security/mysql/multihost/MysqlMultiHost602Test.java rename to instrumentation-security/jdbc-mysql-multihost-connections-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql/multihost/MysqlMultiHost602Test.java index e31a9a1f0..d33eeaa29 100644 --- a/instrumentation-security/jdbc-mysql-multihost-connections-6.0.2/src/test/java/com/nr/instrumentation/security/mysql/multihost/MysqlMultiHost602Test.java +++ b/instrumentation-security/jdbc-mysql-multihost-connections-6.0.2/src/test/java/com/nr/agent/security/instrumentation/jdbc/mysql/multihost/MysqlMultiHost602Test.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mysql.multihost; +package com.nr.agent.security.instrumentation.jdbc.mysql.multihost; import com.mysql.cj.core.ConnectionString; import com.mysql.cj.fabric.jdbc.FabricMySQLDataSource; diff --git a/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/build.gradle b/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/build.gradle index 1faa227dc..240eb8cbb 100644 --- a/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/build.gradle +++ b/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/build.gradle @@ -3,7 +3,7 @@ dependencies { implementation("com.newrelic.agent.java:newrelic-api:${nrAPIVersion}") implementation("com.newrelic.agent.java:newrelic-weaver-api:${nrAPIVersion}") implementation("postgresql:postgresql:8.0-312.jdbc3") - testImplementation("org.testcontainers:postgresql:1.17.6") + testImplementation("ru.yandex.qatools.embed:postgresql-embedded:2.10") } jar { diff --git a/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/instrumentation/security/postgresql80312/DataStoreTest.java b/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/agent/security/instrumentation/postgresql80312/DataStoreTest.java similarity index 86% rename from instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/instrumentation/security/postgresql80312/DataStoreTest.java rename to instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/agent/security/instrumentation/postgresql80312/DataStoreTest.java index 646d0429b..413309216 100644 --- a/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/instrumentation/security/postgresql80312/DataStoreTest.java +++ b/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/agent/security/instrumentation/postgresql80312/DataStoreTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.postgresql80312; +package com.nr.agent.security.instrumentation.postgresql80312; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,8 +6,10 @@ import com.newrelic.api.agent.Trace; import com.newrelic.api.agent.security.schema.JDBCVendor; import com.newrelic.security.test.marker.Java12IncompatibleTest; +import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.FixMethodOrder; import org.junit.Test; @@ -24,32 +26,53 @@ import org.postgresql.jdbc3.Jdbc3ConnectionPool; import org.postgresql.jdbc3.Jdbc3PoolingDataSource; import org.postgresql.jdbc3.Jdbc3SimpleDataSource; -import org.testcontainers.containers.PostgreSQLContainer; +import ru.yandex.qatools.embed.postgresql.EmbeddedPostgres; +import java.io.IOException; +import java.net.ServerSocket; import java.sql.Connection; import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import static ru.yandex.qatools.embed.postgresql.distribution.Version.Main.V9_6; @Category({ Java12IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = "org.postgresql") @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class DataStoreTest { - private static final String DB_USER = "postgres"; - private static final String DB_PASSWORD = "postgres"; + public static final EmbeddedPostgres postgres = new EmbeddedPostgres(V9_6); + public static Connection connection; + private static final String DB_USER = "user"; + private static final String DB_PASSWORD = "password"; private static final String DB_NAME = "test"; - @ClassRule - public static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1") - .withDatabaseName(DB_NAME) - .withUsername(DB_USER) - .withPassword(DB_PASSWORD); + private static final String HOST = "localhost"; + private static final List QUERIES = new ArrayList<>(); + private static final int PORT = getRandomPort(); - @AfterClass - public static void cleanup() throws SQLException { - if (postgreSQLContainer != null) { - postgreSQLContainer.close(); + @BeforeClass + public static void setup() throws Exception { + QUERIES.add("CREATE TABLE IF NOT EXISTS USERS(id int primary key, first_name varchar(255), last_name varchar(255))"); + QUERIES.add("INSERT INTO USERS(id, first_name, last_name) VALUES(1, 'Max', 'Power')"); + QUERIES.add("SELECT * FROM USERS"); + + postgres.start(HOST, PORT, DB_NAME, DB_USER, DB_PASSWORD); + } + + @After + public void teardown() throws SQLException { + if (connection!=null) { + connection.close(); } } + @AfterClass + public static void stop() { + if (postgres!=null) + postgres.stop(); + } + @Test public void testGetConnectionConnectionPool() throws SQLException { callGetConnectionConnectionPool(); @@ -305,7 +328,7 @@ private void callPoolingDataSource1() throws SQLException { private void getConnection(BaseDataSource baseDataSource) throws SQLException { baseDataSource.setDatabaseName(DB_NAME); - baseDataSource.setPortNumber(postgreSQLContainer.getMappedPort(5432)); + baseDataSource.setPortNumber(PORT); Connection conn = null; try { @@ -323,7 +346,7 @@ private void getConnection1(BaseDataSource baseDataSource) throws SQLException { baseDataSource.setUser(DB_USER); baseDataSource.setPassword(DB_PASSWORD); baseDataSource.setDatabaseName(DB_NAME); - baseDataSource.setPortNumber(postgreSQLContainer.getMappedPort(5432)); + baseDataSource.setPortNumber(PORT); Connection conn = null; try { @@ -336,4 +359,16 @@ private void getConnection1(BaseDataSource baseDataSource) throws SQLException { } } } + + private static int getRandomPort() { + int port; + try { + ServerSocket socket = new ServerSocket(0); + port = socket.getLocalPort(); + socket.close(); + } catch (IOException e) { + throw new RuntimeException("Unable to allocate ephemeral port"); + } + return port; + } } diff --git a/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/instrumentation/security/postgresql80312/DriverTest.java b/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/agent/security/instrumentation/postgresql80312/DriverTest.java similarity index 56% rename from instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/instrumentation/security/postgresql80312/DriverTest.java rename to instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/agent/security/instrumentation/postgresql80312/DriverTest.java index ec8644fd1..52a165ea4 100644 --- a/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/instrumentation/security/postgresql80312/DriverTest.java +++ b/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/agent/security/instrumentation/postgresql80312/DriverTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.postgresql80312; +package com.nr.agent.security.instrumentation.postgresql80312; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,42 +6,65 @@ import com.newrelic.api.agent.Trace; import com.newrelic.api.agent.security.schema.JDBCVendor; import com.newrelic.security.test.marker.Java12IncompatibleTest; +import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; -import org.testcontainers.containers.PostgreSQLContainer; +import ru.yandex.qatools.embed.postgresql.EmbeddedPostgres; +import java.io.IOException; +import java.net.ServerSocket; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; +import static ru.yandex.qatools.embed.postgresql.distribution.Version.Main.V9_6; + @Category({ Java12IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = "org.postgresql") @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class DriverTest { - private static final String DB_USER = "postgres"; - private static final String DB_PASSWORD = "postgres"; + public static final EmbeddedPostgres postgres = new EmbeddedPostgres(V9_6); + public static Connection connection; + private static final String DB_USER = "user"; + private static final String DB_PASSWORD = "password"; private static final String DB_NAME = "test"; - @ClassRule - public static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1") - .withDatabaseName(DB_NAME) - .withUsername(DB_USER) - .withPassword(DB_PASSWORD); + private static final String HOST = "localhost"; + private static final List QUERIES = new ArrayList<>(); + private static final int PORT = getRandomPort(); - @AfterClass - public static void cleanup() throws SQLException { - if (postgreSQLContainer != null) { - postgreSQLContainer.close(); + @BeforeClass + public static void setup() throws Exception { + QUERIES.add("CREATE TABLE IF NOT EXISTS USERS(id int primary key, first_name varchar(255), last_name varchar(255))"); + QUERIES.add("INSERT INTO USERS(id, first_name, last_name) VALUES(1, 'Max', 'Power')"); + QUERIES.add("SELECT * FROM USERS"); + + postgres.start(HOST, PORT, DB_NAME, DB_USER, DB_PASSWORD); + } + + @After + public void teardown() throws SQLException { + if (connection!=null) { + connection.close(); } } + @AfterClass + public static void stop() { + if (postgres!=null) + postgres.stop(); + } + @Test public void testConnect() throws SQLException { getConnection(); @@ -65,7 +88,7 @@ private void getConnection() throws SQLException { Connection c = null; try { Class.forName("org.postgresql.Driver"); - c = DriverManager.getConnection(postgreSQLContainer.getJdbcUrl(), DB_USER, DB_PASSWORD); + c = DriverManager.getConnection(String.format("jdbc:postgresql://%s:%s/%s", HOST, PORT, DB_NAME), DB_USER, DB_PASSWORD); } catch (Exception e) { System.out.println("Error in DB connection: " + e); } finally { @@ -83,7 +106,7 @@ private void getConnection1() throws SQLException { Properties info = new Properties(); info.put("user", DB_USER); info.put("password", DB_PASSWORD); - c = DriverManager.getConnection(postgreSQLContainer.getJdbcUrl(), info); + c = DriverManager.getConnection(String.format("jdbc:postgresql://%s:%s/%s", HOST, PORT, DB_NAME), info); } catch (Exception e) { System.out.println("Error in DB connection: " + e); } finally { @@ -92,4 +115,16 @@ private void getConnection1() throws SQLException { } } } + + private static int getRandomPort() { + int port; + try { + ServerSocket socket = new ServerSocket(0); + port = socket.getLocalPort(); + socket.close(); + } catch (IOException e) { + throw new RuntimeException("Unable to allocate ephemeral port"); + } + return port; + } } diff --git a/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/instrumentation/security/postgresql80312/PgStatementTest.java b/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/agent/security/instrumentation/postgresql80312/PgStatementTest.java similarity index 83% rename from instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/instrumentation/security/postgresql80312/PgStatementTest.java rename to instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/agent/security/instrumentation/postgresql80312/PgStatementTest.java index 00955fb79..63c84079e 100644 --- a/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/instrumentation/security/postgresql80312/PgStatementTest.java +++ b/instrumentation-security/jdbc-postgresql-8.0-312.jdbc3/src/test/java/com/nr/agent/security/instrumentation/postgresql80312/PgStatementTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.postgresql80312; +package com.nr.agent.security.instrumentation.postgresql80312; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -8,18 +8,20 @@ import com.newrelic.api.agent.security.schema.VulnerabilityCaseType; import com.newrelic.api.agent.security.schema.operation.SQLOperation; import com.newrelic.security.test.marker.Java12IncompatibleTest; +import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; -import org.junit.ClassRule; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; -import org.testcontainers.containers.PostgreSQLContainer; +import ru.yandex.qatools.embed.postgresql.EmbeddedPostgres; +import java.io.IOException; import java.math.BigDecimal; +import java.net.ServerSocket; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; @@ -33,36 +35,58 @@ import java.util.List; import java.util.Map; +import static ru.yandex.qatools.embed.postgresql.distribution.Version.Main.V9_6; + @Category({ Java12IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = "org.postgresql") @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class PgStatementTest { - private static final String DB_USER = "postgres"; - private static final String DB_PASSWORD = "postgres"; + public static final EmbeddedPostgres postgres = new EmbeddedPostgres(V9_6); + public static Connection CONNECTION; + private static final String DB_USER = "user"; + private static final String DB_PASSWORD = "password"; private static final String DB_NAME = "test"; + private static final String HOST = "localhost"; private static final List QUERIES = new ArrayList<>(); - @ClassRule - public static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1") - .withDatabaseName(DB_NAME) - .withUsername(DB_USER) - .withPassword(DB_PASSWORD); - private static Connection CONNECTION; + private static final int PORT = getRandomPort(); + + @BeforeClass + public static void setup() throws Exception { + postgres.start(HOST, PORT, DB_NAME, DB_USER, DB_PASSWORD); + + getConnection(); + QUERIES.add( + "CREATE TABLE IF NOT EXISTS USERS(id int primary key, first_name varchar(255), last_name varchar(255), dob date, dot time, dotz timestamptz, active boolean, arr bytea)"); + QUERIES.add("TRUNCATE TABLE USERS"); + QUERIES.add("INSERT INTO USERS(id, first_name, last_name) VALUES(1, 'john', 'doe')"); + QUERIES.add("SELECT * FROM USERS"); + QUERIES.add("UPDATE USERS SET \"last_name\"='Doe' WHERE id=1"); + QUERIES.add( + "select * from users where id=? and id=? and id=? and id=? and id=? and id=? and first_name=? and first_name=? and id=? and dob=? and arr=? and active=? and dot=? and dotz=?"); + QUERIES.add("SELECT * FROM USERS WHERE id=?"); + + // set up data in h2 + Statement stmt = CONNECTION.createStatement(); + stmt.execute(QUERIES.get(0)); + stmt.execute(QUERIES.get(1)); + stmt.execute(QUERIES.get(2)); + stmt.close(); + } @AfterClass - public static void cleanup() throws SQLException { + public static void stop() throws SQLException { + if (postgres!=null) + postgres.stop(); if (CONNECTION != null) { CONNECTION.close(); } - if (postgreSQLContainer != null) { - postgreSQLContainer.close(); - } } public static void getConnection() { try { Class.forName("org.postgresql.Driver"); - CONNECTION = DriverManager.getConnection(postgreSQLContainer.getJdbcUrl(), DB_USER, DB_PASSWORD); + CONNECTION = DriverManager.getConnection(String.format("jdbc:postgresql://%s:%s/%s", HOST, PORT, DB_NAME), DB_USER, DB_PASSWORD); } catch (Exception e) { System.out.println("Error in DB connection: " + e); } @@ -294,4 +318,16 @@ private Map callClearParams() throws SQLException { System.out.println(params); return params; } + + private static int getRandomPort() { + int port; + try { + ServerSocket socket = new ServerSocket(0); + port = socket.getLocalPort(); + socket.close(); + } catch (IOException e) { + throw new RuntimeException("Unable to allocate ephemeral port"); + } + return port; + } } diff --git a/instrumentation-security/jdbc-postgresql-9.4.1207/build.gradle b/instrumentation-security/jdbc-postgresql-9.4.1207/build.gradle index a86e37f3e..772304e09 100644 --- a/instrumentation-security/jdbc-postgresql-9.4.1207/build.gradle +++ b/instrumentation-security/jdbc-postgresql-9.4.1207/build.gradle @@ -3,7 +3,7 @@ dependencies { implementation("com.newrelic.agent.java:newrelic-api:${nrAPIVersion}") implementation("com.newrelic.agent.java:newrelic-weaver-api:${nrAPIVersion}") implementation("org.postgresql:postgresql:9.4.1207") - testImplementation("org.testcontainers:postgresql:1.17.6") + testImplementation("ru.yandex.qatools.embed:postgresql-embedded:2.10") } jar { diff --git a/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/instrumentation/security/postgresql941207/DataStoreTest.java b/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/agent/security/instrumentation/postgresql941207/DataStoreTest.java similarity index 87% rename from instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/instrumentation/security/postgresql941207/DataStoreTest.java rename to instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/agent/security/instrumentation/postgresql941207/DataStoreTest.java index 205001b5f..f99de0c46 100644 --- a/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/instrumentation/security/postgresql941207/DataStoreTest.java +++ b/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/agent/security/instrumentation/postgresql941207/DataStoreTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.postgresql941207; +package com.nr.agent.security.instrumentation.postgresql941207; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,8 +6,10 @@ import com.newrelic.api.agent.Trace; import com.newrelic.api.agent.security.schema.JDBCVendor; import com.newrelic.security.test.marker.Java12IncompatibleTest; +import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.FixMethodOrder; import org.junit.Test; @@ -25,32 +27,53 @@ import org.postgresql.jdbc3.Jdbc3PoolingDataSource; import org.postgresql.jdbc3.Jdbc3SimpleDataSource; import org.postgresql.xa.PGXADataSource; -import org.testcontainers.containers.PostgreSQLContainer; +import ru.yandex.qatools.embed.postgresql.EmbeddedPostgres; +import java.io.IOException; +import java.net.ServerSocket; import java.sql.Connection; import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import static ru.yandex.qatools.embed.postgresql.distribution.Version.Main.V9_6; @Category({ Java12IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = "org.postgresql") @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class DataStoreTest { - private static final String DB_USER = "postgres"; - private static final String DB_PASSWORD = "postgres"; + public static final EmbeddedPostgres postgres = new EmbeddedPostgres(V9_6); + public static Connection connection; + private static final String DB_USER = "user"; + private static final String DB_PASSWORD = "password"; private static final String DB_NAME = "test"; - @ClassRule - public static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1") - .withDatabaseName(DB_NAME) - .withUsername(DB_USER) - .withPassword(DB_PASSWORD); + private static final String HOST = "localhost"; + private static final List QUERIES = new ArrayList<>(); + private static final int PORT = getRandomPort(); - @AfterClass - public static void cleanup() throws SQLException { - if (postgreSQLContainer != null) { - postgreSQLContainer.close(); + @BeforeClass + public static void setup() throws Exception { + QUERIES.add("CREATE TABLE IF NOT EXISTS USERS(id int primary key, first_name varchar(255), last_name varchar(255))"); + QUERIES.add("INSERT INTO USERS(id, first_name, last_name) VALUES(1, 'Max', 'Power')"); + QUERIES.add("SELECT * FROM USERS"); + + postgres.start(HOST, PORT, DB_NAME, DB_USER, DB_PASSWORD); + } + + @After + public void teardown() throws SQLException { + if (connection!=null) { + connection.close(); } } + @AfterClass + public static void stop() { + if (postgres!=null) + postgres.stop(); + } + @Test public void testGetConnectionConnectionPool() throws SQLException { callGetConnectionConnectionPool(); @@ -334,7 +357,7 @@ private void callPoolingDataSource1() throws SQLException { private void getConnection(BaseDataSource baseDataSource) throws SQLException { baseDataSource.setDatabaseName(DB_NAME); - baseDataSource.setPortNumber(postgreSQLContainer.getMappedPort(5432)); + baseDataSource.setPortNumber(PORT); Connection conn = null; try { @@ -352,7 +375,7 @@ private void getConnection1(BaseDataSource baseDataSource) throws SQLException { baseDataSource.setUser(DB_USER); baseDataSource.setPassword(DB_PASSWORD); baseDataSource.setDatabaseName(DB_NAME); - baseDataSource.setPortNumber(postgreSQLContainer.getMappedPort(5432)); + baseDataSource.setPortNumber(PORT); Connection conn = null; try { @@ -365,4 +388,16 @@ private void getConnection1(BaseDataSource baseDataSource) throws SQLException { } } } + + private static int getRandomPort() { + int port; + try { + ServerSocket socket = new ServerSocket(0); + port = socket.getLocalPort(); + socket.close(); + } catch (IOException e) { + throw new RuntimeException("Unable to allocate ephemeral port"); + } + return port; + } } diff --git a/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/instrumentation/security/postgresql941207/DriverTest.java b/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/agent/security/instrumentation/postgresql941207/DriverTest.java similarity index 56% rename from instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/instrumentation/security/postgresql941207/DriverTest.java rename to instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/agent/security/instrumentation/postgresql941207/DriverTest.java index 9ef624d7d..92a741464 100644 --- a/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/instrumentation/security/postgresql941207/DriverTest.java +++ b/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/agent/security/instrumentation/postgresql941207/DriverTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.postgresql941207; +package com.nr.agent.security.instrumentation.postgresql941207; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,42 +6,65 @@ import com.newrelic.api.agent.Trace; import com.newrelic.api.agent.security.schema.JDBCVendor; import com.newrelic.security.test.marker.Java12IncompatibleTest; +import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; -import org.testcontainers.containers.PostgreSQLContainer; +import ru.yandex.qatools.embed.postgresql.EmbeddedPostgres; +import java.io.IOException; +import java.net.ServerSocket; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; +import static ru.yandex.qatools.embed.postgresql.distribution.Version.Main.V9_6; + @Category({ Java12IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = "org.postgresql") @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class DriverTest { - private static final String DB_USER = "postgres"; - private static final String DB_PASSWORD = "postgres"; + public static final EmbeddedPostgres postgres = new EmbeddedPostgres(V9_6); + public static Connection connection; + private static final String DB_USER = "user"; + private static final String DB_PASSWORD = "password"; private static final String DB_NAME = "test"; - @ClassRule - public static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1") - .withDatabaseName(DB_NAME) - .withUsername(DB_USER) - .withPassword(DB_PASSWORD); + private static final String HOST = "localhost"; + private static final List QUERIES = new ArrayList<>(); + private static final int PORT = getRandomPort(); - @AfterClass - public static void cleanup() throws SQLException { - if (postgreSQLContainer != null) { - postgreSQLContainer.close(); + @BeforeClass + public static void setup() throws Exception { + QUERIES.add("CREATE TABLE IF NOT EXISTS USERS(id int primary key, first_name varchar(255), last_name varchar(255))"); + QUERIES.add("INSERT INTO USERS(id, first_name, last_name) VALUES(1, 'Max', 'Power')"); + QUERIES.add("SELECT * FROM USERS"); + + postgres.start(HOST, PORT, DB_NAME, DB_USER, DB_PASSWORD); + } + + @After + public void teardown() throws SQLException { + if (connection!=null) { + connection.close(); } } + @AfterClass + public static void stop() { + if (postgres!=null) + postgres.stop(); + } + @Test public void testConnect() throws SQLException { getConnection(); @@ -65,7 +88,7 @@ private void getConnection() throws SQLException { Connection c = null; try { Class.forName("org.postgresql.Driver"); - c = DriverManager.getConnection(postgreSQLContainer.getJdbcUrl(), DB_USER, DB_PASSWORD); + c = DriverManager.getConnection(String.format("jdbc:postgresql://%s:%s/%s", HOST, PORT, DB_NAME), DB_USER, DB_PASSWORD); } catch (Exception e) { System.out.println("Error in DB connection: " + e); } finally { @@ -83,7 +106,7 @@ private void getConnection1() throws SQLException { Properties info = new Properties(); info.put("user", DB_USER); info.put("password", DB_PASSWORD); - c = DriverManager.getConnection(postgreSQLContainer.getJdbcUrl(), info); + c = DriverManager.getConnection(String.format("jdbc:postgresql://%s:%s/%s", HOST, PORT, DB_NAME), info); } catch (Exception e) { System.out.println("Error in DB connection: " + e); } finally { @@ -92,4 +115,16 @@ private void getConnection1() throws SQLException { } } } + + private static int getRandomPort() { + int port; + try { + ServerSocket socket = new ServerSocket(0); + port = socket.getLocalPort(); + socket.close(); + } catch (IOException e) { + throw new RuntimeException("Unable to allocate ephemeral port"); + } + return port; + } } diff --git a/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/instrumentation/security/postgresql941207/PgStatementTest.java b/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/agent/security/instrumentation/postgresql941207/PgStatementTest.java similarity index 82% rename from instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/instrumentation/security/postgresql941207/PgStatementTest.java rename to instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/agent/security/instrumentation/postgresql941207/PgStatementTest.java index c33aa22b6..48b935998 100644 --- a/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/instrumentation/security/postgresql941207/PgStatementTest.java +++ b/instrumentation-security/jdbc-postgresql-9.4.1207/src/test/java/com/nr/agent/security/instrumentation/postgresql941207/PgStatementTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.postgresql941207; +package com.nr.agent.security.instrumentation.postgresql941207; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -17,9 +17,11 @@ import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; -import org.testcontainers.containers.PostgreSQLContainer; +import ru.yandex.qatools.embed.postgresql.EmbeddedPostgres; +import java.io.IOException; import java.math.BigDecimal; +import java.net.ServerSocket; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; @@ -33,36 +35,58 @@ import java.util.List; import java.util.Map; +import static ru.yandex.qatools.embed.postgresql.distribution.Version.Main.V9_6; + @Category({ Java12IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = "org.postgresql") @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class PgStatementTest { - private static final String DB_USER = "postgres"; - private static final String DB_PASSWORD = "postgres"; + public static final EmbeddedPostgres postgres = new EmbeddedPostgres(V9_6); + public static Connection CONNECTION; + private static final String DB_USER = "user"; + private static final String DB_PASSWORD = "password"; private static final String DB_NAME = "test"; + private static final String HOST = "localhost"; private static final List QUERIES = new ArrayList<>(); - @ClassRule - public static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1") - .withDatabaseName(DB_NAME) - .withUsername(DB_USER) - .withPassword(DB_PASSWORD); - private static Connection CONNECTION; + private static final int PORT = getRandomPort(); + + @BeforeClass + public static void setup() throws Exception { + postgres.start(HOST, PORT, DB_NAME, DB_USER, DB_PASSWORD); + + getConnection(); + QUERIES.add( + "CREATE TABLE IF NOT EXISTS USERS(id int primary key, first_name varchar(255), last_name varchar(255), dob date, dot time, dotz timestamptz, active boolean, arr bytea)"); + QUERIES.add("TRUNCATE TABLE USERS"); + QUERIES.add("INSERT INTO USERS(id, first_name, last_name) VALUES(1, 'john', 'doe')"); + QUERIES.add("SELECT * FROM USERS"); + QUERIES.add("UPDATE USERS SET \"last_name\"='Doe' WHERE id=1"); + QUERIES.add( + "select * from users where id=? and id=? and id=? and id=? and id=? and id=? and first_name=? and first_name=? and id=? and dob=? and arr=? and active=? and dot=? and dotz=?"); + QUERIES.add("SELECT * FROM USERS WHERE id=?"); + + // set up data in h2 + Statement stmt = CONNECTION.createStatement(); + stmt.execute(QUERIES.get(0)); + stmt.execute(QUERIES.get(1)); + stmt.execute(QUERIES.get(2)); + stmt.close(); + } @AfterClass - public static void cleanup() throws SQLException { + public static void stop() throws SQLException { + if (postgres!=null) + postgres.stop(); if (CONNECTION != null) { CONNECTION.close(); } - if (postgreSQLContainer != null) { - postgreSQLContainer.close(); - } } public static void getConnection() { try { Class.forName("org.postgresql.Driver"); - CONNECTION = DriverManager.getConnection(postgreSQLContainer.getJdbcUrl(), DB_USER, DB_PASSWORD); + CONNECTION = DriverManager.getConnection(String.format("jdbc:postgresql://%s:%s/%s", HOST, PORT, DB_NAME), DB_USER, DB_PASSWORD); } catch (Exception e) { System.out.println("Error in DB connection: " + e); } @@ -264,4 +288,16 @@ private Map callClearParams() throws SQLException { System.out.println(params); return params; } + + private static int getRandomPort() { + int port; + try { + ServerSocket socket = new ServerSocket(0); + port = socket.getLocalPort(); + socket.close(); + } catch (IOException e) { + throw new RuntimeException("Unable to allocate ephemeral port"); + } + return port; + } } diff --git a/instrumentation-security/jdbc-postgresql-9.4.1208/build.gradle b/instrumentation-security/jdbc-postgresql-9.4.1208/build.gradle index 785db9eb4..78ca1b7a8 100644 --- a/instrumentation-security/jdbc-postgresql-9.4.1208/build.gradle +++ b/instrumentation-security/jdbc-postgresql-9.4.1208/build.gradle @@ -3,7 +3,7 @@ dependencies { implementation("com.newrelic.agent.java:newrelic-api:${nrAPIVersion}") implementation("com.newrelic.agent.java:newrelic-weaver-api:${nrAPIVersion}") implementation("org.postgresql:postgresql:9.4.1208") - testImplementation("org.testcontainers:postgresql:1.17.6") + testImplementation("ru.yandex.qatools.embed:postgresql-embedded:2.10") } diff --git a/instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/instrumentation/security/postgresql941208/DataStoreTest.java b/instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/agent/security/instrumentation/postgresql941208/DataStoreTest.java similarity index 87% rename from instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/instrumentation/security/postgresql941208/DataStoreTest.java rename to instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/agent/security/instrumentation/postgresql941208/DataStoreTest.java index eabbcb966..336e52ad7 100644 --- a/instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/instrumentation/security/postgresql941208/DataStoreTest.java +++ b/instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/agent/security/instrumentation/postgresql941208/DataStoreTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.postgresql941208; +package com.nr.agent.security.instrumentation.postgresql941208; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,8 +6,10 @@ import com.newrelic.api.agent.Trace; import com.newrelic.api.agent.security.schema.JDBCVendor; import com.newrelic.security.test.marker.Java12IncompatibleTest; +import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.FixMethodOrder; import org.junit.Test; @@ -25,32 +27,53 @@ import org.postgresql.jdbc3.Jdbc3PoolingDataSource; import org.postgresql.jdbc3.Jdbc3SimpleDataSource; import org.postgresql.xa.PGXADataSource; -import org.testcontainers.containers.PostgreSQLContainer; +import ru.yandex.qatools.embed.postgresql.EmbeddedPostgres; +import java.io.IOException; +import java.net.ServerSocket; import java.sql.Connection; import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import static ru.yandex.qatools.embed.postgresql.distribution.Version.Main.V9_6; @Category({ Java12IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = "org.postgresql") @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class DataStoreTest { - private static final String DB_USER = "postgres"; - private static final String DB_PASSWORD = "postgres"; + public static final EmbeddedPostgres postgres = new EmbeddedPostgres(V9_6); + public static Connection connection; + private static final String DB_USER = "user"; + private static final String DB_PASSWORD = "password"; private static final String DB_NAME = "test"; - @ClassRule - public static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1") - .withDatabaseName(DB_NAME) - .withUsername(DB_USER) - .withPassword(DB_PASSWORD); + private static final String HOST = "localhost"; + private static final List QUERIES = new ArrayList<>(); + private static final int PORT = getRandomPort(); - @AfterClass - public static void cleanup() throws SQLException { - if (postgreSQLContainer != null) { - postgreSQLContainer.close(); + @BeforeClass + public static void setup() throws Exception { + QUERIES.add("CREATE TABLE IF NOT EXISTS USERS(id int primary key, first_name varchar(255), last_name varchar(255))"); + QUERIES.add("INSERT INTO USERS(id, first_name, last_name) VALUES(1, 'Max', 'Power')"); + QUERIES.add("SELECT * FROM USERS"); + + postgres.start(HOST, PORT, DB_NAME, DB_USER, DB_PASSWORD); + } + + @After + public void teardown() throws SQLException { + if (connection!=null) { + connection.close(); } } + @AfterClass + public static void stop() { + if (postgres!=null) + postgres.stop(); + } + @Test public void testGetConnectionConnectionPool() throws SQLException { callGetConnectionConnectionPool(); @@ -334,7 +357,7 @@ private void callPoolingDataSource1() throws SQLException { private void getConnection(BaseDataSource baseDataSource) throws SQLException { baseDataSource.setDatabaseName(DB_NAME); - baseDataSource.setPortNumber(postgreSQLContainer.getMappedPort(5432)); + baseDataSource.setPortNumber(PORT); Connection conn = null; try { @@ -352,7 +375,7 @@ private void getConnection1(BaseDataSource baseDataSource) throws SQLException { baseDataSource.setUser(DB_USER); baseDataSource.setPassword(DB_PASSWORD); baseDataSource.setDatabaseName(DB_NAME); - baseDataSource.setPortNumber(postgreSQLContainer.getMappedPort(5432)); + baseDataSource.setPortNumber(PORT); Connection conn = null; try { @@ -365,4 +388,16 @@ private void getConnection1(BaseDataSource baseDataSource) throws SQLException { } } } + + private static int getRandomPort() { + int port; + try { + ServerSocket socket = new ServerSocket(0); + port = socket.getLocalPort(); + socket.close(); + } catch (IOException e) { + throw new RuntimeException("Unable to allocate ephemeral port"); + } + return port; + } } diff --git a/instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/instrumentation/security/postgresql941208/DriverTest.java b/instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/agent/security/instrumentation/postgresql941208/DriverTest.java similarity index 55% rename from instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/instrumentation/security/postgresql941208/DriverTest.java rename to instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/agent/security/instrumentation/postgresql941208/DriverTest.java index 7258bd1ce..1dc172a07 100644 --- a/instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/instrumentation/security/postgresql941208/DriverTest.java +++ b/instrumentation-security/jdbc-postgresql-9.4.1208/src/test/java/com/nr/agent/security/instrumentation/postgresql941208/DriverTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.postgresql941208; +package com.nr.agent.security.instrumentation.postgresql941208; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,42 +6,66 @@ import com.newrelic.api.agent.Trace; import com.newrelic.api.agent.security.schema.JDBCVendor; import com.newrelic.security.test.marker.Java12IncompatibleTest; +import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; -import org.testcontainers.containers.PostgreSQLContainer; +import ru.yandex.qatools.embed.postgresql.EmbeddedPostgres; +import java.io.IOException; +import java.net.ServerSocket; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; +import static ru.yandex.qatools.embed.postgresql.distribution.Version.Main.V9_6; +import static ru.yandex.qatools.embed.postgresql.distribution.Version.V11_1; + @Category({ Java12IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) @InstrumentationTestConfig(includePrefixes = "org.postgresql") @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class DriverTest { - private static final String DB_USER = "postgres"; - private static final String DB_PASSWORD = "postgres"; + public static final EmbeddedPostgres postgres = new EmbeddedPostgres(V9_6); + public static Connection connection; + private static final String DB_USER = "user"; + private static final String DB_PASSWORD = "password"; private static final String DB_NAME = "test"; - @ClassRule - public static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1") - .withDatabaseName(DB_NAME) - .withUsername(DB_USER) - .withPassword(DB_PASSWORD); + private static final String HOST = "localhost"; + private static final List QUERIES = new ArrayList<>(); + private static final int PORT = getRandomPort(); - @AfterClass - public static void cleanup() throws SQLException { - if (postgreSQLContainer != null) { - postgreSQLContainer.close(); + @BeforeClass + public static void setup() throws Exception { + QUERIES.add("CREATE TABLE IF NOT EXISTS USERS(id int primary key, first_name varchar(255), last_name varchar(255))"); + QUERIES.add("INSERT INTO USERS(id, first_name, last_name) VALUES(1, 'Max', 'Power')"); + QUERIES.add("SELECT * FROM USERS"); + + postgres.start(HOST, PORT, DB_NAME, DB_USER, DB_PASSWORD); + } + + @After + public void teardown() throws SQLException { + if (connection!=null) { + connection.close(); } } + @AfterClass + public static void stop() { + if (postgres!=null) + postgres.stop(); + } + @Test public void testConnect() throws SQLException { getConnection(); @@ -65,7 +89,7 @@ private void getConnection() throws SQLException { Connection c = null; try { Class.forName("org.postgresql.Driver"); - c = DriverManager.getConnection(postgreSQLContainer.getJdbcUrl(), DB_USER, DB_PASSWORD); + c = DriverManager.getConnection(String.format("jdbc:postgresql://%s:%s/%s", HOST, PORT, DB_NAME), DB_USER, DB_PASSWORD); } catch (Exception e) { System.out.println("Error in DB connection: " + e); } finally { @@ -83,7 +107,7 @@ private void getConnection1() throws SQLException { Properties info = new Properties(); info.put("user", DB_USER); info.put("password", DB_PASSWORD); - c = DriverManager.getConnection(postgreSQLContainer.getJdbcUrl(), info); + c = DriverManager.getConnection(String.format("jdbc:postgresql://%s:%s/%s", HOST, PORT, DB_NAME), info); } catch (Exception e) { System.out.println("Error in DB connection: " + e); } finally { @@ -92,4 +116,16 @@ private void getConnection1() throws SQLException { } } } + + private static int getRandomPort() { + int port; + try { + ServerSocket socket = new ServerSocket(0); + port = socket.getLocalPort(); + socket.close(); + } catch (IOException e) { + throw new RuntimeException("Unable to allocate ephemeral port"); + } + return port; + } } diff --git a/instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/ContextHandler_Instrumentation.java b/instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/ContextHandler_Instrumentation.java similarity index 96% rename from instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/ContextHandler_Instrumentation.java rename to instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/ContextHandler_Instrumentation.java index 43ac58d7e..734ad779c 100644 --- a/instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/ContextHandler_Instrumentation.java +++ b/instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/ContextHandler_Instrumentation.java @@ -1,4 +1,4 @@ -package security.org.eclipse.jetty11.server; +package com.newrelic.agent.security.instrumentation.jetty11; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; diff --git a/instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/Handler_Instrumentation.java b/instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/Handler_Instrumentation.java similarity index 91% rename from instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/Handler_Instrumentation.java rename to instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/Handler_Instrumentation.java index 0eb6c3e48..1b602cd9d 100644 --- a/instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/Handler_Instrumentation.java +++ b/instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/Handler_Instrumentation.java @@ -1,4 +1,4 @@ -package security.org.eclipse.jetty11.server; +package com.newrelic.agent.security.instrumentation.jetty11; import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper; import com.newrelic.api.agent.weaver.MatchType; diff --git a/instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/HttpServletHelper.java b/instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/HttpServletHelper.java similarity index 99% rename from instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/HttpServletHelper.java rename to instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/HttpServletHelper.java index bc1b55fde..20e96bcc1 100644 --- a/instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/HttpServletHelper.java +++ b/instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/HttpServletHelper.java @@ -1,4 +1,4 @@ -package security.org.eclipse.jetty11.server; +package com.newrelic.agent.security.instrumentation.jetty11; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; diff --git a/instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/Server_Instrumentation.java b/instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/Server_Instrumentation.java similarity index 97% rename from instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/Server_Instrumentation.java rename to instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/Server_Instrumentation.java index 82787e6a5..30c3a7b86 100644 --- a/instrumentation-security/jetty-11/src/main/java/security/org/eclipse/jetty11/server/Server_Instrumentation.java +++ b/instrumentation-security/jetty-11/src/main/java/com/newrelic/agent/security/instrumentation/jetty11/Server_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package security.org.eclipse.jetty11.server; +package com.newrelic.agent.security.instrumentation.jetty11; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; diff --git a/instrumentation-security/jetty-11/src/test/java/com/nr/instrumetation/security/jetty11/ServerTest.java b/instrumentation-security/jetty-11/src/test/java/com/nr/agent/security/instrumentation/jetty11/ServerTest.java similarity index 98% rename from instrumentation-security/jetty-11/src/test/java/com/nr/instrumetation/security/jetty11/ServerTest.java rename to instrumentation-security/jetty-11/src/test/java/com/nr/agent/security/instrumentation/jetty11/ServerTest.java index 4a9782d75..71a73dd60 100644 --- a/instrumentation-security/jetty-11/src/test/java/com/nr/instrumetation/security/jetty11/ServerTest.java +++ b/instrumentation-security/jetty-11/src/test/java/com/nr/agent/security/instrumentation/jetty11/ServerTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumetation.security.jetty11; +package com.nr.agent.security.instrumentation.jetty11; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -9,7 +9,7 @@ import com.newrelic.api.agent.security.schema.AgentMetaData; import com.newrelic.api.agent.security.schema.VulnerabilityCaseType; import com.newrelic.api.agent.security.schema.operation.RXSSOperation; -import security.org.eclipse.jetty11.server.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.jetty11.HttpServletHelper; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; @@ -35,7 +35,7 @@ @FixMethodOrder(MethodSorters.NAME_ASCENDING) @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"security.org.eclipse.jetty11"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.jetty11"}) public class ServerTest { public final static int PORT = getRandomPort(); public final static String ENDPOINT = String.format("http://localhost:%d/", PORT); diff --git a/instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/ContextHandler_Instrumentation.java b/instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/ContextHandler_Instrumentation.java similarity index 96% rename from instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/ContextHandler_Instrumentation.java rename to instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/ContextHandler_Instrumentation.java index ce32bfcc6..10e5b07ac 100644 --- a/instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/ContextHandler_Instrumentation.java +++ b/instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/ContextHandler_Instrumentation.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jetty9; +package com.newrelic.agent.security.instrumentation.jetty9; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; diff --git a/instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/Handler_Instrumentation.java b/instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/Handler_Instrumentation.java similarity index 92% rename from instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/Handler_Instrumentation.java rename to instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/Handler_Instrumentation.java index cb18e75f3..0d4f095ed 100644 --- a/instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/Handler_Instrumentation.java +++ b/instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/Handler_Instrumentation.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jetty9; +package com.newrelic.agent.security.instrumentation.jetty9; import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper; import com.newrelic.api.agent.weaver.MatchType; diff --git a/instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/HttpServletHelper.java b/instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/HttpServletHelper.java similarity index 99% rename from instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/HttpServletHelper.java rename to instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/HttpServletHelper.java index 4a0335e1d..68089011e 100644 --- a/instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/HttpServletHelper.java +++ b/instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/HttpServletHelper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jetty9; +package com.newrelic.agent.security.instrumentation.jetty9; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; diff --git a/instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/Server_Instrumentation.java b/instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/Server_Instrumentation.java similarity index 95% rename from instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/Server_Instrumentation.java rename to instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/Server_Instrumentation.java index 27cf63429..d3f632687 100644 --- a/instrumentation-security/jetty-9/src/main/java/com/nr/instrumentation/security/jetty9/Server_Instrumentation.java +++ b/instrumentation-security/jetty-9/src/main/java/com/newrelic/agent/security/instrumentation/jetty9/Server_Instrumentation.java @@ -5,12 +5,11 @@ * */ -package com.nr.instrumentation.security.jetty9; +package com.newrelic.agent.security.instrumentation.jetty9; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.jetty9.HttpServletHelper; import org.eclipse.jetty.server.HttpChannel; import javax.servlet.http.HttpServletRequest; diff --git a/instrumentation-security/jetty-9/src/test/java/com/nr/instrumetation/security/jetty9/ServerTest.java b/instrumentation-security/jetty-9/src/test/java/com/nr/agent/security/instrumentation/jetty9/ServerTest.java similarity index 98% rename from instrumentation-security/jetty-9/src/test/java/com/nr/instrumetation/security/jetty9/ServerTest.java rename to instrumentation-security/jetty-9/src/test/java/com/nr/agent/security/instrumentation/jetty9/ServerTest.java index 5e84afaca..4ff76d7cc 100644 --- a/instrumentation-security/jetty-9/src/test/java/com/nr/instrumetation/security/jetty9/ServerTest.java +++ b/instrumentation-security/jetty-9/src/test/java/com/nr/agent/security/instrumentation/jetty9/ServerTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumetation.security.jetty9; +package com.nr.agent.security.instrumentation.jetty9; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -9,7 +9,7 @@ import com.newrelic.api.agent.security.schema.AgentMetaData; import com.newrelic.api.agent.security.schema.VulnerabilityCaseType; import com.newrelic.api.agent.security.schema.operation.RXSSOperation; -import com.nr.instrumentation.security.jetty9.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.jetty9.HttpServletHelper; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; @@ -35,7 +35,7 @@ @FixMethodOrder(MethodSorters.NAME_ASCENDING) @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"org.eclipse.jetty", "com.nr.instrumentation.security.jetty9"}) +@InstrumentationTestConfig(includePrefixes = {"org.eclipse.jetty", "com.newrelic.agent.security.instrumentation.jetty9"}) public class ServerTest { public final static int PORT = getRandomPort(); public final static String ENDPOINT = String.format("http://localhost:%d/", PORT); diff --git a/instrumentation-security/jsp-2.4/src/test/java/com/nr/instrumentation/security/jsp24/HttpJspPageTest.java b/instrumentation-security/jsp-2.4/src/test/java/com/nr/agent/security/instrumentation/jsp24/HttpJspPageTest.java similarity index 98% rename from instrumentation-security/jsp-2.4/src/test/java/com/nr/instrumentation/security/jsp24/HttpJspPageTest.java rename to instrumentation-security/jsp-2.4/src/test/java/com/nr/agent/security/instrumentation/jsp24/HttpJspPageTest.java index bb2064b27..d79bce835 100644 --- a/instrumentation-security/jsp-2.4/src/test/java/com/nr/instrumentation/security/jsp24/HttpJspPageTest.java +++ b/instrumentation-security/jsp-2.4/src/test/java/com/nr/agent/security/instrumentation/jsp24/HttpJspPageTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jsp24; +package com.nr.agent.security.instrumentation.jsp24; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/jsp-3/src/test/java/com/nr/instrumentation/security/jsp24/HttpJspPageTest.java b/instrumentation-security/jsp-3/src/test/java/com/nr/agent/security/instrumentation/jsp3/HttpJspPageTest.java similarity index 98% rename from instrumentation-security/jsp-3/src/test/java/com/nr/instrumentation/security/jsp24/HttpJspPageTest.java rename to instrumentation-security/jsp-3/src/test/java/com/nr/agent/security/instrumentation/jsp3/HttpJspPageTest.java index 987540bae..53417a1e4 100644 --- a/instrumentation-security/jsp-3/src/test/java/com/nr/instrumentation/security/jsp24/HttpJspPageTest.java +++ b/instrumentation-security/jsp-3/src/test/java/com/nr/agent/security/instrumentation/jsp3/HttpJspPageTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.jsp24; +package com.nr.agent.security.instrumentation.jsp3; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/ldaptive-1.0/src/main/java/com/nr/instrumentation/security/ldaptive1x/ldap/LDAPUtils.java b/instrumentation-security/ldaptive-1.0/src/main/java/com/newrelic/agent/security/instrumentation/ldaptive1/LDAPUtils.java similarity index 73% rename from instrumentation-security/ldaptive-1.0/src/main/java/com/nr/instrumentation/security/ldaptive1x/ldap/LDAPUtils.java rename to instrumentation-security/ldaptive-1.0/src/main/java/com/newrelic/agent/security/instrumentation/ldaptive1/LDAPUtils.java index 949e86bf9..eab7249d6 100644 --- a/instrumentation-security/ldaptive-1.0/src/main/java/com/nr/instrumentation/security/ldaptive1x/ldap/LDAPUtils.java +++ b/instrumentation-security/ldaptive-1.0/src/main/java/com/newrelic/agent/security/instrumentation/ldaptive1/LDAPUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.ldaptive1x.ldap; +package com.newrelic.agent.security.instrumentation.ldaptive1; public class LDAPUtils { diff --git a/instrumentation-security/ldaptive-1.0/src/main/java/org/ldaptive/AbstractOperation_Instrumentation.java b/instrumentation-security/ldaptive-1.0/src/main/java/org/ldaptive/AbstractOperation_Instrumentation.java index a11303b41..dd3f53175 100644 --- a/instrumentation-security/ldaptive-1.0/src/main/java/org/ldaptive/AbstractOperation_Instrumentation.java +++ b/instrumentation-security/ldaptive-1.0/src/main/java/org/ldaptive/AbstractOperation_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.ldaptive1x.ldap.LDAPUtils; +import com.newrelic.agent.security.instrumentation.ldaptive1.LDAPUtils; @Weave(type = MatchType.BaseClass, originalName = "org.ldaptive.AbstractOperation") public abstract class AbstractOperation_Instrumentation diff --git a/instrumentation-security/ldaptive-1.0/src/test/java/com/nr/instrumentation/security/ldaptive1/AbstractOperationTest.java b/instrumentation-security/ldaptive-1.0/src/test/java/com/nr/agent/security/instrumentation/ldaptive1/AbstractOperationTest.java similarity index 99% rename from instrumentation-security/ldaptive-1.0/src/test/java/com/nr/instrumentation/security/ldaptive1/AbstractOperationTest.java rename to instrumentation-security/ldaptive-1.0/src/test/java/com/nr/agent/security/instrumentation/ldaptive1/AbstractOperationTest.java index 2385b545e..c5fc66f28 100644 --- a/instrumentation-security/ldaptive-1.0/src/test/java/com/nr/instrumentation/security/ldaptive1/AbstractOperationTest.java +++ b/instrumentation-security/ldaptive-1.0/src/test/java/com/nr/agent/security/instrumentation/ldaptive1/AbstractOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.ldaptive1; +package com.nr.agent.security.instrumentation.ldaptive1; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -29,7 +29,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "org.ldaptive", "com.nr.instrumentation.security.apache.ldap.LDAPUtils" }) +@InstrumentationTestConfig(includePrefixes = { "org.ldaptive", "com.newrelic.agent.security.instrumentation.ldaptive1.LDAPUtils" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class AbstractOperationTest { public static final String DOMAIN_DSN = "dc=example,dc=com"; diff --git a/instrumentation-security/ldaptive-2.0/src/main/java/com/nr/instrumentation/security/ldaptive2x/ldap/LDAPUtils.java b/instrumentation-security/ldaptive-2.0/src/main/java/com/newrelic/agent/security/instrumentation/ldaptive2/LDAPUtils.java similarity index 86% rename from instrumentation-security/ldaptive-2.0/src/main/java/com/nr/instrumentation/security/ldaptive2x/ldap/LDAPUtils.java rename to instrumentation-security/ldaptive-2.0/src/main/java/com/newrelic/agent/security/instrumentation/ldaptive2/LDAPUtils.java index 552454fe3..6752f85e7 100644 --- a/instrumentation-security/ldaptive-2.0/src/main/java/com/nr/instrumentation/security/ldaptive2x/ldap/LDAPUtils.java +++ b/instrumentation-security/ldaptive-2.0/src/main/java/com/newrelic/agent/security/instrumentation/ldaptive2/LDAPUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.ldaptive2x.ldap; +package com.newrelic.agent.security.instrumentation.ldaptive2; public class LDAPUtils { diff --git a/instrumentation-security/ldaptive-2.0/src/main/java/org/ldaptive/AbstractOperation_Instrumentation.java b/instrumentation-security/ldaptive-2.0/src/main/java/org/ldaptive/AbstractOperation_Instrumentation.java index 4fe106756..920eaafc3 100644 --- a/instrumentation-security/ldaptive-2.0/src/main/java/org/ldaptive/AbstractOperation_Instrumentation.java +++ b/instrumentation-security/ldaptive-2.0/src/main/java/org/ldaptive/AbstractOperation_Instrumentation.java @@ -8,7 +8,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.ldaptive2x.ldap.LDAPUtils; +import com.newrelic.agent.security.instrumentation.ldaptive2.LDAPUtils; import org.ldaptive.filter.Filter; @Weave(type = MatchType.BaseClass, originalName = "org.ldaptive.AbstractOperation") diff --git a/instrumentation-security/ldaptive-2.0/src/main/java/org/ldaptive/filter/FilterParser_Instrumentation.java b/instrumentation-security/ldaptive-2.0/src/main/java/org/ldaptive/filter/FilterParser_Instrumentation.java index 219a3af25..b41f10ef2 100644 --- a/instrumentation-security/ldaptive-2.0/src/main/java/org/ldaptive/filter/FilterParser_Instrumentation.java +++ b/instrumentation-security/ldaptive-2.0/src/main/java/org/ldaptive/filter/FilterParser_Instrumentation.java @@ -7,7 +7,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.ldaptive2x.ldap.LDAPUtils; +import com.newrelic.agent.security.instrumentation.ldaptive2.LDAPUtils; @Weave(type = MatchType.ExactClass, originalName = "org.ldaptive.filter.FilterParser") public final class FilterParser_Instrumentation { diff --git a/instrumentation-security/ldaptive-2.0/src/test/java/com/nr/instrumentation/security/ldaptive2/AbstractOperationTest.java b/instrumentation-security/ldaptive-2.0/src/test/java/com/nr/agent/security/instrumentation/ldaptive2/AbstractOperationTest.java similarity index 99% rename from instrumentation-security/ldaptive-2.0/src/test/java/com/nr/instrumentation/security/ldaptive2/AbstractOperationTest.java rename to instrumentation-security/ldaptive-2.0/src/test/java/com/nr/agent/security/instrumentation/ldaptive2/AbstractOperationTest.java index 31696eba5..95d195c4f 100644 --- a/instrumentation-security/ldaptive-2.0/src/test/java/com/nr/instrumentation/security/ldaptive2/AbstractOperationTest.java +++ b/instrumentation-security/ldaptive-2.0/src/test/java/com/nr/agent/security/instrumentation/ldaptive2/AbstractOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.ldaptive2; +package com.nr.agent.security.instrumentation.ldaptive2; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -29,7 +29,7 @@ @Category({ Java8IncompatibleTest.class, Java9IncompatibleTest.class }) @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "org.ldaptive", "com.nr.instrumentation.security.apache.ldap.LDAPUtils" }) +@InstrumentationTestConfig(includePrefixes = { "org.ldaptive", "com.newrelic.agent.security.instrumentation.ldaptive2.LDAPUtils" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class AbstractOperationTest { public static final String DOMAIN_DSN = "dc=example,dc=com"; diff --git a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/RandomUtils.java b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/RandomUtils.java similarity index 79% rename from instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/RandomUtils.java rename to instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/RandomUtils.java index bf4c5d368..634fc0abb 100644 --- a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/RandomUtils.java +++ b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/RandomUtils.java @@ -1,4 +1,4 @@ -package com.nr.agent.security.random; +package com.newrelic.agent.security.instrumentation.random; public class RandomUtils { public static final String SECURE_RANDOM = "SECURERANDOM"; diff --git a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/io/File_Instrumentation.java b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/io/File_Instrumentation.java similarity index 88% rename from instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/io/File_Instrumentation.java rename to instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/io/File_Instrumentation.java index ce9893321..f325419ae 100644 --- a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/io/File_Instrumentation.java +++ b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/io/File_Instrumentation.java @@ -1,6 +1,5 @@ -package com.nr.agent.security.random.java.io; +package com.newrelic.agent.security.instrumentation.random.java.io; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.FileHelper; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; @@ -14,9 +13,6 @@ import java.util.ArrayList; import java.util.List; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.BaseClass, originalName = "java.io.File") public abstract class File_Instrumentation { public abstract String getName(); @@ -25,7 +21,7 @@ public abstract class File_Instrumentation { public boolean exists() { boolean isFileLockAcquired = acquireFileLockIfPossible(); - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); AbstractOperation operation = null; if (isOwaspHookEnabled && isFileLockAcquired && !FileHelper.skipExistsEvent(this.getName()) && LowSeverityHelper.isOwaspHookProcessingNeeded()) { @@ -35,7 +31,9 @@ public boolean exists() { try { returnVal = Weaver.callOriginal(); } finally { - registerExitOperation(isFileLockAcquired, operation); + if (isOwaspHookEnabled) { + registerExitOperation(isFileLockAcquired, operation); + } if (isFileLockAcquired) { releaseFileLock(); } diff --git a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/security/KeyPairGenerator_Instrumentation.java b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/security/KeyPairGenerator_Instrumentation.java similarity index 86% rename from instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/security/KeyPairGenerator_Instrumentation.java rename to instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/security/KeyPairGenerator_Instrumentation.java index 623c9952e..c9be47777 100644 --- a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/security/KeyPairGenerator_Instrumentation.java +++ b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/security/KeyPairGenerator_Instrumentation.java @@ -1,6 +1,5 @@ -package com.nr.agent.security.random.java.security; +package com.newrelic.agent.security.instrumentation.random.java.security; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; import com.newrelic.api.agent.security.schema.AbstractOperation; @@ -16,14 +15,11 @@ import java.security.KeyPairGenerator; import java.security.Provider; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.ExactClass, originalName = "java.security.KeyPairGenerator") public class KeyPairGenerator_Instrumentation { public static KeyPairGenerator getInstance(String algorithm) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, StringUtils.EMPTY, KeyPairGenerator.class.getName(), "getInstance", "KEYPAIRGENERATOR"); } @@ -40,7 +36,7 @@ public static KeyPairGenerator getInstance(String algorithm) { public static KeyPairGenerator getInstance(String algorithm, String provider) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, provider, KeyPairGenerator.class.getName(), "getInstance", "KEYPAIRGENERATOR"); } @@ -57,7 +53,7 @@ public static KeyPairGenerator getInstance(String algorithm, String provider) { public static KeyPairGenerator getInstance(String algorithm, Provider provider) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, provider.getClass().getSimpleName(), KeyPairGenerator.class.getName(), "getInstance", "KEYPAIRGENERATOR"); } diff --git a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/security/MessageDigest_Instrumentation.java b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/security/MessageDigest_Instrumentation.java similarity index 86% rename from instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/security/MessageDigest_Instrumentation.java rename to instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/security/MessageDigest_Instrumentation.java index a78485ee3..11a525a63 100644 --- a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/security/MessageDigest_Instrumentation.java +++ b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/security/MessageDigest_Instrumentation.java @@ -1,6 +1,5 @@ -package com.nr.agent.security.random.java.security; +package com.newrelic.agent.security.instrumentation.random.java.security; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; import com.newrelic.api.agent.security.schema.AbstractOperation; @@ -15,15 +14,12 @@ import java.security.MessageDigest; import java.security.Provider; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.ExactClass, originalName = "java.security.MessageDigest") public class MessageDigest_Instrumentation { public static MessageDigest getInstance(String algorithm) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, StringUtils.EMPTY, MessageDigest.class.getName(), "getInstance"); } @@ -40,7 +36,7 @@ public static MessageDigest getInstance(String algorithm) { public static MessageDigest getInstance(String algorithm, String provider) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, provider, MessageDigest.class.getName(), "getInstance"); } @@ -57,7 +53,7 @@ public static MessageDigest getInstance(String algorithm, String provider) { public static MessageDigest getInstance(String algorithm, Provider provider) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, provider.getClass().getSimpleName(), MessageDigest.class.getName(), "getInstance"); } diff --git a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/util/Random_Instrumentation.java b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/util/Random_Instrumentation.java similarity index 85% rename from instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/util/Random_Instrumentation.java rename to instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/util/Random_Instrumentation.java index a7baa9c38..32864dd7e 100644 --- a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/java/util/Random_Instrumentation.java +++ b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/java/util/Random_Instrumentation.java @@ -1,6 +1,5 @@ -package com.nr.agent.security.random.java.util; +package com.newrelic.agent.security.instrumentation.random.java.util; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; @@ -11,14 +10,12 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.random.RandomUtils; +import com.newrelic.agent.security.instrumentation.random.RandomUtils; import java.security.SecureRandom; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; -import static com.nr.agent.security.random.RandomUtils.SECURE_RANDOM; -import static com.nr.agent.security.random.RandomUtils.WEAK_RANDOM; +import static com.newrelic.agent.security.instrumentation.random.RandomUtils.SECURE_RANDOM; +import static com.newrelic.agent.security.instrumentation.random.RandomUtils.WEAK_RANDOM; @Weave(type = MatchType.BaseClass, originalName = "java.util.Random") public class Random_Instrumentation { @@ -26,7 +23,7 @@ public class Random_Instrumentation { public int nextInt() { boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(getClass().getName(), "nextInt"); @@ -48,7 +45,7 @@ public int nextInt() { public int nextInt(int bound) { boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(getClass().getName(), "nextInt"); @@ -70,7 +67,7 @@ public int nextInt(int bound) { public void nextBytes(byte[] bytes) { boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(getClass().getName(), "nextBytes"); @@ -90,7 +87,7 @@ public void nextBytes(byte[] bytes) { public long nextLong() { boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(getClass().getName(), "nextLong"); @@ -112,7 +109,7 @@ public long nextLong() { public float nextFloat() { boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(getClass().getName(), "nextFloat"); @@ -134,7 +131,7 @@ public float nextFloat() { public double nextDouble() { boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(getClass().getName(), "nextDouble"); @@ -156,7 +153,7 @@ public double nextDouble() { public double nextGaussian() { boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(getClass().getName(), "nextGaussian"); @@ -178,7 +175,7 @@ public double nextGaussian() { public boolean nextBoolean() { boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(getClass().getName(), "nextBoolean"); diff --git a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/javax/crypto/Cipher_Instrumentation.java b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/javax/crypto/Cipher_Instrumentation.java similarity index 87% rename from instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/javax/crypto/Cipher_Instrumentation.java rename to instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/javax/crypto/Cipher_Instrumentation.java index 68012dcb9..eb9b7eb51 100644 --- a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/javax/crypto/Cipher_Instrumentation.java +++ b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/javax/crypto/Cipher_Instrumentation.java @@ -1,6 +1,5 @@ -package com.nr.agent.security.random.javax.crypto; +package com.newrelic.agent.security.instrumentation.random.javax.crypto; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; import com.newrelic.api.agent.security.schema.AbstractOperation; @@ -15,14 +14,11 @@ import java.security.Provider; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.ExactClass, originalName = "javax.crypto.Cipher") public class Cipher_Instrumentation { public static final Cipher_Instrumentation getInstance(String algorithm) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, StringUtils.EMPTY, Cipher_Instrumentation.class.getName(), "getInstance", "CIPHER"); } @@ -39,7 +35,7 @@ public static final Cipher_Instrumentation getInstance(String algorithm) { public static final Cipher_Instrumentation getInstance(String transformation, Provider provider) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(transformation, provider.getClass().getSimpleName(), Cipher_Instrumentation.class.getName(), "getInstance", "CIPHER"); } diff --git a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/javax/crypto/KeyGenerator_Instrumentation.java b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/javax/crypto/KeyGenerator_Instrumentation.java similarity index 86% rename from instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/javax/crypto/KeyGenerator_Instrumentation.java rename to instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/javax/crypto/KeyGenerator_Instrumentation.java index 8e06d7c91..60ced71d5 100644 --- a/instrumentation-security/low-priority-instrumentation/src/main/java/com/nr/agent/security/random/javax/crypto/KeyGenerator_Instrumentation.java +++ b/instrumentation-security/low-priority-instrumentation/src/main/java/com/newrelic/agent/security/instrumentation/random/javax/crypto/KeyGenerator_Instrumentation.java @@ -1,6 +1,5 @@ -package com.nr.agent.security.random.javax.crypto; +package com.newrelic.agent.security.instrumentation.random.javax.crypto; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; import com.newrelic.api.agent.security.schema.AbstractOperation; @@ -15,14 +14,11 @@ import java.security.Provider; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.ExactClass, originalName = "javax.crypto.KeyGenerator") public class KeyGenerator_Instrumentation { public static final KeyGenerator_Instrumentation getInstance(String algorithm) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, StringUtils.EMPTY, KeyGenerator_Instrumentation.class.getName(), "getInstance", "KEYGENERATOR"); } @@ -39,7 +35,7 @@ public static final KeyGenerator_Instrumentation getInstance(String algorithm) { public static final KeyGenerator_Instrumentation getInstance(String algorithm, String provider) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, provider, KeyGenerator_Instrumentation.class.getName(), "getInstance", "KEYGENERATOR"); } @@ -56,7 +52,7 @@ public static final KeyGenerator_Instrumentation getInstance(String algorithm, S public static final KeyGenerator_Instrumentation getInstance(String algorithm, Provider provider) { AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ operation = preprocessSecurityHook(algorithm, provider.getClass().getSimpleName(), KeyGenerator_Instrumentation.class.getName(), "getInstance", "KEYGENERATOR"); } diff --git a/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/security/agent/crypto/KeyPairGeneratorTest.java b/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/agent/security/instrumentation/random/KeyPairGeneratorTest.java similarity index 96% rename from instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/security/agent/crypto/KeyPairGeneratorTest.java rename to instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/agent/security/instrumentation/random/KeyPairGeneratorTest.java index 1e2525372..ffa159037 100644 --- a/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/security/agent/crypto/KeyPairGeneratorTest.java +++ b/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/agent/security/instrumentation/random/KeyPairGeneratorTest.java @@ -1,4 +1,4 @@ -package com.nr.security.agent.crypto; +package com.nr.agent.security.instrumentation.random; import com.fasterxml.jackson.core.JsonProcessingException; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; @@ -21,7 +21,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.nr.agent.security.random" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.agent.security.instrumentation.random" }) public class KeyPairGeneratorTest { @Test diff --git a/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/security/agent/crypto/MessageDigestTest.java b/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/agent/security/instrumentation/random/MessageDigestTest.java similarity index 97% rename from instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/security/agent/crypto/MessageDigestTest.java rename to instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/agent/security/instrumentation/random/MessageDigestTest.java index 59edf4f72..3351f726e 100644 --- a/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/security/agent/crypto/MessageDigestTest.java +++ b/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/agent/security/instrumentation/random/MessageDigestTest.java @@ -1,4 +1,4 @@ -package com.nr.security.agent.crypto; +package com.nr.agent.security.instrumentation.random; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -25,7 +25,7 @@ import java.util.concurrent.ThreadLocalRandom; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.nr.agent.security.random" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.agent.security.instrumentation.random" }) public class MessageDigestTest { @BeforeClass diff --git a/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/security/agent/crypto/RandomTest.java b/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/agent/security/instrumentation/random/RandomTest.java similarity index 98% rename from instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/security/agent/crypto/RandomTest.java rename to instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/agent/security/instrumentation/random/RandomTest.java index c7e9258c2..0925a53ef 100644 --- a/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/security/agent/crypto/RandomTest.java +++ b/instrumentation-security/low-priority-instrumentation/src/test/java/com/nr/agent/security/instrumentation/random/RandomTest.java @@ -1,4 +1,4 @@ -package com.nr.security.agent.crypto; +package com.nr.agent.security.instrumentation.random; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -26,7 +26,7 @@ import java.util.concurrent.ThreadLocalRandom; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "com.nr.agent.security.random") +@InstrumentationTestConfig(includePrefixes = "com.newrelic.agent.security.instrumentation.random") public class RandomTest { private static final String SECURE_RANDOM = "SECURERANDOM"; private static final String WEAK_RANDOM = "WEAKRANDOM"; diff --git a/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java b/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java index 883922773..10277e0a2 100644 --- a/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java +++ b/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java @@ -7,7 +7,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; import org.bson.BsonDocument; @Weave(type = MatchType.ExactClass, originalName = "com.mongodb.operation.CommandReadOperation") diff --git a/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java b/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java index a89719d7f..9f28527d2 100644 --- a/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java +++ b/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java @@ -7,7 +7,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; import org.bson.BsonDocument; @Weave(type = MatchType.ExactClass, originalName = "com.mongodb.operation.CommandWriteOperation") diff --git a/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/OperationExecutor_Instrumentation.java b/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/OperationExecutor_Instrumentation.java index 104770676..e015d6805 100644 --- a/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/OperationExecutor_Instrumentation.java +++ b/instrumentation-security/mongodb-3.0/src/main/java/com/mongodb/operation/OperationExecutor_Instrumentation.java @@ -1,24 +1,13 @@ package com.mongodb.operation; import com.mongodb.ReadPreference; -import com.mongodb.bulk.DeleteRequest; -import com.mongodb.bulk.InsertRequest; -import com.mongodb.bulk.UpdateRequest; -import com.mongodb.bulk.WriteRequest; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.security.schema.AbstractOperation; -import com.newrelic.api.agent.security.schema.exceptions.NewRelicSecurityException; -import com.newrelic.api.agent.security.schema.operation.NoSQLOperation; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; -import org.bson.BsonDocument; - -import java.util.ArrayList; -import java.util.List; -import java.util.function.Predicate; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; @Weave(type = MatchType.Interface, originalName = "com.mongodb.operation.OperationExecutor") public abstract class OperationExecutor_Instrumentation { diff --git a/instrumentation-security/mongodb-3.0/src/main/java/com/nr/agent/security/mongo/MongoUtil.java b/instrumentation-security/mongodb-3.0/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java similarity index 99% rename from instrumentation-security/mongodb-3.0/src/main/java/com/nr/agent/security/mongo/MongoUtil.java rename to instrumentation-security/mongodb-3.0/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java index ed832c007..422b8bd5e 100644 --- a/instrumentation-security/mongodb-3.0/src/main/java/com/nr/agent/security/mongo/MongoUtil.java +++ b/instrumentation-security/mongodb-3.0/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.mongo; +package com.newrelic.agent.security.instrumentation.mongo; import com.mongodb.bulk.DeleteRequest; import com.mongodb.bulk.InsertRequest; diff --git a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb/operation/OperationExecutorDBTest.java b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb/operation/OperationExecutorDBTest.java similarity index 99% rename from instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb/operation/OperationExecutorDBTest.java rename to instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb/operation/OperationExecutorDBTest.java index 6d4f5bd90..ce4473bed 100644 --- a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb/operation/OperationExecutorDBTest.java +++ b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb/operation/OperationExecutorDBTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb.operation; +package com.nr.agent.security.instrumentation.mongodb.operation; import com.fasterxml.jackson.core.JsonProcessingException; import com.mongodb.AggregationOptions; @@ -46,7 +46,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.mongodb.operation", "com.nr.agent.security.mongo" }) +@InstrumentationTestConfig(includePrefixes = { "com.mongodb.operation", "com.newrelic.agent.security.instrumentation.mongo" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class OperationExecutorDBTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); diff --git a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb/operation/OperationExecutorMongoDatabaseTest.java b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb/operation/OperationExecutorMongoDatabaseTest.java similarity index 99% rename from instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb/operation/OperationExecutorMongoDatabaseTest.java rename to instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb/operation/OperationExecutorMongoDatabaseTest.java index 09c507a72..a1c045e5b 100644 --- a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb/operation/OperationExecutorMongoDatabaseTest.java +++ b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb/operation/OperationExecutorMongoDatabaseTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb.operation; +package com.nr.agent.security.instrumentation.mongodb.operation; import com.mongodb.DBObject; import com.mongodb.MongoClient; @@ -53,7 +53,7 @@ @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.newrelic.agent.security.instrumentation.mongo"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class OperationExecutorMongoDatabaseTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); diff --git a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/CommandReadOperationTest.java b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/CommandReadOperationTest.java similarity index 97% rename from instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/CommandReadOperationTest.java rename to instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/CommandReadOperationTest.java index 2d63552da..ecfd781e2 100644 --- a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/CommandReadOperationTest.java +++ b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/CommandReadOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb30.operation; +package com.nr.agent.security.instrumentation.mongodb30.operation; import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; @@ -10,7 +10,6 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.VulnerabilityCaseType; import com.newrelic.api.agent.security.schema.operation.NoSQLOperation; -import de.flapdoodle.embed.mongo.Command; import de.flapdoodle.embed.mongo.MongodExecutable; import de.flapdoodle.embed.mongo.MongodProcess; import de.flapdoodle.embed.mongo.MongodStarter; @@ -31,12 +30,11 @@ import org.junit.Test; import org.junit.runner.RunWith; -import java.io.IOException; import java.util.ArrayList; import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.newrelic.agent.security.instrumentation.mongo"}) public class CommandReadOperationTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); private static MongodExecutable mongodExecutable; diff --git a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/CommandWriteOperationTest.java b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/CommandWriteOperationTest.java similarity index 97% rename from instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/CommandWriteOperationTest.java rename to instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/CommandWriteOperationTest.java index 63ae885aa..950b098b4 100644 --- a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/CommandWriteOperationTest.java +++ b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/CommandWriteOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb30.operation; +package com.nr.agent.security.instrumentation.mongodb30.operation; import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; @@ -11,7 +11,6 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.VulnerabilityCaseType; import com.newrelic.api.agent.security.schema.operation.NoSQLOperation; -import de.flapdoodle.embed.mongo.Command; import de.flapdoodle.embed.mongo.MongodExecutable; import de.flapdoodle.embed.mongo.MongodProcess; import de.flapdoodle.embed.mongo.MongodStarter; @@ -33,12 +32,11 @@ import org.junit.Test; import org.junit.runner.RunWith; -import java.io.IOException; import java.util.ArrayList; import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.newrelic.agent.security.instrumentation.mongo"}) public class CommandWriteOperationTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); private static MongodExecutable mongodExecutable; diff --git a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/DBPerson.java b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/DBPerson.java similarity index 91% rename from instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/DBPerson.java rename to instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/DBPerson.java index f2d9463af..b31ddcd31 100644 --- a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/DBPerson.java +++ b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/DBPerson.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb37.client.internal; +package com.nr.agent.security.instrumentation.mongodb30.operation; import org.bson.Document; diff --git a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/DBPersonCodec.java b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/DBPersonCodec.java similarity index 93% rename from instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/DBPersonCodec.java rename to instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/DBPersonCodec.java index d04fce0b8..a57a0b200 100644 --- a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/DBPersonCodec.java +++ b/instrumentation-security/mongodb-3.0/src/test/java/com/nr/agent/security/instrumentation/mongodb30/operation/DBPersonCodec.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb37.client.internal; +package com.nr.agent.security.instrumentation.mongodb30.operation; import org.bson.BsonReader; import org.bson.BsonWriter; diff --git a/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/OperationExecutor_Instrumentation.java b/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/OperationExecutor_Instrumentation.java index a118f36f9..de1f5f831 100644 --- a/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/OperationExecutor_Instrumentation.java +++ b/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/OperationExecutor_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; @Weave(type = MatchType.Interface, originalName = "com.mongodb.OperationExecutor") abstract class OperationExecutor_Instrumentation { diff --git a/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java b/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java index 883922773..10277e0a2 100644 --- a/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java +++ b/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java @@ -7,7 +7,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; import org.bson.BsonDocument; @Weave(type = MatchType.ExactClass, originalName = "com.mongodb.operation.CommandReadOperation") diff --git a/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java b/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java index a89719d7f..9f28527d2 100644 --- a/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java +++ b/instrumentation-security/mongodb-3.6/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java @@ -7,7 +7,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; import org.bson.BsonDocument; @Weave(type = MatchType.ExactClass, originalName = "com.mongodb.operation.CommandWriteOperation") diff --git a/instrumentation-security/mongodb-3.6/src/main/java/com/nr/agent/security/mongo/MongoUtil.java b/instrumentation-security/mongodb-3.6/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java similarity index 99% rename from instrumentation-security/mongodb-3.6/src/main/java/com/nr/agent/security/mongo/MongoUtil.java rename to instrumentation-security/mongodb-3.6/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java index 698729fc1..6c53e0ca2 100644 --- a/instrumentation-security/mongodb-3.6/src/main/java/com/nr/agent/security/mongo/MongoUtil.java +++ b/instrumentation-security/mongodb-3.6/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.mongo; +package com.newrelic.agent.security.instrumentation.mongo; import com.mongodb.bulk.DeleteRequest; import com.mongodb.bulk.InsertRequest; diff --git a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/CommandReadOperationTest.java b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/CommandReadOperationTest.java similarity index 98% rename from instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/CommandReadOperationTest.java rename to instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/CommandReadOperationTest.java index 23321b97f..15f042af3 100644 --- a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/CommandReadOperationTest.java +++ b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/CommandReadOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb36.operation; +package com.nr.agent.security.instrumentation.mongo36; import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; @@ -34,7 +34,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb","com.newrelic.agent.security.instrumentation.mongo"}) public class CommandReadOperationTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); private static MongodExecutable mongodExecutable; diff --git a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/CommandWriteOperationTest.java b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/CommandWriteOperationTest.java similarity index 98% rename from instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/CommandWriteOperationTest.java rename to instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/CommandWriteOperationTest.java index 3ff269ef5..6ffbd7060 100644 --- a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/CommandWriteOperationTest.java +++ b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/CommandWriteOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb36.operation; +package com.nr.agent.security.instrumentation.mongo36; import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; @@ -34,7 +34,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb","com.newrelic.agent.security.instrumentation.mongo"}) public class CommandWriteOperationTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); private static MongodExecutable mongodExecutable; diff --git a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/DBPerson.java b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/DBPerson.java similarity index 91% rename from instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/DBPerson.java rename to instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/DBPerson.java index fd4425a2b..cda6a5b3d 100644 --- a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/DBPerson.java +++ b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/DBPerson.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb30.operation; +package com.nr.agent.security.instrumentation.mongo36; import org.bson.Document; diff --git a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/DBPersonCodec.java b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/DBPersonCodec.java similarity index 94% rename from instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/DBPersonCodec.java rename to instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/DBPersonCodec.java index 800f7adde..0d501ff6f 100644 --- a/instrumentation-security/mongodb-3.0/src/test/java/com/nr/instrumentation/security/mongodb30/operation/DBPersonCodec.java +++ b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/DBPersonCodec.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb30.operation; +package com.nr.agent.security.instrumentation.mongo36; import org.bson.BsonReader; import org.bson.BsonWriter; diff --git a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/OperationExecutorDBTest.java b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/OperationExecutorDBTest.java similarity index 99% rename from instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/OperationExecutorDBTest.java rename to instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/OperationExecutorDBTest.java index 947b5a53a..81d708b7f 100644 --- a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/OperationExecutorDBTest.java +++ b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/OperationExecutorDBTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb36.operation; +package com.nr.agent.security.instrumentation.mongo36; import com.fasterxml.jackson.core.JsonProcessingException; import com.mongodb.AggregationOptions; @@ -44,7 +44,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.mongodb", "com.nr.agent.security.mongo" }) +@InstrumentationTestConfig(includePrefixes = { "com.mongodb", "com.newrelic.agent.security.instrumentation.mongo" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class OperationExecutorDBTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); diff --git a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/OperationExecutorMongoDatabaseTest.java b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/OperationExecutorMongoDatabaseTest.java similarity index 99% rename from instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/OperationExecutorMongoDatabaseTest.java rename to instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/OperationExecutorMongoDatabaseTest.java index 88217f851..c6cfceeda 100644 --- a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/OperationExecutorMongoDatabaseTest.java +++ b/instrumentation-security/mongodb-3.6/src/test/java/com/nr/agent/security/instrumentation/mongo36/OperationExecutorMongoDatabaseTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb36.operation; +package com.nr.agent.security.instrumentation.mongo36; import com.mongodb.DBObject; import com.mongodb.MongoClient; @@ -51,7 +51,7 @@ @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb","com.newrelic.agent.security.instrumentation.mongo"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class OperationExecutorMongoDatabaseTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); diff --git a/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/client/internal/OperationExecutor_Instrumentation.java b/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/client/internal/OperationExecutor_Instrumentation.java index 314abc89b..f9e2664c1 100644 --- a/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/client/internal/OperationExecutor_Instrumentation.java +++ b/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/client/internal/OperationExecutor_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; @Weave(type = MatchType.Interface, originalName = "com.mongodb.client.internal.OperationExecutor") public abstract class OperationExecutor_Instrumentation { diff --git a/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java b/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java index 883922773..10277e0a2 100644 --- a/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java +++ b/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java @@ -7,7 +7,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; import org.bson.BsonDocument; @Weave(type = MatchType.ExactClass, originalName = "com.mongodb.operation.CommandReadOperation") diff --git a/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java b/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java index a89719d7f..9f28527d2 100644 --- a/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java +++ b/instrumentation-security/mongodb-3.7/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java @@ -7,7 +7,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; import org.bson.BsonDocument; @Weave(type = MatchType.ExactClass, originalName = "com.mongodb.operation.CommandWriteOperation") diff --git a/instrumentation-security/mongodb-3.7/src/main/java/com/nr/agent/security/mongo/MongoUtil.java b/instrumentation-security/mongodb-3.7/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java similarity index 99% rename from instrumentation-security/mongodb-3.7/src/main/java/com/nr/agent/security/mongo/MongoUtil.java rename to instrumentation-security/mongodb-3.7/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java index cb11dd128..e36df9aa5 100644 --- a/instrumentation-security/mongodb-3.7/src/main/java/com/nr/agent/security/mongo/MongoUtil.java +++ b/instrumentation-security/mongodb-3.7/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.mongo; +package com.newrelic.agent.security.instrumentation.mongo; import com.mongodb.bulk.DeleteRequest; import com.mongodb.bulk.InsertRequest; diff --git a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/CommandReadOperationTest.java b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/CommandReadOperationTest.java similarity index 97% rename from instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/CommandReadOperationTest.java rename to instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/CommandReadOperationTest.java index 8efe08956..c7b94a657 100644 --- a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/CommandReadOperationTest.java +++ b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/CommandReadOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb37.client.internal; +package com.nr.agent.security.instrumentation.mongo37; import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; @@ -36,7 +36,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.mongodb.client.internal","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.mongodb.client.internal","com.newrelic.agent.security.instrumentation.mongo"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class CommandReadOperationTest { diff --git a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/CommandWriteOperationTest.java b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/CommandWriteOperationTest.java similarity index 97% rename from instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/CommandWriteOperationTest.java rename to instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/CommandWriteOperationTest.java index b7abfc00c..6276cd242 100644 --- a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/CommandWriteOperationTest.java +++ b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/CommandWriteOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb37.client.internal; +package com.nr.agent.security.instrumentation.mongo37; import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; @@ -37,7 +37,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb.client.internal","com.mongodb.operation","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb.client.internal","com.mongodb.operation","com.newrelic.agent.security.instrumentation.mongo"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class CommandWriteOperationTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); diff --git a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/DBPerson.java b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/DBPerson.java similarity index 91% rename from instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/DBPerson.java rename to instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/DBPerson.java index 4cf8445d1..303d368fe 100644 --- a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/DBPerson.java +++ b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/DBPerson.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb36.operation; +package com.nr.agent.security.instrumentation.mongo37; import org.bson.Document; diff --git a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/DBPersonCodec.java b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/DBPersonCodec.java similarity index 94% rename from instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/DBPersonCodec.java rename to instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/DBPersonCodec.java index 090b0ee06..7397a9a91 100644 --- a/instrumentation-security/mongodb-3.6/src/test/java/com/nr/instrumentation/security/mongodb36/operation/DBPersonCodec.java +++ b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/DBPersonCodec.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb36.operation; +package com.nr.agent.security.instrumentation.mongo37; import org.bson.BsonReader; import org.bson.BsonWriter; diff --git a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/OperationExecutorDBTest.java b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/OperationExecutorDBTest.java similarity index 99% rename from instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/OperationExecutorDBTest.java rename to instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/OperationExecutorDBTest.java index e14c3ef48..b7015d4ef 100644 --- a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/OperationExecutorDBTest.java +++ b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/OperationExecutorDBTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb37.client.internal; +package com.nr.agent.security.instrumentation.mongo37; import com.fasterxml.jackson.core.JsonProcessingException; import com.mongodb.AggregationOptions; @@ -45,7 +45,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.mongodb.client.internal", "com.nr.agent.security.mongo", "com.mongodb.operation" }) +@InstrumentationTestConfig(includePrefixes = { "com.mongodb.client.internal", "com.newrelic.agent.security.instrumentation.mongo", "com.mongodb.operation" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class OperationExecutorDBTest { diff --git a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/OperationExecutorMongoDatabaseTest.java b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/OperationExecutorMongoDatabaseTest.java similarity index 99% rename from instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/OperationExecutorMongoDatabaseTest.java rename to instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/OperationExecutorMongoDatabaseTest.java index 406fd4b5c..857f716b8 100644 --- a/instrumentation-security/mongodb-3.7/src/test/java/com/nr/instrumentation/security/mongodb37/client/internal/OperationExecutorMongoDatabaseTest.java +++ b/instrumentation-security/mongodb-3.7/src/test/java/com/nr/agent/security/instrumentation/mongo37/OperationExecutorMongoDatabaseTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb37.client.internal; +package com.nr.agent.security.instrumentation.mongo37; import com.mongodb.DBObject; import com.mongodb.MongoClient; @@ -50,7 +50,7 @@ import static com.mongodb.client.model.Filters.eq; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb.client.internal","com.nr.agent.security.mongo","com.mongodb.operation"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb.client.internal","com.newrelic.agent.security.instrumentation.mongo","com.mongodb.operation"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class OperationExecutorMongoDatabaseTest { diff --git a/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/client/internal/OperationExecutor_Instrumentation.java b/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/client/internal/OperationExecutor_Instrumentation.java index 25b746a96..1603840d7 100644 --- a/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/client/internal/OperationExecutor_Instrumentation.java +++ b/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/client/internal/OperationExecutor_Instrumentation.java @@ -12,7 +12,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; @Weave(type = MatchType.Interface, originalName = "com.mongodb.client.internal.OperationExecutor") public abstract class OperationExecutor_Instrumentation { diff --git a/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java b/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java index 883922773..10277e0a2 100644 --- a/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java +++ b/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/operation/CommandReadOperation_Instrumentation.java @@ -7,7 +7,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; import org.bson.BsonDocument; @Weave(type = MatchType.ExactClass, originalName = "com.mongodb.operation.CommandReadOperation") diff --git a/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java b/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java index a89719d7f..9f28527d2 100644 --- a/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java +++ b/instrumentation-security/mongodb-3.8/src/main/java/com/mongodb/operation/CommandWriteOperation_Instrumentation.java @@ -7,7 +7,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.MongoUtil; +import com.newrelic.agent.security.instrumentation.mongo.MongoUtil; import org.bson.BsonDocument; @Weave(type = MatchType.ExactClass, originalName = "com.mongodb.operation.CommandWriteOperation") diff --git a/instrumentation-security/mongodb-3.8/src/main/java/com/nr/agent/security/mongo/MongoUtil.java b/instrumentation-security/mongodb-3.8/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java similarity index 99% rename from instrumentation-security/mongodb-3.8/src/main/java/com/nr/agent/security/mongo/MongoUtil.java rename to instrumentation-security/mongodb-3.8/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java index dc7f0f0ae..233da1e3f 100644 --- a/instrumentation-security/mongodb-3.8/src/main/java/com/nr/agent/security/mongo/MongoUtil.java +++ b/instrumentation-security/mongodb-3.8/src/main/java/com/newrelic/agent/security/instrumentation/mongo/MongoUtil.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.security.mongo; +package com.newrelic.agent.security.instrumentation.mongo; import com.mongodb.bulk.DeleteRequest; import com.mongodb.bulk.InsertRequest; diff --git a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/client/internal/OperationExecutorDBTest.java b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/client/internal/OperationExecutorDBTest.java similarity index 99% rename from instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/client/internal/OperationExecutorDBTest.java rename to instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/client/internal/OperationExecutorDBTest.java index 643b987ae..76ed02bff 100644 --- a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/client/internal/OperationExecutorDBTest.java +++ b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/client/internal/OperationExecutorDBTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb38.client.internal; +package com.nr.agent.security.instrumentation.mongo38.client.internal; import com.fasterxml.jackson.core.JsonProcessingException; import com.mongodb.AggregationOptions; @@ -45,7 +45,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb.client.internal","com.mongodb.operation","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb.client.internal","com.mongodb.operation","com.newrelic.agent.security.instrumentation.mongo"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class OperationExecutorDBTest { diff --git a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/client/internal/OperationExecutorMongoDatabaseTest.java b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/client/internal/OperationExecutorMongoDatabaseTest.java similarity index 99% rename from instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/client/internal/OperationExecutorMongoDatabaseTest.java rename to instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/client/internal/OperationExecutorMongoDatabaseTest.java index 0b7555bbf..00ae4359b 100644 --- a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/client/internal/OperationExecutorMongoDatabaseTest.java +++ b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/client/internal/OperationExecutorMongoDatabaseTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb38.client.internal; +package com.nr.agent.security.instrumentation.mongo38.client.internal; import com.mongodb.DBObject; import com.mongodb.MongoClient; @@ -50,7 +50,7 @@ import static com.mongodb.client.model.Filters.eq; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb.client.internal","com.mongodb.operation","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb.client.internal","com.mongodb.operation","com.newrelic.agent.security.instrumentation.mongo"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class OperationExecutorMongoDatabaseTest { diff --git a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/CommandReadOperationTest.java b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/CommandReadOperationTest.java similarity index 97% rename from instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/CommandReadOperationTest.java rename to instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/CommandReadOperationTest.java index ad1ffe465..7f010eb99 100644 --- a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/CommandReadOperationTest.java +++ b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/CommandReadOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb38.operation; +package com.nr.agent.security.instrumentation.mongo38.operation; import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; @@ -36,7 +36,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb.operation","com.newrelic.agent.security.instrumentation.mongo"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class CommandReadOperationTest { diff --git a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/CommandWriteOperationTest.java b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/CommandWriteOperationTest.java similarity index 98% rename from instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/CommandWriteOperationTest.java rename to instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/CommandWriteOperationTest.java index b0c456002..8e4c7a74b 100644 --- a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/CommandWriteOperationTest.java +++ b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/CommandWriteOperationTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb38.operation; +package com.nr.agent.security.instrumentation.mongo38.operation; import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; @@ -36,7 +36,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.mongodb", "com.nr.agent.security.mongo"}) +@InstrumentationTestConfig(includePrefixes = {"com.mongodb", "com.newrelic.agent.security.instrumentation.mongo"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class CommandWriteOperationTest { private static final MongodStarter mongodStarter = MongodStarter.getDefaultInstance(); diff --git a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/DBPerson.java b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/DBPerson.java similarity index 93% rename from instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/DBPerson.java rename to instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/DBPerson.java index 3d32c1680..2092e80db 100644 --- a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/DBPerson.java +++ b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/DBPerson.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb38.operation; +package com.nr.agent.security.instrumentation.mongo38.operation; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/DBPersonCodec.java b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/DBPersonCodec.java similarity index 94% rename from instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/DBPersonCodec.java rename to instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/DBPersonCodec.java index ee5939bc8..20d2b33f3 100644 --- a/instrumentation-security/mongodb-3.8/src/test/java/com/nr/instrumentation/security/mongodb38/operation/DBPersonCodec.java +++ b/instrumentation-security/mongodb-3.8/src/test/java/com/nr/agent/security/instrumentation/mongo38/operation/DBPersonCodec.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.mongodb38.operation; +package com.nr.agent.security.instrumentation.mongo38.operation; import org.bson.BsonReader; import org.bson.BsonWriter; diff --git a/instrumentation-security/nashorn-jsinjection/src/main/java/com/nr/agent/security/jsinjection/nashorn/JSEngineUtils.java b/instrumentation-security/nashorn-jsinjection/src/main/java/com/newrelic/agent/security/instrumentation/nashorn/JSEngineUtils.java similarity index 80% rename from instrumentation-security/nashorn-jsinjection/src/main/java/com/nr/agent/security/jsinjection/nashorn/JSEngineUtils.java rename to instrumentation-security/nashorn-jsinjection/src/main/java/com/newrelic/agent/security/instrumentation/nashorn/JSEngineUtils.java index 292c2a1ca..91cf08230 100644 --- a/instrumentation-security/nashorn-jsinjection/src/main/java/com/nr/agent/security/jsinjection/nashorn/JSEngineUtils.java +++ b/instrumentation-security/nashorn-jsinjection/src/main/java/com/newrelic/agent/security/instrumentation/nashorn/JSEngineUtils.java @@ -1,4 +1,4 @@ -package com.nr.agent.security.jsinjection.nashorn; +package com.newrelic.agent.security.instrumentation.nashorn; public class JSEngineUtils { diff --git a/instrumentation-security/nashorn-jsinjection/src/main/java/jdk/nashorn/api/scripting/NashornScriptEngine_Instrumentation.java b/instrumentation-security/nashorn-jsinjection/src/main/java/jdk/nashorn/api/scripting/NashornScriptEngine_Instrumentation.java index 1361121ba..fff18cba3 100644 --- a/instrumentation-security/nashorn-jsinjection/src/main/java/jdk/nashorn/api/scripting/NashornScriptEngine_Instrumentation.java +++ b/instrumentation-security/nashorn-jsinjection/src/main/java/jdk/nashorn/api/scripting/NashornScriptEngine_Instrumentation.java @@ -9,9 +9,8 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.jsinjection.nashorn.JSEngineUtils; +import com.newrelic.agent.security.instrumentation.nashorn.JSEngineUtils; import jdk.nashorn.internal.objects.Global; -import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData; import jdk.nashorn.internal.runtime.ScriptFunction_Instrumentation; import jdk.nashorn.internal.runtime.Source; diff --git a/instrumentation-security/nashorn-jsinjection/src/main/java/jdk/nashorn/internal/runtime/ScriptFunction_Instrumentation.java b/instrumentation-security/nashorn-jsinjection/src/main/java/jdk/nashorn/internal/runtime/ScriptFunction_Instrumentation.java index e8b1461a7..6b4cfde83 100644 --- a/instrumentation-security/nashorn-jsinjection/src/main/java/jdk/nashorn/internal/runtime/ScriptFunction_Instrumentation.java +++ b/instrumentation-security/nashorn-jsinjection/src/main/java/jdk/nashorn/internal/runtime/ScriptFunction_Instrumentation.java @@ -1,11 +1,9 @@ package jdk.nashorn.internal.runtime; import com.newrelic.api.agent.security.NewRelicSecurity; -import com.newrelic.api.agent.security.schema.StringUtils; import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.NewField; import com.newrelic.api.agent.weaver.Weave; -import com.nr.agent.security.jsinjection.nashorn.JSEngineUtils; +import com.newrelic.agent.security.instrumentation.nashorn.JSEngineUtils; import jdk.nashorn.internal.objects.Global; @Weave(type = MatchType.ExactClass, originalName = "jdk.nashorn.internal.runtime.ScriptFunction") diff --git a/instrumentation-security/nashorn-jsinjection/src/test/java/com/nr/agent/instrumentation/nashorn/NashornScriptEngineTest.java b/instrumentation-security/nashorn-jsinjection/src/test/java/com/nr/agent/security/instrumentation/nashorn/NashornScriptEngineTest.java similarity index 99% rename from instrumentation-security/nashorn-jsinjection/src/test/java/com/nr/agent/instrumentation/nashorn/NashornScriptEngineTest.java rename to instrumentation-security/nashorn-jsinjection/src/test/java/com/nr/agent/security/instrumentation/nashorn/NashornScriptEngineTest.java index 3e21f6306..d37b1d0e3 100644 --- a/instrumentation-security/nashorn-jsinjection/src/test/java/com/nr/agent/instrumentation/nashorn/NashornScriptEngineTest.java +++ b/instrumentation-security/nashorn-jsinjection/src/test/java/com/nr/agent/security/instrumentation/nashorn/NashornScriptEngineTest.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.nashorn; +package com.nr.agent.security.instrumentation.nashorn; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/okhttp-3.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp30/internal/OkhttpHelper.java b/instrumentation-security/okhttp-3.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp30/OkhttpHelper.java similarity index 98% rename from instrumentation-security/okhttp-3.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp30/internal/OkhttpHelper.java rename to instrumentation-security/okhttp-3.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp30/OkhttpHelper.java index dd694ec90..4897c5b1e 100644 --- a/instrumentation-security/okhttp-3.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp30/internal/OkhttpHelper.java +++ b/instrumentation-security/okhttp-3.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp30/OkhttpHelper.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.security.okhttp30.internal; +package com.newrelic.agent.security.instrumentation.okhttp30; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; diff --git a/instrumentation-security/okhttp-3.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp30/internal/RealCall_Instrumentation.java b/instrumentation-security/okhttp-3.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp30/RealCall_Instrumentation.java similarity index 98% rename from instrumentation-security/okhttp-3.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp30/internal/RealCall_Instrumentation.java rename to instrumentation-security/okhttp-3.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp30/RealCall_Instrumentation.java index 98e967ebb..87f484803 100644 --- a/instrumentation-security/okhttp-3.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp30/internal/RealCall_Instrumentation.java +++ b/instrumentation-security/okhttp-3.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp30/RealCall_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.security.okhttp30.internal; +package com.newrelic.agent.security.instrumentation.okhttp30; import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.weaver.MatchType; diff --git a/instrumentation-security/okhttp-3.0.0/src/test/java/com/nr/instrumentation/security/okhttp30/RealCallTest.java b/instrumentation-security/okhttp-3.0.0/src/test/java/com/nr/agent/security/instrumentation/okhttp30/RealCallTest.java similarity index 95% rename from instrumentation-security/okhttp-3.0.0/src/test/java/com/nr/instrumentation/security/okhttp30/RealCallTest.java rename to instrumentation-security/okhttp-3.0.0/src/test/java/com/nr/agent/security/instrumentation/okhttp30/RealCallTest.java index 764b39f3c..c79089e2f 100644 --- a/instrumentation-security/okhttp-3.0.0/src/test/java/com/nr/instrumentation/security/okhttp30/RealCallTest.java +++ b/instrumentation-security/okhttp-3.0.0/src/test/java/com/nr/agent/security/instrumentation/okhttp30/RealCallTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.okhttp30; +package com.nr.agent.security.instrumentation.okhttp30; import com.newrelic.agent.security.introspec.HttpTestServer; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; @@ -25,7 +25,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.nr.agent.instrumentation.security.okhttp30" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.agent.security.instrumentation.okhttp30" }) public class RealCallTest { @ClassRule public static HttpServerRule server = new HttpServerRule(); diff --git a/instrumentation-security/okhttp-4.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp40/internal/http/OkhttpHelper.java b/instrumentation-security/okhttp-3.5.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp35/OkhttpHelper.java similarity index 98% rename from instrumentation-security/okhttp-4.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp40/internal/http/OkhttpHelper.java rename to instrumentation-security/okhttp-3.5.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp35/OkhttpHelper.java index 438c09fd2..2d8a9894b 100644 --- a/instrumentation-security/okhttp-4.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp40/internal/http/OkhttpHelper.java +++ b/instrumentation-security/okhttp-3.5.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp35/OkhttpHelper.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.security.okhttp40.internal.http; +package com.newrelic.agent.security.instrumentation.okhttp35; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; @@ -57,7 +57,6 @@ private static String getNrSecCustomAttribName() { return NR_SEC_CUSTOM_ATTRIB_NAME + Thread.currentThread().getId(); } - public static AbstractOperation preprocessSecurityHook(String url, String className, String methodName) { try { if (!NewRelicSecurity.isHookProcessingActive() || diff --git a/instrumentation-security/okhttp-3.5.0/src/main/java/com/nr/agent/instrumentation/security/okhttp35/internal/http/ExchangeCodec_Instrumentation.java b/instrumentation-security/okhttp-3.5.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp35/http/ExchangeCodec_Instrumentation.java similarity index 81% rename from instrumentation-security/okhttp-3.5.0/src/main/java/com/nr/agent/instrumentation/security/okhttp35/internal/http/ExchangeCodec_Instrumentation.java rename to instrumentation-security/okhttp-3.5.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp35/http/ExchangeCodec_Instrumentation.java index d187d1cf7..21292f081 100644 --- a/instrumentation-security/okhttp-3.5.0/src/main/java/com/nr/agent/instrumentation/security/okhttp35/internal/http/ExchangeCodec_Instrumentation.java +++ b/instrumentation-security/okhttp-3.5.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp35/http/ExchangeCodec_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.security.okhttp35.internal.http; +package com.newrelic.agent.security.instrumentation.okhttp35.http; import com.newrelic.api.agent.weaver.SkipIfPresent; diff --git a/instrumentation-security/okhttp-3.5.0/src/main/java/com/nr/agent/instrumentation/security/okhttp35/internal/http/HttpCodec_Instrumentation.java b/instrumentation-security/okhttp-3.5.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp35/http/HttpCodec_Instrumentation.java similarity index 92% rename from instrumentation-security/okhttp-3.5.0/src/main/java/com/nr/agent/instrumentation/security/okhttp35/internal/http/HttpCodec_Instrumentation.java rename to instrumentation-security/okhttp-3.5.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp35/http/HttpCodec_Instrumentation.java index bdece79d2..f22a1def3 100644 --- a/instrumentation-security/okhttp-3.5.0/src/main/java/com/nr/agent/instrumentation/security/okhttp35/internal/http/HttpCodec_Instrumentation.java +++ b/instrumentation-security/okhttp-3.5.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp35/http/HttpCodec_Instrumentation.java @@ -5,13 +5,13 @@ * */ -package com.nr.agent.instrumentation.security.okhttp35.internal.http; +package com.newrelic.agent.security.instrumentation.okhttp35.http; import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.security.okhttp35.internal.OkhttpHelper; +import com.newrelic.agent.security.instrumentation.okhttp35.OkhttpHelper; import okhttp3.Request; @Weave(type = MatchType.Interface, originalName = "okhttp3.internal.http.HttpCodec") diff --git a/instrumentation-security/okhttp-3.5.0/src/test/java/com/nr/instrumentation/security/okhttp35/RealCallTest.java b/instrumentation-security/okhttp-3.5.0/src/test/java/com/nr/agent/security/instrumentation/okhttp35/RealCallTest.java similarity index 95% rename from instrumentation-security/okhttp-3.5.0/src/test/java/com/nr/instrumentation/security/okhttp35/RealCallTest.java rename to instrumentation-security/okhttp-3.5.0/src/test/java/com/nr/agent/security/instrumentation/okhttp35/RealCallTest.java index c898a2ee3..69ca834d2 100644 --- a/instrumentation-security/okhttp-3.5.0/src/test/java/com/nr/instrumentation/security/okhttp35/RealCallTest.java +++ b/instrumentation-security/okhttp-3.5.0/src/test/java/com/nr/agent/security/instrumentation/okhttp35/RealCallTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.okhttp35; +package com.nr.agent.security.instrumentation.okhttp35; import com.newrelic.agent.security.introspec.HttpTestServer; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; @@ -25,7 +25,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.nr.agent.instrumentation.security.okhttp35" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.agent.security.instrumentation.okhttp35" }) public class RealCallTest { @ClassRule public static HttpServerRule server = new HttpServerRule(); diff --git a/instrumentation-security/okhttp-4.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp40/internal/http/ExchangeCodec_Instrumentation.java b/instrumentation-security/okhttp-4.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp40/ExchangeCodec_Instrumentation.java similarity index 96% rename from instrumentation-security/okhttp-4.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp40/internal/http/ExchangeCodec_Instrumentation.java rename to instrumentation-security/okhttp-4.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp40/ExchangeCodec_Instrumentation.java index f3c14219e..4a6c455cb 100644 --- a/instrumentation-security/okhttp-4.0.0/src/main/java/com/nr/agent/instrumentation/security/okhttp40/internal/http/ExchangeCodec_Instrumentation.java +++ b/instrumentation-security/okhttp-4.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp40/ExchangeCodec_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.security.okhttp40.internal.http; +package com.newrelic.agent.security.instrumentation.okhttp40; import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.weaver.MatchType; diff --git a/instrumentation-security/okhttp-3.5.0/src/main/java/com/nr/agent/instrumentation/security/okhttp35/internal/OkhttpHelper.java b/instrumentation-security/okhttp-4.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp40/OkhttpHelper.java similarity index 98% rename from instrumentation-security/okhttp-3.5.0/src/main/java/com/nr/agent/instrumentation/security/okhttp35/internal/OkhttpHelper.java rename to instrumentation-security/okhttp-4.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp40/OkhttpHelper.java index 6b1dd623f..964abbf3b 100644 --- a/instrumentation-security/okhttp-3.5.0/src/main/java/com/nr/agent/instrumentation/security/okhttp35/internal/OkhttpHelper.java +++ b/instrumentation-security/okhttp-4.0.0/src/main/java/com/newrelic/agent/security/instrumentation/okhttp40/OkhttpHelper.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.security.okhttp35.internal; +package com.newrelic.agent.security.instrumentation.okhttp40; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; @@ -57,6 +57,7 @@ private static String getNrSecCustomAttribName() { return NR_SEC_CUSTOM_ATTRIB_NAME + Thread.currentThread().getId(); } + public static AbstractOperation preprocessSecurityHook(String url, String className, String methodName) { try { if (!NewRelicSecurity.isHookProcessingActive() || diff --git a/instrumentation-security/okhttp-4.0.0/src/test/java/com/nr/instrumentation/security/okhttp30/ExchangeCodecTest.java b/instrumentation-security/okhttp-4.0.0/src/test/java/com/nr/agent/security/instrumentation/okhttp40/ExchangeCodecTest.java similarity index 95% rename from instrumentation-security/okhttp-4.0.0/src/test/java/com/nr/instrumentation/security/okhttp30/ExchangeCodecTest.java rename to instrumentation-security/okhttp-4.0.0/src/test/java/com/nr/agent/security/instrumentation/okhttp40/ExchangeCodecTest.java index e6d0dbdbf..d78cbfeff 100644 --- a/instrumentation-security/okhttp-4.0.0/src/test/java/com/nr/instrumentation/security/okhttp30/ExchangeCodecTest.java +++ b/instrumentation-security/okhttp-4.0.0/src/test/java/com/nr/agent/security/instrumentation/okhttp40/ExchangeCodecTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.okhttp30; +package com.nr.agent.security.instrumentation.okhttp40; import com.newrelic.agent.security.introspec.HttpTestServer; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; @@ -25,7 +25,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.nr.agent.instrumentation.security.okhttp40" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.agent.security.instrumentation.okhttp40" }) public class ExchangeCodecTest { @ClassRule public static HttpServerRule server = new HttpServerRule(); diff --git a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/H2StatementTest.java b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/H2StatementTest.java similarity index 99% rename from instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/H2StatementTest.java rename to instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/H2StatementTest.java index 6f5b98af2..7d3a0520c 100644 --- a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/H2StatementTest.java +++ b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/H2StatementTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc; +package com.nr.agent.security.instrumentation.r2dbc; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/H2Test.java b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/H2Test.java similarity index 99% rename from instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/H2Test.java rename to instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/H2Test.java index aa4e62e5b..8eb168412 100644 --- a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/H2Test.java +++ b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/H2Test.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc; +package com.nr.agent.security.instrumentation.r2dbc; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MariaStatementTest.java b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MariaStatementTest.java similarity index 99% rename from instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MariaStatementTest.java rename to instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MariaStatementTest.java index 2718c3195..c632cc688 100644 --- a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MariaStatementTest.java +++ b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MariaStatementTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc; +package com.nr.agent.security.instrumentation.r2dbc; import ch.vorburger.exec.ManagedProcessException; import ch.vorburger.mariadb4j.DB; diff --git a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MariaTest.java b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MariaTest.java similarity index 99% rename from instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MariaTest.java rename to instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MariaTest.java index d51729e76..ff128b45b 100644 --- a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MariaTest.java +++ b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MariaTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc; +package com.nr.agent.security.instrumentation.r2dbc; import ch.vorburger.exec.ManagedProcessException; import ch.vorburger.mariadb4j.DB; diff --git a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MySQLStatementTest.java b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MySQLStatementTest.java similarity index 99% rename from instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MySQLStatementTest.java rename to instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MySQLStatementTest.java index 26dcf1d30..3e2ebfce6 100644 --- a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MySQLStatementTest.java +++ b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MySQLStatementTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc; +package com.nr.agent.security.instrumentation.r2dbc; import ch.vorburger.mariadb4j.DB; import ch.vorburger.mariadb4j.DBConfigurationBuilder; diff --git a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MySQLTest.java b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MySQLTest.java similarity index 99% rename from instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MySQLTest.java rename to instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MySQLTest.java index 463901e5a..d0ce6781a 100644 --- a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/MySQLTest.java +++ b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/MySQLTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc; +package com.nr.agent.security.instrumentation.r2dbc; import ch.vorburger.exec.ManagedProcessException; import ch.vorburger.mariadb4j.DB; diff --git a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/PostgresStatementTest.java b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/PostgresStatementTest.java similarity index 99% rename from instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/PostgresStatementTest.java rename to instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/PostgresStatementTest.java index edc3ae669..7ad8a7f9a 100644 --- a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/PostgresStatementTest.java +++ b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/PostgresStatementTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc; +package com.nr.agent.security.instrumentation.r2dbc; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/PostgresTest.java b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/PostgresTest.java similarity index 99% rename from instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/PostgresTest.java rename to instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/PostgresTest.java index 6009a5775..e54d93ba6 100644 --- a/instrumentation-security/r2dbc-generic/src/test/java/com/nr/instrumentation/security/r2dbc/PostgresTest.java +++ b/instrumentation-security/r2dbc-generic/src/test/java/com/nr/agent/security/instrumentation/r2dbc/PostgresTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc; +package com.nr.agent.security.instrumentation.r2dbc; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/r2dbc-h2/src/test/java/com/nr/instrumentation/security/r2dbc/h2/ClientTest.java b/instrumentation-security/r2dbc-h2/src/test/java/com/nr/agent/security/instrumentation/r2dbc/h2/ClientTest.java similarity index 98% rename from instrumentation-security/r2dbc-h2/src/test/java/com/nr/instrumentation/security/r2dbc/h2/ClientTest.java rename to instrumentation-security/r2dbc-h2/src/test/java/com/nr/agent/security/instrumentation/r2dbc/h2/ClientTest.java index 7531958c3..054c035fd 100644 --- a/instrumentation-security/r2dbc-h2/src/test/java/com/nr/instrumentation/security/r2dbc/h2/ClientTest.java +++ b/instrumentation-security/r2dbc-h2/src/test/java/com/nr/agent/security/instrumentation/r2dbc/h2/ClientTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc.h2; +package com.nr.agent.security.instrumentation.r2dbc.h2; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/r2dbc-h2/src/test/java/com/nr/instrumentation/security/r2dbc/h2/SessionClientTest.java b/instrumentation-security/r2dbc-h2/src/test/java/com/nr/agent/security/instrumentation/r2dbc/h2/SessionClientTest.java similarity index 98% rename from instrumentation-security/r2dbc-h2/src/test/java/com/nr/instrumentation/security/r2dbc/h2/SessionClientTest.java rename to instrumentation-security/r2dbc-h2/src/test/java/com/nr/agent/security/instrumentation/r2dbc/h2/SessionClientTest.java index b2cc287f1..19d270b23 100644 --- a/instrumentation-security/r2dbc-h2/src/test/java/com/nr/instrumentation/security/r2dbc/h2/SessionClientTest.java +++ b/instrumentation-security/r2dbc-h2/src/test/java/com/nr/agent/security/instrumentation/r2dbc/h2/SessionClientTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc.h2; +package com.nr.agent.security.instrumentation.r2dbc.h2; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/r2dbc-mariadb/src/test/java/com/nr/instrumentation/security/r2dbc/mariadb/ConnectionTest.java b/instrumentation-security/r2dbc-mariadb/src/test/java/com/nr/agent/security/instrumentation/r2dbc/mariadb/ConnectionTest.java similarity index 98% rename from instrumentation-security/r2dbc-mariadb/src/test/java/com/nr/instrumentation/security/r2dbc/mariadb/ConnectionTest.java rename to instrumentation-security/r2dbc-mariadb/src/test/java/com/nr/agent/security/instrumentation/r2dbc/mariadb/ConnectionTest.java index 006c015e6..73e24e6aa 100644 --- a/instrumentation-security/r2dbc-mariadb/src/test/java/com/nr/instrumentation/security/r2dbc/mariadb/ConnectionTest.java +++ b/instrumentation-security/r2dbc-mariadb/src/test/java/com/nr/agent/security/instrumentation/r2dbc/mariadb/ConnectionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc.mariadb; +package com.nr.agent.security.instrumentation.r2dbc.mariadb; import ch.vorburger.mariadb4j.DB; import ch.vorburger.mariadb4j.DBConfigurationBuilder; diff --git a/instrumentation-security/r2dbc-mysql/src/test/java/com/nr/instrumentation/security/r2dbc/mysql/ConnectionTest.java b/instrumentation-security/r2dbc-mysql/src/test/java/com/nr/agent/security/instrumentation/r2dbc/mysql/ConnectionTest.java similarity index 98% rename from instrumentation-security/r2dbc-mysql/src/test/java/com/nr/instrumentation/security/r2dbc/mysql/ConnectionTest.java rename to instrumentation-security/r2dbc-mysql/src/test/java/com/nr/agent/security/instrumentation/r2dbc/mysql/ConnectionTest.java index 3679cb006..e43bbdb2b 100644 --- a/instrumentation-security/r2dbc-mysql/src/test/java/com/nr/instrumentation/security/r2dbc/mysql/ConnectionTest.java +++ b/instrumentation-security/r2dbc-mysql/src/test/java/com/nr/agent/security/instrumentation/r2dbc/mysql/ConnectionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc.mysql; +package com.nr.agent.security.instrumentation.r2dbc.mysql; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/r2dbc-postgresql/src/test/java/com/nr/instrumentation/security/r2dbc/postgres/ConnectionTest.java b/instrumentation-security/r2dbc-postgresql/src/test/java/com/nr/agent/security/instrumentation/r2dbc/postgres/ConnectionTest.java similarity index 99% rename from instrumentation-security/r2dbc-postgresql/src/test/java/com/nr/instrumentation/security/r2dbc/postgres/ConnectionTest.java rename to instrumentation-security/r2dbc-postgresql/src/test/java/com/nr/agent/security/instrumentation/r2dbc/postgres/ConnectionTest.java index 674f4031c..d2718cc16 100644 --- a/instrumentation-security/r2dbc-postgresql/src/test/java/com/nr/instrumentation/security/r2dbc/postgres/ConnectionTest.java +++ b/instrumentation-security/r2dbc-postgresql/src/test/java/com/nr/agent/security/instrumentation/r2dbc/postgres/ConnectionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.r2dbc.postgres; +package com.nr.agent.security.instrumentation.r2dbc.postgres; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/rhino-jsinjection/src/main/java/com/nr/agent/security/mongo/jsinjection/rhino/JSEngineUtils.java b/instrumentation-security/rhino-jsinjection/src/main/java/com/newrelic/agent/security/instrumentation/rhino/JSEngineUtils.java similarity index 82% rename from instrumentation-security/rhino-jsinjection/src/main/java/com/nr/agent/security/mongo/jsinjection/rhino/JSEngineUtils.java rename to instrumentation-security/rhino-jsinjection/src/main/java/com/newrelic/agent/security/instrumentation/rhino/JSEngineUtils.java index 3ab03aa38..7f1fb52f0 100644 --- a/instrumentation-security/rhino-jsinjection/src/main/java/com/nr/agent/security/mongo/jsinjection/rhino/JSEngineUtils.java +++ b/instrumentation-security/rhino-jsinjection/src/main/java/com/newrelic/agent/security/instrumentation/rhino/JSEngineUtils.java @@ -1,4 +1,4 @@ -package com.nr.agent.security.mongo.jsinjection.rhino; +package com.newrelic.agent.security.instrumentation.rhino; public class JSEngineUtils { diff --git a/instrumentation-security/rhino-jsinjection/src/main/java/org/mozilla/javascript/ScriptRuntime_Instrumentation.java b/instrumentation-security/rhino-jsinjection/src/main/java/org/mozilla/javascript/ScriptRuntime_Instrumentation.java index e301c848e..5c32788c4 100644 --- a/instrumentation-security/rhino-jsinjection/src/main/java/org/mozilla/javascript/ScriptRuntime_Instrumentation.java +++ b/instrumentation-security/rhino-jsinjection/src/main/java/org/mozilla/javascript/ScriptRuntime_Instrumentation.java @@ -8,7 +8,7 @@ import com.newrelic.api.agent.security.schema.operation.JSInjectionOperation; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.security.mongo.jsinjection.rhino.JSEngineUtils; +import com.newrelic.agent.security.instrumentation.rhino.JSEngineUtils; @Weave(originalName = "org.mozilla.javascript.ScriptRuntime") public class ScriptRuntime_Instrumentation { diff --git a/instrumentation-security/rhino-jsinjection/src/test/java/com/nr/agent/instrumentation/rhino/RhinoTest.java b/instrumentation-security/rhino-jsinjection/src/test/java/com/nr/agent/security/instrumentation/rhino/RhinoTest.java similarity index 99% rename from instrumentation-security/rhino-jsinjection/src/test/java/com/nr/agent/instrumentation/rhino/RhinoTest.java rename to instrumentation-security/rhino-jsinjection/src/test/java/com/nr/agent/security/instrumentation/rhino/RhinoTest.java index 05130da48..708d9aa2f 100644 --- a/instrumentation-security/rhino-jsinjection/src/test/java/com/nr/agent/instrumentation/rhino/RhinoTest.java +++ b/instrumentation-security/rhino-jsinjection/src/test/java/com/nr/agent/security/instrumentation/rhino/RhinoTest.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.rhino; +package com.nr.agent.security.instrumentation.rhino; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/saxpath/src/main/java/com/nr/instrumentation/security/xpath/saxpath/XPATHUtils.java b/instrumentation-security/saxpath/src/main/java/com/newrelic/agent/security/instrumentation/saxpath/XPATHUtils.java similarity index 74% rename from instrumentation-security/saxpath/src/main/java/com/nr/instrumentation/security/xpath/saxpath/XPATHUtils.java rename to instrumentation-security/saxpath/src/main/java/com/newrelic/agent/security/instrumentation/saxpath/XPATHUtils.java index 6016cb68b..ae5bc9696 100644 --- a/instrumentation-security/saxpath/src/main/java/com/nr/instrumentation/security/xpath/saxpath/XPATHUtils.java +++ b/instrumentation-security/saxpath/src/main/java/com/newrelic/agent/security/instrumentation/saxpath/XPATHUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xpath.saxpath; +package com.newrelic.agent.security.instrumentation.saxpath; public class XPATHUtils { diff --git a/instrumentation-security/saxpath/src/main/java/org/saxpath/XPathReader_Instrumentation.java b/instrumentation-security/saxpath/src/main/java/org/saxpath/XPathReader_Instrumentation.java index 343f9ce21..5bfb86db1 100644 --- a/instrumentation-security/saxpath/src/main/java/org/saxpath/XPathReader_Instrumentation.java +++ b/instrumentation-security/saxpath/src/main/java/org/saxpath/XPathReader_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.xpath.saxpath.XPATHUtils; +import com.newrelic.agent.security.instrumentation.saxpath.XPATHUtils; @Weave(type = MatchType.Interface, originalName = "org.saxpath.XPathReader") diff --git a/instrumentation-security/saxpath/src/test/java/com/nr/instrumentation/security/saxpath/XPathTest.java b/instrumentation-security/saxpath/src/test/java/com/nr/agent/security/instrumentation/saxpath/XPathTest.java similarity index 95% rename from instrumentation-security/saxpath/src/test/java/com/nr/instrumentation/security/saxpath/XPathTest.java rename to instrumentation-security/saxpath/src/test/java/com/nr/agent/security/instrumentation/saxpath/XPathTest.java index beeb2f334..dcf8df8f5 100644 --- a/instrumentation-security/saxpath/src/test/java/com/nr/instrumentation/security/saxpath/XPathTest.java +++ b/instrumentation-security/saxpath/src/test/java/com/nr/agent/security/instrumentation/saxpath/XPathTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.saxpath; +package com.nr.agent.security.instrumentation.saxpath; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -6,7 +6,7 @@ import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.VulnerabilityCaseType; import com.newrelic.api.agent.security.schema.operation.XPathOperation; -import com.nr.instrumentation.security.xpath.saxpath.XPATHUtils; +import com.newrelic.agent.security.instrumentation.saxpath.XPATHUtils; import org.junit.Assert; import org.junit.FixMethodOrder; import org.junit.Test; diff --git a/instrumentation-security/servlet-2.4/src/main/java/com/nr/instrumentation/security/servlet24/HttpServletHelper.java b/instrumentation-security/servlet-2.4/src/main/java/com/newrelic/agent/security/instrumentation/servlet24/HttpServletHelper.java similarity index 99% rename from instrumentation-security/servlet-2.4/src/main/java/com/nr/instrumentation/security/servlet24/HttpServletHelper.java rename to instrumentation-security/servlet-2.4/src/main/java/com/newrelic/agent/security/instrumentation/servlet24/HttpServletHelper.java index e93e68057..fbfd1e72b 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/com/nr/instrumentation/security/servlet24/HttpServletHelper.java +++ b/instrumentation-security/servlet-2.4/src/main/java/com/newrelic/agent/security/instrumentation/servlet24/HttpServletHelper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.newrelic.agent.security.instrumentation.servlet24; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.*; diff --git a/instrumentation-security/servlet-2.4/src/main/java/com/nr/instrumentation/security/servlet24/ServletRequestCallback.java b/instrumentation-security/servlet-2.4/src/main/java/com/newrelic/agent/security/instrumentation/servlet24/ServletRequestCallback.java similarity index 97% rename from instrumentation-security/servlet-2.4/src/main/java/com/nr/instrumentation/security/servlet24/ServletRequestCallback.java rename to instrumentation-security/servlet-2.4/src/main/java/com/newrelic/agent/security/instrumentation/servlet24/ServletRequestCallback.java index 5a64f9cf0..b7531fdda 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/com/nr/instrumentation/security/servlet24/ServletRequestCallback.java +++ b/instrumentation-security/servlet-2.4/src/main/java/com/newrelic/agent/security/instrumentation/servlet24/ServletRequestCallback.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.newrelic.agent.security.instrumentation.servlet24; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/servlet-6.0/src/main/java/com/nr/instrumentation/security/servlet6/ServletResponseCallback.java b/instrumentation-security/servlet-2.4/src/main/java/com/newrelic/agent/security/instrumentation/servlet24/ServletResponseCallback.java similarity index 97% rename from instrumentation-security/servlet-6.0/src/main/java/com/nr/instrumentation/security/servlet6/ServletResponseCallback.java rename to instrumentation-security/servlet-2.4/src/main/java/com/newrelic/agent/security/instrumentation/servlet24/ServletResponseCallback.java index d9c388b22..4eac3d1ba 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/com/nr/instrumentation/security/servlet6/ServletResponseCallback.java +++ b/instrumentation-security/servlet-2.4/src/main/java/com/newrelic/agent/security/instrumentation/servlet24/ServletResponseCallback.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.newrelic.agent.security.instrumentation.servlet24; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/FilterChain_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/FilterChain_Instrumentation.java index d2a057c4f..d24551168 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/FilterChain_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/FilterChain_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet24.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet24.HttpServletHelper; import javax.servlet.http.HttpServletRequest; import java.io.IOException; diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/Filter_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/Filter_Instrumentation.java index c75da5329..97cf78d6e 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/Filter_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/Filter_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet24.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet24.HttpServletHelper; import javax.servlet.http.HttpServletRequest; import java.io.IOException; diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletContainerInitializer_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletContainerInitializer_Instrumentation.java index b7aaed8ec..90cd830ac 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletContainerInitializer_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletContainerInitializer_Instrumentation.java @@ -1,9 +1,7 @@ package javax.servlet; -import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet24.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet24.HttpServletHelper; import java.util.Set; diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletInputStream_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletInputStream_Instrumentation.java index 90ab998e6..5eceaedbe 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletInputStream_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletInputStream_Instrumentation.java @@ -10,10 +10,9 @@ import com.newrelic.api.agent.security.NewRelicSecurity;; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.NewField; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet24.ServletRequestCallback; +import com.newrelic.agent.security.instrumentation.servlet24.ServletRequestCallback; import java.io.IOException; diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletOutputStream_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletOutputStream_Instrumentation.java index 963fa2c84..d2a8e6122 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletOutputStream_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletOutputStream_Instrumentation.java @@ -12,7 +12,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet24.ServletResponseCallback; +import com.newrelic.agent.security.instrumentation.servlet24.ServletResponseCallback; import java.io.IOException; diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletRequest_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletRequest_Instrumentation.java index b12e50a3f..0ab2eb230 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletRequest_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletRequest_Instrumentation.java @@ -13,7 +13,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet24.ServletRequestCallback; +import com.newrelic.agent.security.instrumentation.servlet24.ServletRequestCallback; import java.io.BufferedReader; import java.io.IOException; diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletResponse_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletResponse_Instrumentation.java index a0dd85bcf..488132d21 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletResponse_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/ServletResponse_Instrumentation.java @@ -9,11 +9,10 @@ import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; -import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet24.ServletResponseCallback; +import com.newrelic.agent.security.instrumentation.servlet24.ServletResponseCallback; import java.io.IOException; import java.io.PrintWriter; diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/Servlet_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/Servlet_Instrumentation.java index 405e4f1cf..33bc5e052 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/Servlet_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/Servlet_Instrumentation.java @@ -18,7 +18,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet24.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet24.HttpServletHelper; import javax.servlet.http.HttpServletRequest; diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/http/HttpServletResponse_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/http/HttpServletResponse_Instrumentation.java index e04939df8..09600118e 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/http/HttpServletResponse_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/http/HttpServletResponse_Instrumentation.java @@ -1,6 +1,5 @@ package javax.servlet.http; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; @@ -13,16 +12,13 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.Interface, originalName = "javax.servlet.http.HttpServletResponse") public class HttpServletResponse_Instrumentation { public void addCookie(Cookie cookie){ boolean isLockAcquired = acquireLockIfPossible(cookie.hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(cookie, getClass().getName(), "addCookie"); diff --git a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/http/HttpSession_Instrumentation.java b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/http/HttpSession_Instrumentation.java index fca917055..0e2107307 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/http/HttpSession_Instrumentation.java +++ b/instrumentation-security/servlet-2.4/src/main/java/javax/servlet/http/HttpSession_Instrumentation.java @@ -1,6 +1,5 @@ package javax.servlet.http; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; @@ -13,16 +12,13 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.Interface, originalName = "javax.servlet.http.HttpSession") public class HttpSession_Instrumentation { public void setAttribute(String name, Object value){ boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(name, value, getClass().getName(), "setAttribute"); @@ -42,7 +38,7 @@ public void setAttribute(String name, Object value){ public void putValue(String name, Object value){ boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(name, value, getClass().getName(), "putValue"); diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpServletServer.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpServletServer.java similarity index 97% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpServletServer.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpServletServer.java index 7b98ba2c3..c9ea9821f 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpServletServer.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpServletServer.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet24; import org.apache.catalina.Context; import org.apache.catalina.LifecycleState; diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpServletTest.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpServletTest.java similarity index 94% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpServletTest.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpServletTest.java index 3c57ff84a..36af9c86d 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpServletTest.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpServletTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet24; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -19,7 +19,7 @@ @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "javax.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "javax.servlet", "com.newrelic.agent.security.instrumentation.servlet24" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class HttpServletTest { @ClassRule diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpSessionTest.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpSessionTest.java similarity index 97% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpSessionTest.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpSessionTest.java index fe221ba04..663714725 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpSessionTest.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpSessionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet24; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -21,7 +21,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "javax.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "javax.servlet", "com.newrelic.agent.security.instrumentation.servlet24" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class HttpSessionTest { @ClassRule diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpTestServlet.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpTestServlet.java similarity index 99% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpTestServlet.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpTestServlet.java index 3100db83b..896b24d07 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/HttpTestServlet.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/HttpTestServlet.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet24; import javax.servlet.ServletInputStream; import javax.servlet.ServletOutputStream; diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletInputStreamTest.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletInputStreamTest.java similarity index 97% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletInputStreamTest.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletInputStreamTest.java index 7c462c843..e694252ef 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletInputStreamTest.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletInputStreamTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet24; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -23,7 +23,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "javax.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "javax.servlet", "com.newrelic.agent.security.instrumentation.servlet24" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletInputStreamTest { diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletOutputStreamTest.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletOutputStreamTest.java similarity index 99% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletOutputStreamTest.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletOutputStreamTest.java index e9b618350..ec8969eb0 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletOutputStreamTest.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletOutputStreamTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet24; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -26,7 +26,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "javax.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "javax.servlet", "com.newrelic.agent.security.instrumentation.servlet24" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletOutputStreamTest { diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletRequestTest.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletRequestTest.java similarity index 98% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletRequestTest.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletRequestTest.java index 2665ca775..040018fae 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletRequestTest.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletRequestTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet24; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -32,7 +32,7 @@ import java.util.Map; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "jakarta.servlet") +@InstrumentationTestConfig(includePrefixes = { "javax.servlet", "com.newrelic.agent.security.instrumentation.servlet24"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletRequestTest { diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletResponseTest.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletResponseTest.java similarity index 96% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletResponseTest.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletResponseTest.java index 4da50dc06..98cdd0719 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletResponseTest.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletResponseTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet24; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -26,7 +26,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "jakarta.servlet") +@InstrumentationTestConfig(includePrefixes = { "javax.servlet", "com.newrelic.agent.security.instrumentation.servlet24"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletResponseTest { @ClassRule diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletTest.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletTest.java similarity index 93% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletTest.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletTest.java index 15f1401ed..eaaf384de 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletTest.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/ServletTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet24; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -22,7 +22,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "javax.servlet") +@InstrumentationTestConfig(includePrefixes = {"javax.servlet", "com.newrelic.agent.security.instrumentation.servlet24"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletTest { diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/WebServletTest.java b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/WebServletTest.java similarity index 89% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/WebServletTest.java rename to instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/WebServletTest.java index d2af6e96d..9606ee042 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/WebServletTest.java +++ b/instrumentation-security/servlet-2.4/src/test/java/com/nr/agent/security/instrumentation/servlet24/WebServletTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet24; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -17,7 +17,7 @@ import java.net.URL; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "javax.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "javax.servlet", "com.newrelic.agent.security.instrumentation.servlet24" }) public class WebServletTest { @ClassRule public static HttpServletServer server = new HttpServletServer(); diff --git a/instrumentation-security/servlet-6.0/src/main/java/com/nr/instrumentation/security/servlet6/HttpServletHelper.java b/instrumentation-security/servlet-5.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet5/HttpServletHelper.java similarity index 99% rename from instrumentation-security/servlet-6.0/src/main/java/com/nr/instrumentation/security/servlet6/HttpServletHelper.java rename to instrumentation-security/servlet-5.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet5/HttpServletHelper.java index 5637a6c8f..95a01fcf4 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/com/nr/instrumentation/security/servlet6/HttpServletHelper.java +++ b/instrumentation-security/servlet-5.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet5/HttpServletHelper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.newrelic.agent.security.instrumentation.servlet5; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.*; diff --git a/instrumentation-security/servlet-5.0/src/main/java/com/nr/instrumentation/security/servlet5/ServletRequestCallback.java b/instrumentation-security/servlet-5.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet5/ServletRequestCallback.java similarity index 97% rename from instrumentation-security/servlet-5.0/src/main/java/com/nr/instrumentation/security/servlet5/ServletRequestCallback.java rename to instrumentation-security/servlet-5.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet5/ServletRequestCallback.java index fc174e704..ff884fffe 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/com/nr/instrumentation/security/servlet5/ServletRequestCallback.java +++ b/instrumentation-security/servlet-5.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet5/ServletRequestCallback.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.newrelic.agent.security.instrumentation.servlet5; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/servlet-5.0/src/main/java/com/nr/instrumentation/security/servlet5/ServletResponseCallback.java b/instrumentation-security/servlet-5.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet5/ServletResponseCallback.java similarity index 97% rename from instrumentation-security/servlet-5.0/src/main/java/com/nr/instrumentation/security/servlet5/ServletResponseCallback.java rename to instrumentation-security/servlet-5.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet5/ServletResponseCallback.java index fceaa0a7e..419db38f2 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/com/nr/instrumentation/security/servlet5/ServletResponseCallback.java +++ b/instrumentation-security/servlet-5.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet5/ServletResponseCallback.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.newrelic.agent.security.instrumentation.servlet5; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/FilterChain_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/FilterChain_Instrumentation.java index cb670ba9f..6f7e54a6e 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/FilterChain_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/FilterChain_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet5.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet5.HttpServletHelper; import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/Filter_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/Filter_Instrumentation.java index 270d0a4a5..43e2be592 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/Filter_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/Filter_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet5.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet5.HttpServletHelper; import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletContainerInitializer_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletContainerInitializer_Instrumentation.java index 02d4a8b75..0e3a888bc 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletContainerInitializer_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletContainerInitializer_Instrumentation.java @@ -1,9 +1,7 @@ package jakarta.servlet; -import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet5.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet5.HttpServletHelper; import java.util.Set; //@Weave(type = MatchType.Interface, originalName = "jakarta.servlet.ServletContainerInitializer") diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletInputStream_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletInputStream_Instrumentation.java index c1b9f1364..30b6848cc 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletInputStream_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletInputStream_Instrumentation.java @@ -10,10 +10,9 @@ import com.newrelic.api.agent.security.NewRelicSecurity;; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.NewField; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet5.ServletRequestCallback; +import com.newrelic.agent.security.instrumentation.servlet5.ServletRequestCallback; import java.io.IOException; diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletOutputStream_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletOutputStream_Instrumentation.java index 0d579a552..84d5a5530 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletOutputStream_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletOutputStream_Instrumentation.java @@ -10,10 +10,9 @@ import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.NewField; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet5.ServletResponseCallback; +import com.newrelic.agent.security.instrumentation.servlet5.ServletResponseCallback; import java.io.IOException; diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletRequest_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletRequest_Instrumentation.java index b3e8facdf..be1093f2f 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletRequest_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletRequest_Instrumentation.java @@ -13,7 +13,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet5.ServletRequestCallback; +import com.newrelic.agent.security.instrumentation.servlet5.ServletRequestCallback; import java.io.BufferedReader; import java.io.IOException; diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletResponse_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletResponse_Instrumentation.java index f4c1abc88..04dc2af8f 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletResponse_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/ServletResponse_Instrumentation.java @@ -12,7 +12,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet5.ServletResponseCallback; +import com.newrelic.agent.security.instrumentation.servlet5.ServletResponseCallback; import java.io.IOException; import java.io.PrintWriter; diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/Servlet_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/Servlet_Instrumentation.java index 9808eb29c..2b6acc230 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/Servlet_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/Servlet_Instrumentation.java @@ -18,7 +18,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet5.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet5.HttpServletHelper; import jakarta.servlet.http.HttpServletRequest; diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/http/HttpServletResponse_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/http/HttpServletResponse_Instrumentation.java index bc327a597..b90017e32 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/http/HttpServletResponse_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/http/HttpServletResponse_Instrumentation.java @@ -1,6 +1,5 @@ package jakarta.servlet.http; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; @@ -13,16 +12,13 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.Interface, originalName = "jakarta.servlet.http.HttpServletResponse") public class HttpServletResponse_Instrumentation { public void addCookie(Cookie cookie){ boolean isLockAcquired = acquireLockIfPossible(cookie.hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(cookie, getClass().getName(), "addCookie"); diff --git a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/http/HttpSession_Instrumentation.java b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/http/HttpSession_Instrumentation.java index 8fbd96c0b..d02191fd4 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/http/HttpSession_Instrumentation.java +++ b/instrumentation-security/servlet-5.0/src/main/java/jakarta/servlet/http/HttpSession_Instrumentation.java @@ -1,6 +1,5 @@ package jakarta.servlet.http; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; @@ -13,16 +12,13 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.Interface, originalName = "jakarta.servlet.http.HttpSession") public class HttpSession_Instrumentation { public void setAttribute(String name, Object value){ boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(name, value, getClass().getName(), "setAttribute"); @@ -42,7 +38,7 @@ public void setAttribute(String name, Object value){ public void putValue(String name, Object value){ boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled){ if (isLockAcquired) operation = preprocessSecurityHook(name, value, getClass().getName(), "putValue"); diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpServletServer.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpServletServer.java similarity index 97% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpServletServer.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpServletServer.java index f4ad7f982..958f3eb0a 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpServletServer.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpServletServer.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet5; import jakarta.servlet.annotation.WebServlet; import org.apache.catalina.Context; diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpServletTest.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpServletTest.java similarity index 96% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpServletTest.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpServletTest.java index 6ba94763f..f7bbdc6f2 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpServletTest.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpServletTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet5; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -18,7 +18,7 @@ import java.net.URL; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet5" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class HttpServletTest { @ClassRule diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpSessionTest.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpSessionTest.java similarity index 98% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpSessionTest.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpSessionTest.java index b59131abd..95f12ce0f 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpSessionTest.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpSessionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet5; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -21,7 +21,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet5" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class HttpSessionTest { @ClassRule diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpTestServlet.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpTestServlet.java similarity index 99% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpTestServlet.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpTestServlet.java index 53ab4fbc6..89df822d9 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpTestServlet.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/HttpTestServlet.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet5; import jakarta.servlet.ServletInputStream; import jakarta.servlet.ServletOutputStream; diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletInputStreamTest.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletInputStreamTest.java similarity index 98% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletInputStreamTest.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletInputStreamTest.java index e1a41dcaf..631656dff 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletInputStreamTest.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletInputStreamTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet5; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -23,7 +23,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet5" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletInputStreamTest { @@ -96,7 +96,6 @@ private String read() throws IOException, URISyntaxException { return POST_PARAMS; } - @Trace(dispatcher = true) private String readLine() throws IOException, URISyntaxException { String method = "POST"; @@ -112,7 +111,6 @@ private String readLineWithOff() throws IOException, URISyntaxException { makeRequest(method, POST_PARAMS, "readLine/withOff"); return POST_PARAMS.substring(0,5); } - private void makeRequest( String Method, final String POST_PARAMS, String path) throws URISyntaxException, IOException{ URL u = servlet.getEndPoint("inputStream/"+ path).toURL(); diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletOutputStreamTest.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletOutputStreamTest.java similarity index 99% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletOutputStreamTest.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletOutputStreamTest.java index 4fea84bf4..7b9070168 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletOutputStreamTest.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletOutputStreamTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet5; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletRequestTest.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletRequestTest.java similarity index 98% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletRequestTest.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletRequestTest.java index 66cebb229..b3f934cef 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletRequestTest.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletRequestTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet5; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -32,7 +32,7 @@ import java.util.Map; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "javax.servlet") +@InstrumentationTestConfig(includePrefixes = {"jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet5"} ) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletRequestTest { diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletResponseTest.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletResponseTest.java similarity index 96% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletResponseTest.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletResponseTest.java index b691df173..b334a287e 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletResponseTest.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletResponseTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet5; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -26,7 +26,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "jakarta.servlet") +@InstrumentationTestConfig(includePrefixes = {"jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet5"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletResponseTest { @ClassRule diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletTest.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletTest.java similarity index 93% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletTest.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletTest.java index f6ea1d376..bd9ed014b 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletTest.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/ServletTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet5; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -22,7 +22,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "jakarta.servlet") +@InstrumentationTestConfig(includePrefixes = {"jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet5"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletTest { diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/WebServletTest.java b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/WebServletTest.java similarity index 93% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/WebServletTest.java rename to instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/WebServletTest.java index 528c0a871..d9ddac7c8 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/WebServletTest.java +++ b/instrumentation-security/servlet-5.0/src/test/java/com/nr/agent/security/instrumentation/servlet5/WebServletTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet5; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -17,7 +17,7 @@ import java.net.URL; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet5" }) public class WebServletTest { @ClassRule public static HttpServletServer server = new HttpServletServer(); diff --git a/instrumentation-security/servlet-5.0/src/main/java/com/nr/instrumentation/security/servlet5/HttpServletHelper.java b/instrumentation-security/servlet-6.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet6/HttpServletHelper.java similarity index 99% rename from instrumentation-security/servlet-5.0/src/main/java/com/nr/instrumentation/security/servlet5/HttpServletHelper.java rename to instrumentation-security/servlet-6.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet6/HttpServletHelper.java index 57e278ff9..65e985866 100644 --- a/instrumentation-security/servlet-5.0/src/main/java/com/nr/instrumentation/security/servlet5/HttpServletHelper.java +++ b/instrumentation-security/servlet-6.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet6/HttpServletHelper.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.newrelic.agent.security.instrumentation.servlet6; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.*; diff --git a/instrumentation-security/servlet-6.0/src/main/java/com/nr/instrumentation/security/servlet6/ServletRequestCallback.java b/instrumentation-security/servlet-6.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet6/ServletRequestCallback.java similarity index 97% rename from instrumentation-security/servlet-6.0/src/main/java/com/nr/instrumentation/security/servlet6/ServletRequestCallback.java rename to instrumentation-security/servlet-6.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet6/ServletRequestCallback.java index 34e451aef..3fc317d73 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/com/nr/instrumentation/security/servlet6/ServletRequestCallback.java +++ b/instrumentation-security/servlet-6.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet6/ServletRequestCallback.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.newrelic.agent.security.instrumentation.servlet6; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/servlet-2.4/src/main/java/com/nr/instrumentation/security/servlet24/ServletResponseCallback.java b/instrumentation-security/servlet-6.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet6/ServletResponseCallback.java similarity index 97% rename from instrumentation-security/servlet-2.4/src/main/java/com/nr/instrumentation/security/servlet24/ServletResponseCallback.java rename to instrumentation-security/servlet-6.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet6/ServletResponseCallback.java index 975d7422d..f0aebf6d6 100644 --- a/instrumentation-security/servlet-2.4/src/main/java/com/nr/instrumentation/security/servlet24/ServletResponseCallback.java +++ b/instrumentation-security/servlet-6.0/src/main/java/com/newrelic/agent/security/instrumentation/servlet6/ServletResponseCallback.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.newrelic.agent.security.instrumentation.servlet6; import com.newrelic.api.agent.security.NewRelicSecurity; diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/FilterChain_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/FilterChain_Instrumentation.java index 28058d8c2..185e2d14c 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/FilterChain_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/FilterChain_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet6.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet6.HttpServletHelper; import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/Filter_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/Filter_Instrumentation.java index 1ddc80200..8e5c6fda7 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/Filter_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/Filter_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet6.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet6.HttpServletHelper; import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletContainerInitializer_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletContainerInitializer_Instrumentation.java index 5bcaacac9..fd0434a5d 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletContainerInitializer_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletContainerInitializer_Instrumentation.java @@ -1,9 +1,7 @@ package jakarta.servlet; -import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet6.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet6.HttpServletHelper; import java.util.Set; //@Weave(type = MatchType.Interface, originalName = "jakarta.servlet.ServletContainerInitializer") diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletInputStream_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletInputStream_Instrumentation.java index 1806b43f9..c95565cbc 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletInputStream_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletInputStream_Instrumentation.java @@ -10,10 +10,9 @@ import com.newrelic.api.agent.security.NewRelicSecurity;; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.NewField; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet6.ServletRequestCallback; +import com.newrelic.agent.security.instrumentation.servlet6.ServletRequestCallback; import java.io.IOException; diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletOutputStream_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletOutputStream_Instrumentation.java index 7aec758ab..8dbc64ca0 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletOutputStream_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletOutputStream_Instrumentation.java @@ -10,10 +10,9 @@ import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.NewField; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet6.ServletResponseCallback; +import com.newrelic.agent.security.instrumentation.servlet6.ServletResponseCallback; import java.io.IOException; diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletRequest_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletRequest_Instrumentation.java index 71739e3bd..cccc15bfa 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletRequest_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletRequest_Instrumentation.java @@ -13,7 +13,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet6.ServletRequestCallback; +import com.newrelic.agent.security.instrumentation.servlet6.ServletRequestCallback; import java.io.BufferedReader; import java.io.IOException; diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletResponse_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletResponse_Instrumentation.java index b22f5d498..69fb2cf47 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletResponse_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/ServletResponse_Instrumentation.java @@ -12,7 +12,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet6.ServletResponseCallback; +import com.newrelic.agent.security.instrumentation.servlet6.ServletResponseCallback; import java.io.IOException; import java.io.PrintWriter; diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/Servlet_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/Servlet_Instrumentation.java index c095eb12e..562fbf982 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/Servlet_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/Servlet_Instrumentation.java @@ -18,7 +18,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.servlet6.HttpServletHelper; +import com.newrelic.agent.security.instrumentation.servlet6.HttpServletHelper; import jakarta.servlet.http.HttpServletRequest; diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/http/HttpServletResponse_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/http/HttpServletResponse_Instrumentation.java index bc327a597..b90017e32 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/http/HttpServletResponse_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/http/HttpServletResponse_Instrumentation.java @@ -1,6 +1,5 @@ package jakarta.servlet.http; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; @@ -13,16 +12,13 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.Interface, originalName = "jakarta.servlet.http.HttpServletResponse") public class HttpServletResponse_Instrumentation { public void addCookie(Cookie cookie){ boolean isLockAcquired = acquireLockIfPossible(cookie.hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(cookie, getClass().getName(), "addCookie"); diff --git a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/http/HttpSession_Instrumentation.java b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/http/HttpSession_Instrumentation.java index da6793a23..d57d7a41b 100644 --- a/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/http/HttpSession_Instrumentation.java +++ b/instrumentation-security/servlet-6.0/src/main/java/jakarta/servlet/http/HttpSession_Instrumentation.java @@ -1,6 +1,5 @@ package jakarta.servlet.http; -import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; @@ -13,16 +12,13 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.DEFAULT; -import static com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED; - @Weave(type = MatchType.Interface, originalName = "jakarta.servlet.http.HttpSession") public class HttpSession_Instrumentation { public void setAttribute(String name, Object value){ boolean isLockAcquired = acquireLockIfPossible(hashCode()); AbstractOperation operation = null; - boolean isOwaspHookEnabled = NewRelic.getAgent().getConfig().getValue(LOW_SEVERITY_HOOKS_ENABLED, DEFAULT); + boolean isOwaspHookEnabled = NewRelicSecurity.getAgent().isLowPriorityInstrumentationEnabled(); if (isOwaspHookEnabled && LowSeverityHelper.isOwaspHookProcessingNeeded()){ if (isLockAcquired) operation = preprocessSecurityHook(name, value, getClass().getName(), "setAttribute"); diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpServletServer.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpServletServer.java similarity index 97% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpServletServer.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpServletServer.java index b1d93aa2c..911f76bbb 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpServletServer.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpServletServer.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet6; import jakarta.servlet.annotation.WebServlet; import org.apache.catalina.Context; diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpServletTest.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpServletTest.java similarity index 96% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpServletTest.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpServletTest.java index 5e0811620..4b41ca20a 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/HttpServletTest.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpServletTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet6; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -18,7 +18,7 @@ import java.net.URL; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet6" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class HttpServletTest { @ClassRule diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpSessionTest.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpSessionTest.java similarity index 98% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpSessionTest.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpSessionTest.java index 21379cd69..5cfb1b016 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpSessionTest.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpSessionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet6; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -21,7 +21,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet6" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class HttpSessionTest { @ClassRule diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpTestServlet.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpTestServlet.java similarity index 99% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpTestServlet.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpTestServlet.java index 9c604253d..098ffed0a 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/HttpTestServlet.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/HttpTestServlet.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet6; import jakarta.servlet.ServletException; import jakarta.servlet.ServletInputStream; diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletInputStreamTest.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletInputStreamTest.java similarity index 98% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletInputStreamTest.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletInputStreamTest.java index fe2a5f344..d234d30be 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletInputStreamTest.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletInputStreamTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet6; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -23,7 +23,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet6" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletInputStreamTest { @@ -96,6 +96,7 @@ private String read() throws IOException, URISyntaxException { return POST_PARAMS; } + @Trace(dispatcher = true) private String readLine() throws IOException, URISyntaxException { String method = "POST"; @@ -111,6 +112,7 @@ private String readLineWithOff() throws IOException, URISyntaxException { makeRequest(method, POST_PARAMS, "readLine/withOff"); return POST_PARAMS.substring(0,5); } + private void makeRequest( String Method, final String POST_PARAMS, String path) throws URISyntaxException, IOException{ URL u = servlet.getEndPoint("inputStream/"+ path).toURL(); diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletOutputStreamTest.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletOutputStreamTest.java similarity index 99% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletOutputStreamTest.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletOutputStreamTest.java index eeca02129..d417c55b3 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletOutputStreamTest.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletOutputStreamTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet6; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -25,7 +25,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet6" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletOutputStreamTest { diff --git a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletRequestTest.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletRequestTest.java similarity index 98% rename from instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletRequestTest.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletRequestTest.java index 348fa8727..64035182d 100644 --- a/instrumentation-security/servlet-5.0/src/test/java/com/nr/instrumentation/security/servlet5/ServletRequestTest.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletRequestTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet5; +package com.nr.agent.security.instrumentation.servlet6; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -32,7 +32,7 @@ import java.util.Map; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "jakarta.servlet") +@InstrumentationTestConfig(includePrefixes = {"jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet6" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletRequestTest { diff --git a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletResponseTest.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletResponseTest.java similarity index 96% rename from instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletResponseTest.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletResponseTest.java index a52a49d56..e069ba5fb 100644 --- a/instrumentation-security/servlet-2.4/src/test/java/com/nr/instrumentation/security/servlet24/ServletResponseTest.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletResponseTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet24; +package com.nr.agent.security.instrumentation.servlet6; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -26,7 +26,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "javax.servlet") +@InstrumentationTestConfig(includePrefixes = {"jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet6" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletResponseTest { @ClassRule diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletTest.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletTest.java similarity index 93% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletTest.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletTest.java index 03df38043..8e0124b82 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/ServletTest.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/ServletTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet6; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -22,7 +22,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = "jakarta.servlet") +@InstrumentationTestConfig(includePrefixes = {"jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet6"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ServletTest { diff --git a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/WebServletTest.java b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/WebServletTest.java similarity index 93% rename from instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/WebServletTest.java rename to instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/WebServletTest.java index 9da133d95..cab44e521 100644 --- a/instrumentation-security/servlet-6.0/src/test/java/com/nr/instrumentation/security/servlet6/WebServletTest.java +++ b/instrumentation-security/servlet-6.0/src/test/java/com/nr/agent/security/instrumentation/servlet6/WebServletTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.servlet6; +package com.nr.agent.security.instrumentation.servlet6; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -17,7 +17,7 @@ import java.net.URL; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet" }) +@InstrumentationTestConfig(includePrefixes = { "jakarta.servlet", "com.newrelic.agent.security.instrumentation.servlet6" }) public class WebServletTest { @ClassRule public static HttpServletServer server = new HttpServletServer(); diff --git a/instrumentation-security/spring-web/src/main/java/com/nr/agent/instrumentation/SpringController_Instrumentation.java b/instrumentation-security/spring-web/src/main/java/com/newrelic/agent/security/instrumentation/springweb/SpringController_Instrumentation.java similarity index 95% rename from instrumentation-security/spring-web/src/main/java/com/nr/agent/instrumentation/SpringController_Instrumentation.java rename to instrumentation-security/spring-web/src/main/java/com/newrelic/agent/security/instrumentation/springweb/SpringController_Instrumentation.java index 0e9f9626b..9776c311c 100644 --- a/instrumentation-security/spring-web/src/main/java/com/nr/agent/instrumentation/SpringController_Instrumentation.java +++ b/instrumentation-security/spring-web/src/main/java/com/newrelic/agent/security/instrumentation/springweb/SpringController_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation; +package com.newrelic.agent.security.instrumentation.springweb; import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper; import com.newrelic.api.agent.weaver.MatchType; diff --git a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/app/App.java b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/app/App.java similarity index 98% rename from instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/app/App.java rename to instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/app/App.java index 4b6e2054f..69ea5965c 100644 --- a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/app/App.java +++ b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/app/App.java @@ -4,7 +4,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.springweb.app; +package com.nr.agent.security.instrumentation.springweb.springweb.app; import com.newrelic.api.agent.Trace; diff --git a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/app/TestMappings.java b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/app/TestMappings.java similarity index 94% rename from instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/app/TestMappings.java rename to instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/app/TestMappings.java index b5ea77522..d025c09bc 100644 --- a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/app/TestMappings.java +++ b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/app/TestMappings.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.springweb.app;/* +package com.nr.agent.security.instrumentation.springweb.springweb.app;/* * * * Copyright 2020 New Relic Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 diff --git a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/app/TestMappingsWithRest.java b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/app/TestMappingsWithRest.java similarity index 95% rename from instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/app/TestMappingsWithRest.java rename to instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/app/TestMappingsWithRest.java index b652fc620..af92b0f84 100644 --- a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/app/TestMappingsWithRest.java +++ b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/app/TestMappingsWithRest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.springweb.app;/* +package com.nr.agent.security.instrumentation.springweb.springweb.app;/* * * * Copyright 2020 New Relic Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 diff --git a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/test/SpringControllerTest.java b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/test/SpringControllerTest.java similarity index 93% rename from instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/test/SpringControllerTest.java rename to instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/test/SpringControllerTest.java index 73de8ee0c..9a8038943 100644 --- a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/test/SpringControllerTest.java +++ b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/test/SpringControllerTest.java @@ -4,13 +4,13 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package com.nr.instrumentation.security.springweb.test; +package com.nr.agent.security.instrumentation.springweb.springweb.test; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; import com.newrelic.api.agent.security.schema.AgentMetaData; -import com.nr.instrumentation.security.springweb.app.App; +import com.nr.agent.security.instrumentation.springweb.springweb.app.App; import org.junit.Assert; import org.junit.FixMethodOrder; import org.junit.Test; @@ -18,7 +18,7 @@ import org.junit.runners.MethodSorters; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.nr.agent.instrumentation" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.agent.security.instrumentation.springweb" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class SpringControllerTest { diff --git a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/test/SpringRestControllerTest.java b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/test/SpringRestControllerTest.java similarity index 93% rename from instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/test/SpringRestControllerTest.java rename to instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/test/SpringRestControllerTest.java index e527ea55d..ae4bfa3be 100644 --- a/instrumentation-security/spring-web/src/test/java/com/nr/instrumentation/security/springweb/test/SpringRestControllerTest.java +++ b/instrumentation-security/spring-web/src/test/java/com/nr/agent/security/instrumentation/springweb/springweb/test/SpringRestControllerTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.springweb.test;/* +package com.nr.agent.security.instrumentation.springweb.springweb.test;/* * * * Copyright 2020 New Relic Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,7 @@ import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; import com.newrelic.agent.security.introspec.SecurityIntrospector; import com.newrelic.api.agent.security.schema.AgentMetaData; -import com.nr.instrumentation.security.springweb.app.App; +import com.nr.agent.security.instrumentation.springweb.springweb.app.App; import org.junit.Assert; import org.junit.FixMethodOrder; import org.junit.Test; @@ -17,7 +17,7 @@ import org.junit.runners.MethodSorters; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.nr.agent.instrumentation" }) +@InstrumentationTestConfig(includePrefixes = { "com.newrelic.agent.security.instrumentation.springweb" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class SpringRestControllerTest { diff --git a/instrumentation-security/unboundid-ldapsdk/src/main/java/com/nr/instrumentation/security/unboundid/ldap/LDAPUtils.java b/instrumentation-security/unboundid-ldapsdk/src/main/java/com/newrelic/agent/security/instrumentation/unboundid/ldap/LDAPUtils.java similarity index 72% rename from instrumentation-security/unboundid-ldapsdk/src/main/java/com/nr/instrumentation/security/unboundid/ldap/LDAPUtils.java rename to instrumentation-security/unboundid-ldapsdk/src/main/java/com/newrelic/agent/security/instrumentation/unboundid/ldap/LDAPUtils.java index a0f8a8714..e4fe9b118 100644 --- a/instrumentation-security/unboundid-ldapsdk/src/main/java/com/nr/instrumentation/security/unboundid/ldap/LDAPUtils.java +++ b/instrumentation-security/unboundid-ldapsdk/src/main/java/com/newrelic/agent/security/instrumentation/unboundid/ldap/LDAPUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.unboundid.ldap; +package com.newrelic.agent.security.instrumentation.unboundid.ldap; public class LDAPUtils { diff --git a/instrumentation-security/unboundid-ldapsdk/src/main/java/com/unboundid/ldap/sdk/LDAPInterface_Instrumentation.java b/instrumentation-security/unboundid-ldapsdk/src/main/java/com/unboundid/ldap/sdk/LDAPInterface_Instrumentation.java index f889803be..047719eb6 100644 --- a/instrumentation-security/unboundid-ldapsdk/src/main/java/com/unboundid/ldap/sdk/LDAPInterface_Instrumentation.java +++ b/instrumentation-security/unboundid-ldapsdk/src/main/java/com/unboundid/ldap/sdk/LDAPInterface_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.unboundid.ldap.LDAPUtils; +import com.newrelic.agent.security.instrumentation.unboundid.ldap.LDAPUtils; @Weave(type = MatchType.Interface, originalName = "com.unboundid.ldap.sdk.LDAPInterface") public class LDAPInterface_Instrumentation { diff --git a/instrumentation-security/unboundid-ldapsdk/src/test/java/com/nr/instrumentation/security/unboundid/ldap/sdk/LDAPInterfaceTest.java b/instrumentation-security/unboundid-ldapsdk/src/test/java/com/nr/agent/security/instrumentation/unboundid/ldap/LDAPInterfaceTest.java similarity index 98% rename from instrumentation-security/unboundid-ldapsdk/src/test/java/com/nr/instrumentation/security/unboundid/ldap/sdk/LDAPInterfaceTest.java rename to instrumentation-security/unboundid-ldapsdk/src/test/java/com/nr/agent/security/instrumentation/unboundid/ldap/LDAPInterfaceTest.java index 633e2c7d8..d1d411628 100644 --- a/instrumentation-security/unboundid-ldapsdk/src/test/java/com/nr/instrumentation/security/unboundid/ldap/sdk/LDAPInterfaceTest.java +++ b/instrumentation-security/unboundid-ldapsdk/src/test/java/com/nr/agent/security/instrumentation/unboundid/ldap/LDAPInterfaceTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.unboundid.ldap.sdk; +package com.nr.agent.security.instrumentation.unboundid.ldap; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -26,7 +26,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = { "com.unboundid.ldap.sdk", "com.nr.instrumentation.security.unboundid.ldap.LDAPUtils" }) +@InstrumentationTestConfig(includePrefixes = { "com.unboundid.ldap.sdk", "com.newrelic.agent.security.instrumentation.unboundid.ldap.LDAPUtils" }) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class LDAPInterfaceTest { public static final String DOMAIN_DSN = "dc=example,dc=com"; diff --git a/instrumentation-security/urlconnection/src/main/java/com/nr/agent/instrumentation/security/urlconnection/Helper.java b/instrumentation-security/urlconnection/src/main/java/com/newrelic/agent/security/instrumentation/urlconnection/Helper.java similarity index 85% rename from instrumentation-security/urlconnection/src/main/java/com/nr/agent/instrumentation/security/urlconnection/Helper.java rename to instrumentation-security/urlconnection/src/main/java/com/newrelic/agent/security/instrumentation/urlconnection/Helper.java index b1568df8e..f2516373c 100644 --- a/instrumentation-security/urlconnection/src/main/java/com/nr/agent/instrumentation/security/urlconnection/Helper.java +++ b/instrumentation-security/urlconnection/src/main/java/com/newrelic/agent/security/instrumentation/urlconnection/Helper.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.security.urlconnection; +package com.newrelic.agent.security.instrumentation.urlconnection; public class Helper { diff --git a/instrumentation-security/urlconnection/src/main/java/com/nr/agent/instrumentation/security/urlconnection/URLConnection_Instrumentation.java b/instrumentation-security/urlconnection/src/main/java/com/newrelic/agent/security/instrumentation/urlconnection/URLConnection_Instrumentation.java similarity index 99% rename from instrumentation-security/urlconnection/src/main/java/com/nr/agent/instrumentation/security/urlconnection/URLConnection_Instrumentation.java rename to instrumentation-security/urlconnection/src/main/java/com/newrelic/agent/security/instrumentation/urlconnection/URLConnection_Instrumentation.java index b3a0711cf..7016be985 100644 --- a/instrumentation-security/urlconnection/src/main/java/com/nr/agent/instrumentation/security/urlconnection/URLConnection_Instrumentation.java +++ b/instrumentation-security/urlconnection/src/main/java/com/newrelic/agent/security/instrumentation/urlconnection/URLConnection_Instrumentation.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.security.urlconnection; +package com.newrelic.agent.security.instrumentation.urlconnection; import com.newrelic.api.agent.security.NewRelicSecurity; import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper; diff --git a/instrumentation-security/urlconnection/src/test/java/com/nr/instrumentation/security/urlconnection/URLConnectionTest.java b/instrumentation-security/urlconnection/src/test/java/com/nr/agent/security/instrumentation/urlconnection/URLConnectionTest.java similarity index 99% rename from instrumentation-security/urlconnection/src/test/java/com/nr/instrumentation/security/urlconnection/URLConnectionTest.java rename to instrumentation-security/urlconnection/src/test/java/com/nr/agent/security/instrumentation/urlconnection/URLConnectionTest.java index f484558c5..a3b643dc1 100644 --- a/instrumentation-security/urlconnection/src/test/java/com/nr/instrumentation/security/urlconnection/URLConnectionTest.java +++ b/instrumentation-security/urlconnection/src/test/java/com/nr/agent/security/instrumentation/urlconnection/URLConnectionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.urlconnection; +package com.nr.agent.security.instrumentation.urlconnection; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -21,7 +21,7 @@ import java.util.UUID; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.nr.agent.instrumentation.security.urlconnection"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.urlconnection"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class URLConnectionTest { diff --git a/instrumentation-security/urlconnection/src/test/java/com/nr/instrumentation/security/urlconnection/ftp/FTPConnectionTest.java b/instrumentation-security/urlconnection/src/test/java/com/nr/agent/security/instrumentation/urlconnection/ftp/FTPConnectionTest.java similarity index 98% rename from instrumentation-security/urlconnection/src/test/java/com/nr/instrumentation/security/urlconnection/ftp/FTPConnectionTest.java rename to instrumentation-security/urlconnection/src/test/java/com/nr/agent/security/instrumentation/urlconnection/ftp/FTPConnectionTest.java index 69ae394aa..6fab4473d 100644 --- a/instrumentation-security/urlconnection/src/test/java/com/nr/instrumentation/security/urlconnection/ftp/FTPConnectionTest.java +++ b/instrumentation-security/urlconnection/src/test/java/com/nr/agent/security/instrumentation/urlconnection/ftp/FTPConnectionTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.urlconnection.ftp; +package com.nr.agent.security.instrumentation.urlconnection.ftp; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; @@ -20,7 +20,7 @@ import java.util.List; @RunWith(SecurityInstrumentationTestRunner.class) -@InstrumentationTestConfig(includePrefixes = {"com.nr.agent.instrumentation.security.urlconnection"}) +@InstrumentationTestConfig(includePrefixes = {"com.newrelic.agent.security.instrumentation.urlconnection"}) @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class FTPConnectionTest { private static final String FTP_USER = "user"; diff --git a/instrumentation-security/xalan-xpath/src/main/java/com/nr/instrumentation/security/xpath/xalan/XPATHUtils.java b/instrumentation-security/xalan-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xalan/xpath/XPATHUtils.java similarity index 73% rename from instrumentation-security/xalan-xpath/src/main/java/com/nr/instrumentation/security/xpath/xalan/XPATHUtils.java rename to instrumentation-security/xalan-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xalan/xpath/XPATHUtils.java index a7a995b08..26cb49978 100644 --- a/instrumentation-security/xalan-xpath/src/main/java/com/nr/instrumentation/security/xpath/xalan/XPATHUtils.java +++ b/instrumentation-security/xalan-xpath/src/main/java/com/newrelic/agent/security/instrumentation/xalan/xpath/XPATHUtils.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xpath.xalan; +package com.newrelic.agent.security.instrumentation.xalan.xpath; public class XPATHUtils { diff --git a/instrumentation-security/xalan-xpath/src/main/java/org/apache/xpath/XPath_Instrumentation.java b/instrumentation-security/xalan-xpath/src/main/java/org/apache/xpath/XPath_Instrumentation.java index 89c705b87..725d1b89f 100644 --- a/instrumentation-security/xalan-xpath/src/main/java/org/apache/xpath/XPath_Instrumentation.java +++ b/instrumentation-security/xalan-xpath/src/main/java/org/apache/xpath/XPath_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.instrumentation.security.xpath.xalan.XPATHUtils; +import com.newrelic.agent.security.instrumentation.xalan.xpath.XPATHUtils; import org.apache.xml.utils.PrefixResolver; import org.apache.xpath.objects.XObject; import org.w3c.dom.Node; diff --git a/instrumentation-security/xalan-xpath/src/test/java/com/nr/instrumentation/security/xalan/xpath/XPathTest.java b/instrumentation-security/xalan-xpath/src/test/java/com/nr/agent/security/instrumentation/xalan/xpath/XPathTest.java similarity index 98% rename from instrumentation-security/xalan-xpath/src/test/java/com/nr/instrumentation/security/xalan/xpath/XPathTest.java rename to instrumentation-security/xalan-xpath/src/test/java/com/nr/agent/security/instrumentation/xalan/xpath/XPathTest.java index b15233497..da295bff3 100644 --- a/instrumentation-security/xalan-xpath/src/test/java/com/nr/instrumentation/security/xalan/xpath/XPathTest.java +++ b/instrumentation-security/xalan-xpath/src/test/java/com/nr/agent/security/instrumentation/xalan/xpath/XPathTest.java @@ -1,4 +1,4 @@ -package com.nr.instrumentation.security.xalan.xpath; +package com.nr.agent.security.instrumentation.xalan.xpath; import com.newrelic.agent.security.introspec.InstrumentationTestConfig; import com.newrelic.agent.security.introspec.SecurityInstrumentationTestRunner; diff --git a/newrelic-security-agent/src/main/java/com/newrelic/api/agent/security/Agent.java b/newrelic-security-agent/src/main/java/com/newrelic/api/agent/security/Agent.java index 2d2e4f815..da12defa9 100644 --- a/newrelic-security-agent/src/main/java/com/newrelic/api/agent/security/Agent.java +++ b/newrelic-security-agent/src/main/java/com/newrelic/api/agent/security/Agent.java @@ -497,4 +497,9 @@ public void setInitialised(boolean initialised) { public Instrumentation getInstrumentation() { return this.instrumentation; } + + @Override + public boolean isLowPriorityInstrumentationEnabled() { + return NewRelic.getAgent().getConfig().getValue(LowSeverityHelper.LOW_SEVERITY_HOOKS_ENABLED, LowSeverityHelper.DEFAULT); + } } \ No newline at end of file diff --git a/newrelic-security-api-test-impl/src/main/java/com/newrelic/api/agent/security/Agent.java b/newrelic-security-api-test-impl/src/main/java/com/newrelic/api/agent/security/Agent.java index cf67441cb..2b57c8bcb 100644 --- a/newrelic-security-api-test-impl/src/main/java/com/newrelic/api/agent/security/Agent.java +++ b/newrelic-security-api-test-impl/src/main/java/com/newrelic/api/agent/security/Agent.java @@ -2,6 +2,7 @@ import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.Transaction; +import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.SecurityMetaData; import com.newrelic.api.agent.security.schema.policy.AgentPolicy; @@ -131,4 +132,9 @@ public String getAgentTempDir() { public Instrumentation getInstrumentation() { return null; } + + @Override + public boolean isLowPriorityInstrumentationEnabled() { + return true; + } } \ No newline at end of file diff --git a/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/NoOpAgent.java b/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/NoOpAgent.java index c3131db9b..9fd955bf6 100644 --- a/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/NoOpAgent.java +++ b/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/NoOpAgent.java @@ -7,6 +7,7 @@ package com.newrelic.api.agent.security; +import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper; import com.newrelic.api.agent.security.schema.AbstractOperation; import com.newrelic.api.agent.security.schema.SecurityMetaData; import com.newrelic.api.agent.security.schema.policy.AgentPolicy; @@ -72,4 +73,9 @@ public Instrumentation getInstrumentation() { return null; } + @Override + public boolean isLowPriorityInstrumentationEnabled() { + return false; + } + } diff --git a/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/SecurityAgent.java b/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/SecurityAgent.java index bc9ad3dfd..dbb89481e 100644 --- a/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/SecurityAgent.java +++ b/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/SecurityAgent.java @@ -43,4 +43,6 @@ public interface SecurityAgent { String getAgentTempDir(); Instrumentation getInstrumentation(); + + boolean isLowPriorityInstrumentationEnabled(); }