TSK-1052: added inmemory ldap server for int testing.
This commit is contained in:
parent
446eb3a1c9
commit
bbd6686248
|
@ -157,6 +157,11 @@
|
|||
<version>${version.h2}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.unboundid</groupId>
|
||||
<artifactId>unboundid-ldapsdk</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -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