-
Notifications
You must be signed in to change notification settings - Fork 165
Support phasing off SecurityManager usage in favor of Java Agent #3724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
build.gradle
Outdated
dependencies { | ||
agent "org.opensearch:opensearch-agent-bootstrap:${opensearch_version}" | ||
agent "org.opensearch:opensearch-agent:${opensearch_version}" | ||
agent "net.bytebuddy:byte-buddy:1.17.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once this PR is green. I can try using agent "net.bytebuddy:byte-buddy:${versions.bytebuddy}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can send similar PR to all repos or remove after RC1.
Better solution will be implementing opensearch-project/OpenSearch#17900 in RC2.
build.gradle
Outdated
tasks.withType(Test) { | ||
dependsOn prepareAgent | ||
jvmArgs += ["-javaagent:" + project.layout.buildDirectory.file("agent/opensearch-agent-${opensearch_version}.jar").get()] | ||
} | ||
|
||
task prepareAgent(type: Copy) { | ||
from(configurations.agent) | ||
into "$buildDir/agent" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should not be nested within allprojects
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, i also think so. figuring that out.
c774cc0
to
a9523c2
Compare
a9523c2
to
ecb1d75
Compare
I have tested with this PR opensearch-project/OpenSearch#17900, just adding |
that's only when opensearch-project/OpenSearch#17900 is merged? |
Yes Once merged, its under review hope to get the PR merged soon. |
ecb1d75
to
297b51b
Compare
5016cbe
to
12dff37
Compare
Signed-off-by: Gulshan <[email protected]>
12dff37
to
bcc0f72
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3724 +/- ##
============================================
- Coverage 80.32% 79.11% -1.22%
- Complexity 7092 7115 +23
============================================
Files 621 623 +2
Lines 30937 31578 +641
Branches 3494 3571 +77
============================================
+ Hits 24851 24983 +132
- Misses 4574 5054 +480
- Partials 1512 1541 +29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -83,7 +83,16 @@ allprojects { | |||
} | |||
|
|||
project.getExtensions().getExtraProperties().set("versions", VersionProperties.getVersions()); | |||
} | |||
|
|||
configurations { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, if we are already doing this in the root gradle file, do we still need to do the same for all the modules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup. one way to not do it across other modules is to include these on sub-projects, but that hasn't given me much of a success.
As-of-now, it seems like duplicating it across modules works. However this change in temporary to keep us unblocked. We may just define it at one place after this PR opensearch-project/OpenSearch#17900 is being merged and tested once.
Closing as #3727 is merged now. Thanks. |
Description
With Java agent as a replacement to security manager, we start enforcing access to UnixDomainSockets. On windows since UnixDomainSockets are used for loopback address windows builds are now starting to fail for skills and flow-framework.
Additionally for this plugin's integ test to work, it will need a new jvm args to be passed. this change also includes the JVM args included in build.gradle.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.