From e33fd7320029473357437859558bffa09e6c7b41 Mon Sep 17 00:00:00 2001 From: Ioannis Kakavas Date: Tue, 9 Nov 2021 17:00:27 +0200 Subject: [PATCH 1/2] Unmute Kerberos integ tests (#80538) We used to default enctypes to des3-cbc-sha1-kd but with JDK17, weak encryption types are disabled by default. This caused our Kerberos integration tests to fail with an `sun.security.krb5.KrbException: no supported default etypes for default_tkt_enctypes` exception. We have since changed our default encryption type to aes256-cts-hmac-sha1-96 in #78703 and we can unmute these tests now. # Conflicts: # x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java --- .../authc/kerberos/KerberosAuthenticationIT.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java b/x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java index 4474802357400..b98cdf2356375 100644 --- a/x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java +++ b/x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java @@ -104,11 +104,6 @@ public void testSuppressedOnJDK8u262() { } public void testLoginByKeytab() throws IOException, PrivilegedActionException { - assumeFalse( - "This test fails often on Java 17 early access. See: https://github.com/elastic/elasticsearch/issues/72120", - "17".equals(System.getProperty("java.version")) - ); - testSuppressedOnJDK8u262(); final String userPrincipalName = System.getProperty(TEST_USER_WITH_KEYTAB_KEY); final String keytabPath = System.getProperty(TEST_USER_WITH_KEYTAB_PATH_KEY); final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY)); @@ -121,11 +116,6 @@ public void testLoginByKeytab() throws IOException, PrivilegedActionException { } public void testLoginByUsernamePassword() throws IOException, PrivilegedActionException { - assumeFalse( - "This test fails often on Java 17 early access. See: https://github.com/elastic/elasticsearch/issues/72120", - "17".equals(System.getProperty("java.version")) - ); - testSuppressedOnJDK8u262(); final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY); final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY); final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY)); @@ -138,11 +128,6 @@ public void testLoginByUsernamePassword() throws IOException, PrivilegedActionEx } public void testGetOauth2TokenInExchangeForKerberosTickets() throws PrivilegedActionException, GSSException, IOException { - assumeFalse( - "This test fails often on Java 17 early access. See: https://github.com/elastic/elasticsearch/issues/72120", - "17".equals(System.getProperty("java.version")) - ); - testSuppressedOnJDK8u262(); final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY); final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY); final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY)); From b76806caa7449a474c14c262a152634983ce4945 Mon Sep 17 00:00:00 2001 From: Ioannis Kakavas Date: Tue, 9 Nov 2021 17:59:12 +0200 Subject: [PATCH 2/2] re-introduce mute for 8 --- .../security/authc/kerberos/KerberosAuthenticationIT.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java b/x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java index b98cdf2356375..072fe7a35eee6 100644 --- a/x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java +++ b/x-pack/qa/kerberos-tests/src/test/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationIT.java @@ -104,6 +104,7 @@ public void testSuppressedOnJDK8u262() { } public void testLoginByKeytab() throws IOException, PrivilegedActionException { + testSuppressedOnJDK8u262(); final String userPrincipalName = System.getProperty(TEST_USER_WITH_KEYTAB_KEY); final String keytabPath = System.getProperty(TEST_USER_WITH_KEYTAB_PATH_KEY); final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY)); @@ -116,6 +117,7 @@ public void testLoginByKeytab() throws IOException, PrivilegedActionException { } public void testLoginByUsernamePassword() throws IOException, PrivilegedActionException { + testSuppressedOnJDK8u262(); final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY); final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY); final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY)); @@ -128,6 +130,7 @@ public void testLoginByUsernamePassword() throws IOException, PrivilegedActionEx } public void testGetOauth2TokenInExchangeForKerberosTickets() throws PrivilegedActionException, GSSException, IOException { + testSuppressedOnJDK8u262(); final String userPrincipalName = System.getProperty(TEST_USER_WITH_PWD_KEY); final String password = System.getProperty(TEST_USER_WITH_PWD_PASSWD_KEY); final boolean enabledDebugLogs = Boolean.parseBoolean(System.getProperty(ENABLE_KERBEROS_DEBUG_LOGS_KEY));