TSK-1052: added inmemory ldap server for int testing.
This commit is contained in:
parent
446eb3a1c9
commit
bbd6686248
|
@ -1,196 +1,201 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-rest-spring</artifactId>
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>taskana-rest-spring</artifactId>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana rest logic.</description>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>The taskana rest logic.</description>
|
||||
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-rest-parent</artifactId>
|
||||
<version>2.0.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-rest-parent</artifactId>
|
||||
<version>2.0.1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${version.spring}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${version.spring}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>${version.spring}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.hateoas</groupId>
|
||||
<artifactId>spring-hateoas</artifactId>
|
||||
<version>${version.spring.hateos}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.ldap</groupId>
|
||||
<artifactId>spring-ldap-core</artifactId>
|
||||
<version>${version.spring.ldap}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>${version.javax.servlet}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>${version.javax.validation}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${version.jackson}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-spring</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<version>${version.spring}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>${version.aspectjweaver}</version>
|
||||
</dependency>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${version.spring}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${version.spring}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>${version.spring}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.hateoas</groupId>
|
||||
<artifactId>spring-hateoas</artifactId>
|
||||
<version>${version.spring.hateos}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.ldap</groupId>
|
||||
<artifactId>spring-ldap-core</artifactId>
|
||||
<version>${version.spring.ldap}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>${version.javax.servlet}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>${version.javax.validation}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${version.jackson}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-spring</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<version>${version.spring}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>${version.aspectjweaver}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${version.assertj}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-data</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.plugin</groupId>
|
||||
<artifactId>spring-plugin-core</artifactId>
|
||||
<version>${version.spring.core}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-test</artifactId>
|
||||
<version>${version.spring.security}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
<version>${version.spring.restdocs}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
<version>${version.byte-buddy}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy-agent</artifactId>
|
||||
<version>${version.byte-buddy-agent}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${version.h2}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${version.assertj}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-data</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
<version>${version.spring.boot}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.plugin</groupId>
|
||||
<artifactId>spring-plugin-core</artifactId>
|
||||
<version>${version.spring.core}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-test</artifactId>
|
||||
<version>${version.spring.security}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.restdocs</groupId>
|
||||
<artifactId>spring-restdocs-mockmvc</artifactId>
|
||||
<version>${version.spring.restdocs}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
<version>${version.byte-buddy}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy-agent</artifactId>
|
||||
<version>${version.byte-buddy-agent}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${version.h2}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.unboundid</groupId>
|
||||
<artifactId>unboundid-ldapsdk</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>${version.maven.asciidoctor}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>html</backend>
|
||||
<sourceDirectory>${basedir}/src/test/resources/asciidoc</sourceDirectory>
|
||||
<doctype>book</doctype>
|
||||
<attributes>
|
||||
<snippets>${basedir}/target/generated-snippets</snippets>
|
||||
<docinfo>shared</docinfo>
|
||||
</attributes>
|
||||
<logHandler>
|
||||
<outputToConsole>false</outputToConsole>
|
||||
<failIf>
|
||||
<severity>ERROR</severity>
|
||||
</failIf>
|
||||
</logHandler>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>${version.maven.asciidoctor}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>html</backend>
|
||||
<sourceDirectory>${basedir}/src/test/resources/asciidoc</sourceDirectory>
|
||||
<doctype>book</doctype>
|
||||
<attributes>
|
||||
<snippets>${basedir}/target/generated-snippets</snippets>
|
||||
<docinfo>shared</docinfo>
|
||||
</attributes>
|
||||
<logHandler>
|
||||
<outputToConsole>false</outputToConsole>
|
||||
<failIf>
|
||||
<severity>ERROR</severity>
|
||||
</failIf>
|
||||
</logHandler>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -36,7 +36,7 @@ class AccessIdControllerIntTest {
|
|||
ResponseEntity<List<AccessIdResource>> response =
|
||||
template.exchange(
|
||||
restHelper.toUrl(Mapping.URL_ACCESSID)
|
||||
+ "?search-for=cn=developersgroup,ou=groups,o=taskanatest",
|
||||
+ "?search-for=cn=ksc-users,cn=groups,OU=Test,O=TASKANA",
|
||||
HttpMethod.GET,
|
||||
restHelper.defaultRequest(),
|
||||
ParameterizedTypeReference.forType(List.class));
|
||||
|
@ -47,7 +47,7 @@ class AccessIdControllerIntTest {
|
|||
void testQueryGroupsByCn() {
|
||||
ResponseEntity<List<AccessIdResource>> response =
|
||||
template.exchange(
|
||||
restHelper.toUrl(Mapping.URL_ACCESSID) + "?search-for=developer",
|
||||
restHelper.toUrl(Mapping.URL_ACCESSID) + "?search-for=ksc",
|
||||
HttpMethod.GET,
|
||||
restHelper.defaultRequest(),
|
||||
ParameterizedTypeReference.forType(List.class));
|
||||
|
@ -58,7 +58,7 @@ class AccessIdControllerIntTest {
|
|||
void testGetMatches() {
|
||||
ResponseEntity<List<AccessIdResource>> response =
|
||||
template.exchange(
|
||||
restHelper.toUrl(Mapping.URL_ACCESSID) + "?search-for=ali",
|
||||
restHelper.toUrl(Mapping.URL_ACCESSID) + "?search-for=user",
|
||||
HttpMethod.GET,
|
||||
restHelper.defaultRequest(),
|
||||
ParameterizedTypeReference.forType(AccessIdListResource.class));
|
||||
|
|
|
@ -13,25 +13,26 @@ devMode=false
|
|||
version=@project.version@
|
||||
|
||||
####### control LDAP usage
|
||||
taskana.ldap.useLdap=false
|
||||
taskana.ldap.useLdap=true
|
||||
####### properties to connect to LDAP
|
||||
taskana.ldap.serverUrl=ldap://localhost:10389
|
||||
taskana.ldap.bindDn=uid=admin,ou=system
|
||||
taskana.ldap.bindDn=uid=admin
|
||||
taskana.ldap.bindPassword=secret
|
||||
taskana.ldap.baseDn=o=TaskanaTest
|
||||
taskana.ldap.baseDn=ou=Test,O=TASKANA
|
||||
####### properties that control search for users and groups
|
||||
taskana.ldap.userSearchBase=ou=people
|
||||
taskana.ldap.userSearchBase=cn=users
|
||||
taskana.ldap.userSearchFilterName=objectclass
|
||||
taskana.ldap.userSearchFilterValue=person
|
||||
taskana.ldap.userFirstnameAttribute=givenName
|
||||
taskana.ldap.userLastnameAttribute=sn
|
||||
taskana.ldap.userIdAttribute=uid
|
||||
taskana.ldap.groupSearchBase=ou=groups
|
||||
taskana.ldap.groupSearchBase=cn=groups
|
||||
taskana.ldap.groupSearchFilterName=objectclass
|
||||
taskana.ldap.groupSearchFilterValue=groupOfUniqueNames
|
||||
taskana.ldap.groupNameAttribute=cn
|
||||
taskana.ldap.minSearchForLength=3
|
||||
taskana.ldap.maxNumberOfReturnedAccessIds=50
|
||||
taskana.ldap.groupsOfUser=memberUid
|
||||
####### JobScheduler cron expression that specifies when the JobSchedler runs
|
||||
taskana.jobscheduler.async.cron=0 0 * * * *
|
||||
####### cache static resources properties
|
||||
|
@ -40,3 +41,11 @@ spring.main.allow-bean-definition-overriding=true
|
|||
####### tomcat is not detecting the x-forward headers from bluemix as a trustworthy proxy
|
||||
server.tomcat.internal-proxies=.*
|
||||
server.use-forward-headers=true
|
||||
|
||||
# Embedded Spring LDAP
|
||||
spring.ldap.embedded.base-dn= O=TASKANA
|
||||
spring.ldap.embedded.credential.username= uid=admin
|
||||
spring.ldap.embedded.credential.password= secret
|
||||
spring.ldap.embedded.ldif=classpath:taskana-test.ldif
|
||||
spring.ldap.embedded.port= 10389
|
||||
spring.ldap.embedded.validation.enabled=false
|
|
@ -0,0 +1,82 @@
|
|||
######################
|
||||
# Organizational Units
|
||||
######################
|
||||
dn: O=TASKANA
|
||||
objectclass: top
|
||||
objectclass: organization
|
||||
o: Unternehmen
|
||||
|
||||
dn: OU=Test,O=TASKANA
|
||||
ou: Organisationseinheit
|
||||
objectclass: top
|
||||
objectclass: organizationalUnit
|
||||
|
||||
dn: cn=groups,OU=Test,O=TASKANA
|
||||
cn: groups
|
||||
objectclass: top
|
||||
objectclass: container
|
||||
|
||||
dn: cn=users,OU=Test,O=TASKANA
|
||||
cn: users
|
||||
objectclass: top
|
||||
objectclass: container
|
||||
|
||||
dn: cn=organisation,OU=Test,O=TASKANA
|
||||
cn: organisation
|
||||
objectclass: top
|
||||
objectclass: container
|
||||
|
||||
########################
|
||||
# Users
|
||||
########################
|
||||
dn: uid=user_1_1,cn=users,OU=Test,O=TASKANA
|
||||
objectclass: inetorgperson
|
||||
objectclass: organizationalperson
|
||||
objectclass: person
|
||||
objectclass: top
|
||||
givenName: Max
|
||||
description: desc
|
||||
uid: user_1_1
|
||||
sn: Mustermann
|
||||
ou: Organisationseinheit/Organisationseinheit KSC/Organisationseinheit KSC 1
|
||||
cn: Max Mustermann
|
||||
|
||||
dn: uid=user_1_2,cn=users,OU=Test,O=TASKANA
|
||||
objectclass: inetorgperson
|
||||
objectclass: organizationalperson
|
||||
objectclass: person
|
||||
objectclass: top
|
||||
givenName: Elena
|
||||
description: desc
|
||||
uid: user_1_1
|
||||
sn: Eifrig
|
||||
ou: Organisationseinheit/Organisationseinheit KSC/Organisationseinheit KSC 1
|
||||
cn: Elena Eifrig
|
||||
|
||||
|
||||
########################
|
||||
# Groups
|
||||
########################
|
||||
dn: cn=ksc-users,cn=groups,OU=Test,O=TASKANA
|
||||
uniquemember: uid=user_1_1,cn=users,OU=Test,O=TASKANA
|
||||
uniquemember: uid=user_1_2,cn=users,OU=Test,O=TASKANA
|
||||
cn: ksc-users
|
||||
objectclass: groupofuniquenames
|
||||
objectclass: top
|
||||
|
||||
|
||||
########################
|
||||
# Groups
|
||||
########################
|
||||
dn: cn=Organisationseinheit KSC,cn=organisation,OU=Test,O=TASKANA
|
||||
cn: Organisationseinheit KSC
|
||||
objectclass: groupofuniquenames
|
||||
objectclass: top
|
||||
|
||||
dn: cn=Organisationseinheit KSC 1,cn=Organisationseinheit KSC,cn=organisation,OU=Test,O=TASKANA
|
||||
uniquemember: uid=user_1_1,cn=users,OU=Test,O=TASKANA
|
||||
uniquemember: uid=user_1_2,cn=users,OU=Test,O=TASKANA
|
||||
cn: Organisationseinheit KSC 1
|
||||
objectclass: groupofuniquenames
|
||||
objectclass: top
|
||||
|
Loading…
Reference in New Issue