Skip to content

Commit dfd91e0

Browse files
authored
Fix SimpleKdcLdapServerTests by overriding java.locale.providers (#60447)
The JDK system property makes sure date digits are always represented as ASCII chars. This in turn helps the Kerberos response to be correctly encoded and recognised by the client. Resolves: #57749
1 parent 0299031 commit dfd91e0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

x-pack/qa/evil-tests/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ dependencies {
66
}
77

88
unitTest {
9+
if (project.runtimeJavaVersion >= JavaVersion.VERSION_1_9) {
10+
systemProperty 'java.locale.providers', 'COMPAT'
11+
}
912
systemProperty 'tests.security.manager', 'false'
1013
include '**/*Tests.class'
1114
}

x-pack/qa/evil-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/SimpleKdcLdapServerTests.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import com.unboundid.ldap.sdk.SearchScope;
1212

1313
import org.elasticsearch.action.support.PlainActionFuture;
14-
import org.elasticsearch.bootstrap.JavaVersion;
1514
import org.elasticsearch.common.collect.Tuple;
1615
import org.elasticsearch.common.settings.SecureString;
1716
import org.elasticsearch.env.Environment;
@@ -51,9 +50,6 @@ public void testPrincipalCreationAndSearchOnLdap() throws Exception {
5150
}
5251

5352
public void testClientServiceMutualAuthentication() throws PrivilegedActionException, GSSException, LoginException, ParseException {
54-
assumeFalse("Java 15-ea causes issues with this test, see https://github.com/elastic/elasticsearch/issues/57749",
55-
JavaVersion.current().compareTo(JavaVersion.parse("15")) >= 0);
56-
5753
final String serviceUserName = randomFrom(serviceUserNames);
5854
// Client login and init token preparation
5955
final String clientUserName = randomFrom(clientUserNames);

0 commit comments

Comments
 (0)