Skip to content

Commit

Permalink
[Security Manager Replacement] Native Java Agent (dynamic code rewrit…
Browse files Browse the repository at this point in the history
…ing, must be low overhead)

Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Nov 27, 2024
1 parent 5817710 commit 7088bf8
Show file tree
Hide file tree
Showing 11 changed files with 3,823 additions and 15 deletions.
4 changes: 2 additions & 2 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ if (project != rootProject) {

allprojects {
java {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
}
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/resources/minimumRuntimeVersion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11
17
26 changes: 14 additions & 12 deletions libs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,21 @@ subprojects {
* other libs. This keeps our dependencies simpler.
*/
project.afterEvaluate {
configurations.all { Configuration conf ->
dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
Project depProject = project.project(dep.path)
if (depProject != null
&& (false == depProject.path.equals(':libs:opensearch-core') &&
false == depProject.path.equals(':libs:opensearch-common'))
&& depProject.path.startsWith(':libs')) {
throw new InvalidUserDataException("projects in :libs "
+ "may not depend on other projects libs except "
+ ":libs:opensearch-core or :libs:opensearch-common but "
+ "${project.path} depends on ${depProject.path}")
if (!project.path.equals(':libs:agent-sm:agent')) {
configurations.all { Configuration conf ->
dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
Project depProject = project.project(dep.path)
if (depProject != null
&& (false == depProject.path.equals(':libs:opensearch-core') &&
false == depProject.path.equals(':libs:opensearch-common'))
&& depProject.path.startsWith(':libs')) {
throw new InvalidUserDataException("projects in :libs "
+ "may not depend on other projects libs except "
+ ":libs:opensearch-core or :libs:opensearch-common but "
+ "${project.path} depends on ${depProject.path}")
}
}
}
}
}
}
}
Loading

0 comments on commit 7088bf8

Please sign in to comment.