From 8364b7a2f615b026c8ec0c5249b65134ef8e0fa6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 5 Nov 2023 21:48:29 +0100 Subject: [PATCH] Bump apacheds.version from 2.0.0.AM26 to 2.0.0.AM27 (#10836) * Bump apacheds.version from 2.0.0.AM26 to 2.0.0.AM27 Bumps `apacheds.version` from 2.0.0.AM26 to 2.0.0.AM27. Updates `org.apache.directory.server:apacheds-test-framework` from 2.0.0.AM26 to 2.0.0.AM27 - [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM26...2.0.0.AM27) Updates `org.apache.directory.server:apacheds-server-integ` from 2.0.0.AM26 to 2.0.0.AM27 - [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM26...2.0.0.AM27) Updates `org.apache.directory.server:apacheds-core-integ` from 2.0.0.AM26 to 2.0.0.AM27 - [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM26...2.0.0.AM27) --- updated-dependencies: - dependency-name: org.apache.directory.server:apacheds-test-framework dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.apache.directory.server:apacheds-server-integ dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.apache.directory.server:apacheds-core-integ dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * get this work Signed-off-by: Olivier Lamy --------- Signed-off-by: dependabot[bot] Signed-off-by: Olivier Lamy Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Olivier Lamy --- jetty-jaas/pom.xml | 52 +------------------ .../jetty/jaas/JAASLdapLoginServiceTest.java | 39 +++++--------- 2 files changed, 14 insertions(+), 77 deletions(-) diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index a36db29dfed5..fd2b72d9b713 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -1,3 +1,4 @@ + org.eclipse.jetty @@ -12,31 +13,11 @@ ${project.groupId}.jaas - 2.0.0.AM26 + 2.0.0.AM27 2.1.5 org.eclipse.jetty.jaas.* - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-surefire-plugin - - false - false - true - - - - - org.eclipse.jetty @@ -136,13 +117,6 @@ api-asn1-api ${apache.directory.api.version} - - - org.junit.vintage - junit-vintage-engine - ${junit.version} - test - @@ -166,28 +140,6 @@ - - jdk20 - - [20,) - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - **/JAASLdapLoginServiceTest* - - - - - - - diff --git a/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLdapLoginServiceTest.java b/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLdapLoginServiceTest.java index 36f5b9ebec7e..056f696f23c4 100644 --- a/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLdapLoginServiceTest.java +++ b/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLdapLoginServiceTest.java @@ -24,29 +24,26 @@ import org.apache.directory.server.core.annotations.ApplyLdifs; import org.apache.directory.server.core.annotations.CreateDS; import org.apache.directory.server.core.annotations.CreatePartition; -import org.apache.directory.server.core.integ.FrameworkRunner; -import org.apache.directory.server.ldap.LdapServer; +import org.apache.directory.server.core.integ.AbstractLdapTestUnit; +import org.apache.directory.server.core.integ.ApacheDSTestExtension; import org.eclipse.jetty.jaas.spi.LdapLoginModule; import org.eclipse.jetty.security.DefaultIdentityService; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.UserIdentity; -import org.junit.Test; -import org.junit.jupiter.api.condition.EnabledForJreRange; -import org.junit.jupiter.api.condition.JRE; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * JAASLdapLoginServiceTest */ -@EnabledForJreRange(max = JRE.JAVA_17, disabledReason = "sun.security.x509.X509CertInfo.set not present in Java 21, needs a Java 21 compatible version of Apache Directory Server") -@RunWith(FrameworkRunner.class) +@ExtendWith(ApacheDSTestExtension.class) @CreateLdapServer(transports = {@CreateTransport(protocol = "LDAP")}) -@CreateDS(allowAnonAccess = false, partitions = { +@CreateDS(name = "JAASLdapLoginServiceTest-class", partitions = { @CreatePartition(name = "Users Partition", suffix = "ou=people,dc=jetty,dc=org"), @CreatePartition(name = "Groups Partition", suffix = "ou=groups,dc=jetty,dc=org") }) @@ -116,10 +113,8 @@ "uniquemember: uid=uniqueuser,ou=subdir,ou=people,dc=jetty,dc=org", "cn: admin" }) -public class JAASLdapLoginServiceTest +public class JAASLdapLoginServiceTest extends AbstractLdapTestUnit { - private static LdapServer _ldapServer; - private JAASLoginService jaasLoginService(String name) { JAASLoginService ls = new JAASLoginService("foo"); @@ -136,16 +131,6 @@ private UserIdentity doLogin(String username, String password) throws Exception return ls.login(username, password, request); } - public static LdapServer getLdapServer() - { - return _ldapServer; - } - - public static void setLdapServer(LdapServer ldapServer) - { - _ldapServer = ldapServer; - } - public static class TestConfiguration extends Configuration { private boolean forceBindingLogin; @@ -160,7 +145,7 @@ public AppConfigurationEntry[] getAppConfigurationEntry(String name) { Map options = new HashMap<>(); options.put("hostname", "localhost"); - options.put("port", Integer.toString(_ldapServer.getTransports()[0].getPort())); + options.put("port", Integer.toString(ldapServer.getTransports()[0].getPort())); options.put("contextFactory", "com.sun.jndi.ldap.LdapCtxFactory"); options.put("bindDn", "uid=admin,ou=system"); options.put("bindPassword", "secret");