Skip to content

Commit bba1da6

Browse files
authored
Add new permission for JDK11 to load JAAS libraries (#32132)
Hadoop's security model uses the OS level authentication modules to collect information about the current user. In JDK 11, the UnixLoginModule makes use of a new permission to determine if the executing code is allowed to load the libraries required to pull the user information from the OS. This PR adds that permission and re-enables the tests that were previously failing when testing against JDK 11.
1 parent 0b72132 commit bba1da6

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

plugins/repository-hdfs/build.gradle

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1/*
1+
/*
22
* Licensed to Elasticsearch under one or more contributor
33
* license agreements. See the NOTICE file distributed with
44
* this work for additional information regarding copyright
@@ -214,25 +214,6 @@ RestIntegTestTask integTestSecureHa = project.tasks.create('integTestSecureHa',
214214
description = "Runs rest tests against an elasticsearch cluster with HDFS configured with HA Namenode and secured by MIT Kerberos."
215215
}
216216

217-
if (rootProject.ext.compilerJavaVersion.isJava11()) {
218-
// TODO remove when: https://github.com/elastic/elasticsearch/issues/31498
219-
integTestRunner {
220-
systemProperty 'tests.rest.blacklist', [
221-
'hdfs_repository/30_snapshot/take snapshot',
222-
'hdfs_repository/40_restore/Create a snapshot and then restore it',
223-
'hdfs_repository/20_repository_verify/HDFS Repository Verify',
224-
'hdfs_repository/30_snapshot_get/Get a snapshot',
225-
'hdfs_repository/20_repository_create/HDFS Repository Creation',
226-
'hdfs_repository/20_repository_delete/HDFS Delete Repository',
227-
'hdfs_repository/30_snapshot_readonly/Get a snapshot - readonly',
228-
].join(',')
229-
}
230-
}
231-
if (rootProject.ext.runtimeJavaVersion.isJava11() || rootProject.ext.compilerJavaVersion.isJava11()) {
232-
// TODO remove when: https://github.com/elastic/elasticsearch/issues/31498
233-
integTestHa.enabled = false
234-
}
235-
236217
// Determine HDFS Fixture compatibility for the current build environment.
237218
boolean fixtureSupported = false
238219
if (Os.isFamily(Os.FAMILY_WINDOWS)) {

plugins/repository-hdfs/src/main/plugin-metadata/plugin-security.policy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ grant {
6161

6262
// Hadoop depends on OS level user information for simple authentication
6363
// Unix: UnixLoginModule: com.sun.security.auth.module.UnixSystem.UnixSystem init
64+
permission java.lang.RuntimePermission "loadLibrary.jaas";
6465
permission java.lang.RuntimePermission "loadLibrary.jaas_unix";
6566
// Windows: NTLoginModule: com.sun.security.auth.module.NTSystem.loadNative
6667
permission java.lang.RuntimePermission "loadLibrary.jaas_nt";

0 commit comments

Comments
 (0)