Skip to content

Commit

Permalink
Bump apacheds.version from 2.0.0.AM26 to 2.0.0.AM27 (#10836)
Browse files Browse the repository at this point in the history
* 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](apache/directory-server@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](apache/directory-server@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](apache/directory-server@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] <[email protected]>

* get this work

Signed-off-by: Olivier Lamy <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Olivier Lamy <[email protected]>
  • Loading branch information
dependabot[bot] and olamy authored Nov 5, 2023
1 parent 14d976a commit 8364b7a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 77 deletions.
52 changes: 2 additions & 50 deletions jetty-jaas/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.eclipse.jetty</groupId>
Expand All @@ -12,31 +13,11 @@

<properties>
<bundle-symbolic-name>${project.groupId}.jaas</bundle-symbolic-name>
<apacheds.version>2.0.0.AM26</apacheds.version>
<apacheds.version>2.0.0.AM27</apacheds.version>
<apache.directory.api.version>2.1.5</apache.directory.api.version>
<spotbugs.onlyAnalyze>org.eclipse.jetty.jaas.*</spotbugs.onlyAnalyze>
</properties>

<build>
<plugins>
<!-- always include the sources to be able to prepare the eclipse-jetty-SDK feature
with a snapshot. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
<failIfNoTests>false</failIfNoTests>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand Down Expand Up @@ -136,13 +117,6 @@
<artifactId>api-asn1-api</artifactId>
<version>${apache.directory.api.version}</version>
</dependency>
<!-- because directory server do not have yet junit5 extensions -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

Expand All @@ -166,28 +140,6 @@
</pluginManagement>
</build>
</profile>
<profile>
<id>jdk20</id>
<activation>
<jdk>[20,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<!-- sun.security.x509.X509CertInfo.set not present in Java 20, needs a Java 20 compatible version of Apache Directory Server -->
<exclude>**/JAASLdapLoginServiceTest*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})
Expand Down Expand Up @@ -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");
Expand All @@ -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;
Expand All @@ -160,7 +145,7 @@ public AppConfigurationEntry[] getAppConfigurationEntry(String name)
{
Map<String, String> 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");
Expand Down

0 comments on commit 8364b7a

Please sign in to comment.