Skip to content

Commit

Permalink
Fix SimpleKdcLdapServerTests by overriding java.locale.providers (#60447
Browse files Browse the repository at this point in the history
)

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
  • Loading branch information
ywangd committed Jul 31, 2020
1 parent 0299031 commit dfd91e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions x-pack/qa/evil-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ dependencies {
}

unitTest {
if (project.runtimeJavaVersion >= JavaVersion.VERSION_1_9) {
systemProperty 'java.locale.providers', 'COMPAT'
}
systemProperty 'tests.security.manager', 'false'
include '**/*Tests.class'
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.unboundid.ldap.sdk.SearchScope;

import org.elasticsearch.action.support.PlainActionFuture;
import org.elasticsearch.bootstrap.JavaVersion;
import org.elasticsearch.common.collect.Tuple;
import org.elasticsearch.common.settings.SecureString;
import org.elasticsearch.env.Environment;
Expand Down Expand Up @@ -51,9 +50,6 @@ public void testPrincipalCreationAndSearchOnLdap() throws Exception {
}

public void testClientServiceMutualAuthentication() throws PrivilegedActionException, GSSException, LoginException, ParseException {
assumeFalse("Java 15-ea causes issues with this test, see https://github.com/elastic/elasticsearch/issues/57749",
JavaVersion.current().compareTo(JavaVersion.parse("15")) >= 0);

final String serviceUserName = randomFrom(serviceUserNames);
// Client login and init token preparation
final String clientUserName = randomFrom(clientUserNames);
Expand Down

0 comments on commit dfd91e0

Please sign in to comment.