Skip to content

Commit 6b73ddf

Browse files
committed
[Security Manager Replacement] Native Java Agent (dynamic code rewriting, must be low overhead)
Signed-off-by: Andriy Redko <[email protected]>
1 parent 5817710 commit 6b73ddf

File tree

10 files changed

+3822
-15
lines changed

10 files changed

+3822
-15
lines changed

buildSrc/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ if (project != rootProject) {
171171

172172
allprojects {
173173
java {
174-
targetCompatibility = JavaVersion.VERSION_11
175-
sourceCompatibility = JavaVersion.VERSION_11
174+
targetCompatibility = JavaVersion.VERSION_17
175+
sourceCompatibility = JavaVersion.VERSION_17
176176
}
177177
}
178178

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11
1+
17

libs/build.gradle

+14-12
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,21 @@ subprojects {
4040
* other libs. This keeps our dependencies simpler.
4141
*/
4242
project.afterEvaluate {
43-
configurations.all { Configuration conf ->
44-
dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
45-
Project depProject = project.project(dep.path)
46-
if (depProject != null
47-
&& (false == depProject.path.equals(':libs:opensearch-core') &&
48-
false == depProject.path.equals(':libs:opensearch-common'))
49-
&& depProject.path.startsWith(':libs')) {
50-
throw new InvalidUserDataException("projects in :libs "
51-
+ "may not depend on other projects libs except "
52-
+ ":libs:opensearch-core or :libs:opensearch-common but "
53-
+ "${project.path} depends on ${depProject.path}")
43+
if (!project.path.equals(':libs:agent-sm:agent')) {
44+
configurations.all { Configuration conf ->
45+
dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
46+
Project depProject = project.project(dep.path)
47+
if (depProject != null
48+
&& (false == depProject.path.equals(':libs:opensearch-core') &&
49+
false == depProject.path.equals(':libs:opensearch-common'))
50+
&& depProject.path.startsWith(':libs')) {
51+
throw new InvalidUserDataException("projects in :libs "
52+
+ "may not depend on other projects libs except "
53+
+ ":libs:opensearch-core or :libs:opensearch-common but "
54+
+ "${project.path} depends on ${depProject.path}")
55+
}
56+
}
5457
}
55-
}
5658
}
5759
}
5860
}

0 commit comments

Comments
 (0)