Skip to content
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

Allow file read permissions in plugins #69643

Merged
merged 1 commit into from
Feb 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ void assertIllegalPermissions(List<String> illegalPermissions, PolicyParser pars
}

static final List<String> PLUGIN_TEST_PERMISSIONS = List.of(
// TODO: move this back to module test permissions, see https://github.com/elastic/elasticsearch/issues/69464
"java.io.FilePermission /foo/bar read",

"java.lang.reflect.ReflectPermission suppressAccessChecks",
"java.lang.RuntimePermission createClassLoader",
"java.lang.RuntimePermission getClassLoader",
Expand Down Expand Up @@ -270,7 +273,6 @@ public void testPrivateCredentialPermissionAllowed() throws Exception {
}

static final List<String> MODULE_TEST_PERMISSIONS = List.of(
"java.io.FilePermission /foo/bar read",
"java.io.FilePermission /foo/bar write",
"java.lang.RuntimePermission getFileStoreAttributes",
"java.lang.RuntimePermission accessUserInformation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public boolean test(Permission permission) {
private static final PermissionMatcher ALLOWED_MODULE_PERMISSIONS;
static {
List<Permission> namedPermissions = List.of(
// TODO: remove read permission, see https://github.com/elastic/elasticsearch/issues/69464
createFilePermission("<<ALL FILES>>", "read"),

new ReflectPermission("suppressAccessChecks"),
new RuntimePermission("createClassLoader"),
new RuntimePermission("getClassLoader"),
Expand Down