1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Remove ApacheDS Support

Closes gh-13852
This commit is contained in:
Josh Cummings
2025-06-18 18:29:16 -06:00
parent 42e24aa53c
commit 6ddb964c61
49 changed files with 138 additions and 1406 deletions
@@ -1,30 +0,0 @@
apply plugin: 'io.spring.convention.spring-test'
dependencies {
implementation platform(project(":spring-security-dependencies"))
implementation project(':spring-security-core')
implementation 'org.springframework:spring-beans'
implementation 'org.springframework:spring-context'
implementation 'org.springframework:spring-core'
implementation 'org.springframework:spring-tx'
implementation project(':spring-security-config')
implementation project(':spring-security-ldap')
runtimeOnly "org.apache.directory.server:apacheds-core"
runtimeOnly "org.apache.directory.server:apacheds-core-entry"
runtimeOnly "org.apache.directory.server:apacheds-protocol-shared"
runtimeOnly "org.apache.directory.server:apacheds-protocol-ldap"
runtimeOnly "org.apache.directory.server:apacheds-server-jndi"
runtimeOnly 'org.apache.directory.shared:shared-ldap'
testImplementation project(path : ':spring-security-ldap', configuration : 'tests')
testImplementation "org.assertj:assertj-core"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.mockito:mockito-core"
testImplementation "org.mockito:mockito-junit-jupiter"
testImplementation "org.springframework:spring-test"
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
@@ -1,56 +0,0 @@
/*
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.security.config.BeanIds;
import org.springframework.security.ldap.server.ApacheDSContainer;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Eddú Meléndez
*/
public class LdapServerBeanDefinitionParserTests {
private ClassPathXmlApplicationContext context;
@BeforeEach
public void setup() {
this.context = new ClassPathXmlApplicationContext("applicationContext-security.xml");
}
@AfterEach
public void closeAppContext() {
if (this.context != null) {
this.context.close();
this.context = null;
}
}
@Test
public void apacheDirectoryServerIsStartedByDefault() {
String[] beanNames = this.context.getBeanNamesForType(ApacheDSContainer.class);
assertThat(beanNames).hasSize(1);
assertThat(beanNames[0]).isEqualTo(BeanIds.EMBEDDED_APACHE_DS);
}
}
@@ -1,9 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:s="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security https://www.springframework.org/schema/security/spring-security.xsd">
<s:ldap-server ldif="classpath:users.ldif" port="0"/>
</beans>
@@ -1,60 +0,0 @@
dn: ou=groups,dc=springframework,dc=org
objectclass: top
objectclass: organizationalUnit
ou: groups
dn: ou=people,dc=springframework,dc=org
objectclass: top
objectclass: organizationalUnit
ou: people
dn: uid=rod,ou=people,dc=springframework,dc=org
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: Rod Johnson
sn: Johnson
uid: rod
userPassword: koala
dn: uid=dianne,ou=people,dc=springframework,dc=org
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: Dianne Emu
sn: Emu
uid: dianne
userPassword: emu
dn: uid=scott,ou=people,dc=springframework,dc=org
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: Scott
sn: Wombat
uid: scott
userPassword: wombat
dn: cn=user,ou=groups,dc=springframework,dc=org
objectclass: top
objectclass: groupOfNames
cn: user
member: uid=rod,ou=people,dc=springframework,dc=org
member: uid=dianne,ou=people,dc=springframework,dc=org
member: uid=scott,ou=people,dc=springframework,dc=org
dn: cn=teller,ou=groups,dc=springframework,dc=org
objectclass: top
objectclass: groupOfNames
cn: teller
member: uid=rod,ou=people,dc=springframework,dc=org
member: uid=dianne,ou=people,dc=springframework,dc=org
dn: cn=supervisor,ou=groups,dc=springframework,dc=org
objectclass: top
objectclass: groupOfNames
cn: supervisor
member: uid=rod,ou=people,dc=springframework,dc=org
@@ -1,30 +0,0 @@
apply plugin: 'io.spring.convention.spring-test'
dependencies {
implementation platform(project(":spring-security-dependencies"))
implementation project(':spring-security-core')
implementation 'org.springframework:spring-beans'
implementation 'org.springframework:spring-context'
implementation 'org.springframework:spring-core'
implementation 'org.springframework:spring-tx'
implementation project(':spring-security-config')
implementation project(':spring-security-ldap')
runtimeOnly "org.apache.directory.server:apacheds-core"
runtimeOnly "org.apache.directory.server:apacheds-core-entry"
runtimeOnly "org.apache.directory.server:apacheds-protocol-shared"
runtimeOnly "org.apache.directory.server:apacheds-protocol-ldap"
runtimeOnly "org.apache.directory.server:apacheds-server-jndi"
runtimeOnly 'org.apache.directory.shared:shared-ldap'
testImplementation project(path : ':spring-security-ldap', configuration : 'tests')
testImplementation "org.assertj:assertj-core"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.mockito:mockito-core"
testImplementation "org.mockito:mockito-junit-jupiter"
testImplementation "org.springframework:spring-test"
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
@@ -1,56 +0,0 @@
/*
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.security.config.BeanIds;
import org.springframework.security.ldap.server.ApacheDSContainer;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Eddú Meléndez
*/
public class LdapServerBeanDefinitionParserTests {
private ClassPathXmlApplicationContext context;
@BeforeEach
public void setup() {
this.context = new ClassPathXmlApplicationContext("applicationContext-security.xml");
}
@AfterEach
public void closeAppContext() {
if (this.context != null) {
this.context.close();
this.context = null;
}
}
@Test
public void apacheDirectoryServerIsStartedByDefault() {
String[] beanNames = this.context.getBeanNamesForType(ApacheDSContainer.class);
assertThat(beanNames).hasSize(1);
assertThat(beanNames[0]).isEqualTo(BeanIds.EMBEDDED_APACHE_DS);
}
}
@@ -1,9 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:s="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security https://www.springframework.org/schema/security/spring-security.xsd">
<s:ldap-server mode="apacheds" ldif="classpath:users.ldif" port="0"/>
</beans>
@@ -1,60 +0,0 @@
dn: ou=groups,dc=springframework,dc=org
objectclass: top
objectclass: organizationalUnit
ou: groups
dn: ou=people,dc=springframework,dc=org
objectclass: top
objectclass: organizationalUnit
ou: people
dn: uid=rod,ou=people,dc=springframework,dc=org
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: Rod Johnson
sn: Johnson
uid: rod
userPassword: koala
dn: uid=dianne,ou=people,dc=springframework,dc=org
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: Dianne Emu
sn: Emu
uid: dianne
userPassword: emu
dn: uid=scott,ou=people,dc=springframework,dc=org
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn: Scott
sn: Wombat
uid: scott
userPassword: wombat
dn: cn=user,ou=groups,dc=springframework,dc=org
objectclass: top
objectclass: groupOfNames
cn: user
member: uid=rod,ou=people,dc=springframework,dc=org
member: uid=dianne,ou=people,dc=springframework,dc=org
member: uid=scott,ou=people,dc=springframework,dc=org
dn: cn=teller,ou=groups,dc=springframework,dc=org
objectclass: top
objectclass: groupOfNames
cn: teller
member: uid=rod,ou=people,dc=springframework,dc=org
member: uid=dianne,ou=people,dc=springframework,dc=org
dn: cn=supervisor,ou=groups,dc=springframework,dc=org
objectclass: top
objectclass: groupOfNames
cn: supervisor
member: uid=rod,ou=people,dc=springframework,dc=org