You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2019/10/06 08:45:19 UTC
[qpid-broker-j] branch 7.1.x updated: QPID-8363: [Broker-J] Fix
tests for JDK11 and above
This is an automated email from the ASF dual-hosted git repository.
orudyy pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git
The following commit(s) were added to refs/heads/7.1.x by this push:
new 3d46865 QPID-8363: [Broker-J] Fix tests for JDK11 and above
3d46865 is described below
commit 3d46865582702fe5bdca6b8784fba6141eca5260
Author: Alex Rudyy <or...@apache.org>
AuthorDate: Sun Oct 6 09:41:10 2019 +0100
QPID-8363: [Broker-J] Fix tests for JDK11 and above
(cherry picked from commit 7e533a36cbb69cdf0cde90f7ccb095ccfe659fe0)
---
.../auth/manager/SimpleLDAPAuthenticationManagerTest.java | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManagerTest.java b/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManagerTest.java
index 590f076..3f6efa5 100644
--- a/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManagerTest.java
+++ b/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManagerTest.java
@@ -125,6 +125,8 @@ import org.apache.qpid.test.utils.UnitTestBase;
{
@CreateTransport(protocol = "TCP", port = 0)
},
+ kdcPrincipal="krbtgt/QPID.ORG@QPID.ORG",
+ primaryRealm="QPID.ORG",
searchBaseDn = "ou=users,dc=qpid,dc=org")
@ApplyLdifFiles("users.ldif")
public class SimpleLDAPAuthenticationManagerTest extends UnitTestBase
@@ -378,6 +380,13 @@ public class SimpleLDAPAuthenticationManagerTest extends UnitTestBase
final KdcServer kdcServer =
ServerAnnotationProcessor.getKdcServer(LDAP.getDirectoryService(), ldapServer.getPort() + 1);
kdcServer.getConfig().setPaEncTimestampRequired(false);
+
+ final int port = kdcServer.getTransports()[0].getPort();
+ final String krb5confPath = createKrb5Conf(port);
+ SYSTEM_PROPERTY_SETTER.setSystemProperty("java.security.krb5.conf", krb5confPath);
+ SYSTEM_PROPERTY_SETTER.setSystemProperty("java.security.krb5.realm", null);
+ SYSTEM_PROPERTY_SETTER.setSystemProperty("java.security.krb5.kdc", null);
+
final KerberosPrincipal servicePrincipal =
new KerberosPrincipal(LDAP_SERVICE_NAME + "/" + HOSTNAME + "@" + REALM,
KerberosPrincipal.KRB_NT_SRV_HST);
@@ -387,9 +396,6 @@ public class SimpleLDAPAuthenticationManagerTest extends UnitTestBase
ldapServer.setSaslPrincipal(servicePrincipalName);
ldapServer.setSearchBaseDn(USERS_DN);
- final String krb5confPath = createKrb5Conf(kdcServer.getTransports()[0].getPort());
- SYSTEM_PROPERTY_SETTER.setSystemProperty("java.security.krb5.conf", krb5confPath);
-
createPrincipal("KDC", "KDC", "krbtgt", UUID.randomUUID().toString(), "krbtgt/" + REALM + "@" + REALM);
createPrincipal("Service", "LDAP Service", "ldap", UUID.randomUUID().toString(), servicePrincipalName);
}
@@ -410,6 +416,9 @@ public class SimpleLDAPAuthenticationManagerTest extends UnitTestBase
final String config = String.format("[libdefaults]%1$s"
+ " default_realm = %2$s%1$s"
+ " udp_preference_limit = 1%1$s"
+ + " default_tkt_enctypes = aes128-cts-hmac-sha1-96 rc4-hmac%1$s"
+ + " default_tgs_enctypes = aes128-cts-hmac-sha1-96 rc4-hmac%1$s"
+ + " permitted_enctypes = aes128-cts-hmac-sha1-96 rc4-hmac%1$s"
+ "[realms]%1$s"
+ " %2$s = {%1$s"
+ " kdc = %3$s%1$s"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org