-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Remove connect SocketPermissions from core #22797
Remove connect SocketPermissions from core #22797
Conversation
This is related to elastic#22116. Core no longer needs `SocketPermission` `connect`. This permission is relegated to these modules/plugins: - transport-netty4 module - reindex module - repository-url module - discovery-azure-classic plugin - discovery-ec2 plugin - discovery-gce plugin - repository-azure plugin - repository-gcs plugin - repository-hdfs plugin - repository-s3 plugin And for tests: - mocksocket jar - rest client - httpcore-nio jar - httpasyncclient jar
A couple notes:
|
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.
LGTM
@@ -55,8 +55,8 @@ grant { | |||
// third party code, to safeguard these against unprivileged code like scripts. | |||
permission org.elasticsearch.SpecialPermission; | |||
|
|||
// Allow connecting to the internet anywhere | |||
permission java.net.SocketPermission "*", "connect,resolve"; | |||
// Allow host/ip name service lookups |
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.
w00t
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 left one comment.
permission java.net.SocketPermission "*", "connect"; | ||
}; | ||
|
||
grant codeBase "${codebase.httpcore-nio-4.4.5.jar}" { |
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.
Can you add comments to the places where these dependencies are defined that if the version is changed then the version needs to be updated here too? (This comment applies to all of the dependencies for which we have to supply these permissions.)
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 left one more comment.
}; | ||
|
||
|
||
grant codeBase "${codebase.rest-6.0.0-alpha1-SNAPSHOT.jar}" { |
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.
Does this one deserve a comment too, above the elasticsearch
version in version.properties?
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.
LGTM.
This permission is relegated to these modules/plugins:
And for tests: