Author: bdaw
Date: 2007-02-11 08:37:29 -0500 (Sun, 11 Feb 2007)
New Revision: 6210
Added:
trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java
trunk/identity/src/resources/test/config/identity/
trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml
trunk/identity/src/resources/test/config/identity/opends-config.xml
trunk/identity/src/resources/test/config/identity/openldap-config.xml
trunk/identity/src/resources/test/config/identity/rhds-config-staticrole.xml
trunk/identity/src/resources/test/config/identity/rhds-config.xml
trunk/identity/src/resources/test/config/staticrole/
trunk/identity/src/resources/test/config/staticrole/opends-config.xml
trunk/identity/src/resources/test/config/staticrole/rhds-config.xml
trunk/test/src/etc/directories-identity.xml
trunk/test/src/etc/directories-simplerolemodule.xml
trunk/test/src/etc/directories-simpleusermodule.xml
trunk/test/src/etc/directories-staticgroupmembership.xml
trunk/test/src/etc/directories-staticrolemembership.xml
trunk/test/src/etc/directories-userprofilemodule.xml
trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated-openldap.ldif
trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif
Modified:
trunk/identity/build.xml
trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleRoleModuleTestCase.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleUserModuleTestCase.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticGroupMembershipModuleTestCase.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticRoleMembershipModuleTestCase.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPTestCase.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPUserProfileModuleTestCase.java
trunk/identity/src/resources/test/config/standardidentity-config.xml
trunk/test/src/etc/directories.xml
Log:
- reorganize identity testsuite to define server/configuration more flexibly
- make DB / LDAP run against common set of tests
- missing name filters in ldap user search
Modified: trunk/identity/build.xml
===================================================================
--- trunk/identity/build.xml 2007-02-11 13:25:59 UTC (rev 6209)
+++ trunk/identity/build.xml 2007-02-11 13:37:29 UTC (rev 6210)
@@ -388,7 +388,7 @@
<x-test>
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ConfigurationTestCasestCase"/>-->
+ <test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPIdentityTestCase"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPSimpleUserModuleTestCase"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPSimpleRoleModuleTestCase"/>
<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPStaticGroupMembershipModuleTestCase"/>
@@ -450,15 +450,15 @@
<x-test>
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.db_old.DBUserTestCase"/>-->
+ <!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPIdentityTestCase"/>-->
<!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.db.DBIdentityTestCase"/>-->
<!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.UserProtoTestCase"/>-->
<!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ConfigurationTestCase"/>-->
- <test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPSimpleUserModuleTestCase"/>
+ <!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPSimpleUserModuleTestCase"/>-->
<!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPSimpleRoleModuleTestCase"/>-->
<!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPStaticGroupMembershipModuleTestCase"/>-->
<!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPStaticRoleMembershipModuleTestCase"/>-->
- <!--<test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPUserProfileModuleTestCase"/>-->
+ <test todir="${test.reports}"
name="org.jboss.portal.test.identity.ldap.LDAPUserProfileModuleTestCase"/>
</x-test>
<x-classpath>
<pathelement
location="${build.lib}/portal-identity-lib.jar"/>
Modified: trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -33,8 +33,6 @@
//TODO: isMembershipAttributeRequired
//TODO: memebershipAttributeEmptyValue
- //TODO: options for secured connection to ldap
- //TODO: let decide if has should be in hex or base64
public static final String GROUP_COMMON = "common";
Modified:
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -124,7 +124,7 @@
}
catch (NamingException e)
{
- throw new IdentityException("Unable to create ConnectionContext: " +
this, e);
+ throw new IdentityException("Unable to connect to LDAP: " + this, e);
//return null;
}
@@ -163,7 +163,8 @@
.append(", Port: ").append(getPort())
.append(", Context factory: ").append(getContextFactory())
.append(", Admin user: ").append(getAdminDN())
- .append(", Admin password: ").append(getAdminPassword())
+ //.append(", Admin password: ").append(getAdminPassword())
+ .append(", Admin password: ").append("***")
.append(", Authentication: ").append(getAuthentication())
.append(", Protocol: ").append(getProtocol());
return str.toString();
Modified:
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -116,6 +116,11 @@
public Set getUsers(Role role) throws IdentityException
{
+ return getUsers(role, null);
+ }
+
+ public Set getUsers(Role role, String userNameFilter) throws IdentityException
+ {
if (role == null)
{
throw new IllegalArgumentException("Role cannot be null");
@@ -161,6 +166,11 @@
String value = values.nextElement().toString();
String name = value;
+ if (userNameFilter != null && userNameFilter.length() != 0 &&
!name.matches(".*" + userNameFilter + ".*"))
+ {
+ continue;
+ }
+
try
{
//if user is pointed as DN get only it's name
@@ -386,7 +396,7 @@
//if exception was thrown - propagate it, if not....
if (role != null)
{
- return getUsers(role);
+ return getUsers(role, userNameFilter);
}
else
{
Modified:
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -135,6 +135,11 @@
public Set getUsers(Role role) throws IdentityException
{
+ return getUsers(role, null);
+ }
+
+ public Set getUsers(Role role, String userNameFilter) throws IdentityException
+ {
if (role == null)
{
throw new IllegalArgumentException("Role cannot be null");
@@ -183,7 +188,14 @@
{
SearchResult res = (SearchResult)iterator.next();
DirContext ctx = (DirContext)res.getObject();
-
users.add(getUserModule().createUserInstance(res.getAttributes(),ctx.getNameInNamespace()));
+
+ //TODO: this part isn't efficient - check the condition without creating
instance
+ User user =
getUserModule().createUserInstance(res.getAttributes(),ctx.getNameInNamespace());
+ if (userNameFilter != null && userNameFilter.length() != 0 &&
!user.getUserName().matches(".*" + userNameFilter + ".*"))
+ {
+ continue;
+ }
+ users.add(user);
}
@@ -375,7 +387,7 @@
//if exception was thrown - propagate it, if not....
if (role != null)
{
- return getUsers(role);
+ return getUsers(role, userNameFilter);
}
else
{
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-02-11
13:25:59 UTC (rev 6209)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -96,7 +96,7 @@
{
Hashtable env =getConnectionContext().getEnvironment();
- //will use user DN to bind checking the password
+ //will use user DN to bind checking the password by default
String principal = ldapu.getDn();
//if principalDNPreffix or principalDNSuffix is set will use them to construct
principal name
@@ -148,12 +148,6 @@
throw new IdentityException("LDAP entry doesn't contain proper
attribute:" + getUidAttributeID());
}
-// Attribute passwd = attrs.get(getPasswordAttributeId());
-// if (passwd == null)
-// {
-// throw new IdentityException("LDAP entry doesn't contain proper
attribute:" + getPasswordAttributeId());
-// }
-
ldapu = new LDAPUserImpl(dn,getIdentityContext(), uida.get().toString());
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -231,10 +231,27 @@
//TODO: and testcase this...
public Set findUsersFilteredByUserName(String filter, int offset, int limit) throws
IdentityException, IllegalArgumentException
{
+ if (filter == null)
+ {
+ throw new IllegalArgumentException("Null user name filter");
+ }
+
log.info("Current implementation of findUsersFilteredByUserName returns all
users and is not \"offset\" and \"limit\" sensitive ");
+
Set uf = new HashSet();
+
+
+ if (filter.length() == 0)
+ {
+ filter = "*";
+ }
+ else if (!(filter.length() == 1 && filter.equals("*")))
+ {
+ filter = "*" + filter + "*";
+ }
+
try
{
//search all entries containing "uid" attribute
Modified:
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -126,6 +126,8 @@
String attributeName = resolveAttributeName(propertyName);
+
+ //TODO: check the type and log.info that this can only be a String if not such
String propertyValue = property.toString();
if (attributeName == null)
Added: trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
(rev 0)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -0,0 +1,499 @@
+package org.jboss.portal.test.identity;
+
+import junit.framework.Assert;
+import org.jboss.portal.identity.UserModule;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.UserProfileModule;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.portal.common.p3p.P3PConstants;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision$
+ */
+public class IdentityTest extends Assert
+{
+
+ /** . */
+ private UserModule userModule;
+
+ /** . */
+ private RoleModule roleModule;
+
+ /** . */
+ private MembershipModule membershipModule;
+
+ /** . */
+ private UserProfileModule userProfileModule;
+
+
+ /** . */
+ private IdentityTest.Context ctx;
+
+ public void setUserModule(UserModule userModule)
+ {
+ this.userModule = userModule;
+ }
+
+ public void setRoleModule(RoleModule roleModule)
+ {
+ this.roleModule = roleModule;
+ }
+
+ public void setMembershipModule(MembershipModule membershipModule)
+ {
+ this.membershipModule = membershipModule;
+ }
+
+ public void setUserProfileModule(UserProfileModule userProfileModule)
+ {
+ this.userProfileModule = userProfileModule;
+ }
+
+ public void setContext(IdentityTest.Context ctx)
+ {
+ this.ctx = ctx;
+ }
+
+ public void testFindUsersUsingFilter() throws Exception
+ {
+ ctx.begin();
+ Set set1 = userModule.findUsersFilteredByUserName("user", 0, 10);
+ Set nameSet1 = new HashSet();
+ for (Iterator i = set1.iterator(); i.hasNext();)
+ {
+ User user = (User)i.next();
+ nameSet1.add(user.getUserName());
+ }
+ Set expectedNameSet1 = new HashSet();
+ expectedNameSet1.add("user1");
+ expectedNameSet1.add("user2");
+ assertEquals(expectedNameSet1, nameSet1);
+
+ //
+ Set set2 = userModule.findUsersFilteredByUserName("blah", 0, 10);
+ assertEquals(0, set2.size());
+
+ //
+ Set set3 = userModule.findUsersFilteredByUserName("", 0, 10);
+ Set nameSet3 = new HashSet();
+ for (Iterator i = set3.iterator(); i.hasNext();)
+ {
+ User user = (User)i.next();
+ nameSet3.add(user.getUserName());
+ }
+ Set expectedNameSet3 = new HashSet();
+ expectedNameSet3.add("user1");
+ expectedNameSet3.add("user2");
+ expectedNameSet3.add("admin");
+ assertEquals(expectedNameSet3, nameSet3);
+
+ //
+ Set set4 = userModule.findUsersFilteredByUserName("user1", 0, 10);
+ Set nameSet4 = new HashSet();
+ for (Iterator i = set4.iterator(); i.hasNext();)
+ {
+ User user = (User)i.next();
+ nameSet4.add(user.getUserName());
+ }
+ Set expectedNameSet4 = new HashSet();
+ expectedNameSet4.add("user1");
+ assertEquals(expectedNameSet4, nameSet4);
+ ctx.commit();
+ }
+
+ public void testFindUser1() throws Exception
+ {
+ ctx.begin();
+ User u1 = userModule.findUserByUserName("user1");
+ assertNotNull(u1);
+ Assert.assertEquals("user1", u1.getUserName());
+ assertNotNull(membershipModule.getRoles(u1));
+ Assert.assertEquals(1, membershipModule.getRoles(u1).size());
+ Assert.assertEquals("role1",
((Role)membershipModule.getRoles(u1).iterator().next()).getName());
+ Assert.assertEquals(u1.getId(), userModule.findUserById(u1.getId()).getId());
+ ctx.commit();
+ }
+
+ public void testFindUser2() throws Exception
+ {
+ ctx.begin();
+ Set roleNames = new HashSet(Arrays.asList(new Object[]{"role1",
"role2"}));
+ User u2 = userModule.findUserByUserName("user2");
+ assertNotNull(u2);
+ Assert.assertEquals("user2", u2.getUserName());
+ assertNotNull(membershipModule.getRoles(u2));
+ Assert.assertEquals(2, membershipModule.getRoles(u2).size());
+ Iterator iterator = membershipModule.getRoles(u2).iterator();
+ assertTrue(roleNames.contains(((Role)iterator.next()).getName()));
+ assertTrue(roleNames.contains(((Role)iterator.next()).getName()));
+ Assert.assertEquals(u2.getId(), userModule.findUserById(u2.getId()).getId());
+ ctx.commit();
+ }
+
+ public void testFindUsers() throws Exception
+ {
+ ctx.begin();
+ Set c1 = userModule.findUsers(0, 1);
+ assertNotNull(c1);
+ assertEquals(1, c1.size());
+
+ Set c2 = userModule.findUsers(1, 1);
+ assertNotNull(c2);
+ assertEquals(1, c2.size());
+
+ Set c3 = userModule.findUsers(0, 2);
+ assertNotNull(c3);
+ assertEquals(2, c3.size());
+
+ Set s1 = new HashSet();
+ s1.add(((User)c1.iterator().next()).getUserName());
+ s1.add(((User)c2.iterator().next()).getUserName());
+ Set s2 = new HashSet();
+ Iterator iterator = c3.iterator();
+ s2.add(((User)iterator.next()).getUserName());
+ s2.add(((User)iterator.next()).getUserName());
+ assertEquals(s1, s2);
+ ctx.commit();
+ }
+
+ public void testCreateUser() throws Exception
+ {
+ ctx.begin();
+ User u3 = userModule.createUser("user3", "password");
+ Role g1 = roleModule.findRoleByName("role1");
+ membershipModule.assignRoles(u3, Collections.singleton(g1));
+ Assert.assertEquals("user3", u3.getUserName());
+ assertNotNull(membershipModule.getRoles(u3));
+ Assert.assertEquals(1, membershipModule.getRoles(u3).size());
+ Assert.assertEquals("role1",
((Role)membershipModule.getRoles(u3).iterator().next()).getName());
+ ctx.commit();
+
+ ctx.begin();
+ u3 = userModule.findUserByUserName("user3");
+ assertNotNull(u3);
+ Assert.assertEquals("user3", u3.getUserName());
+ assertNotNull(membershipModule.getRoles(u3));
+ Assert.assertEquals(1, membershipModule.getRoles(u3).size());
+ Assert.assertEquals("role1",
((Role)membershipModule.getRoles(u3).iterator().next()).getName());
+ ctx.commit();
+ }
+
+ // public void testCreateDuplicateUser() throws Exception
+ // {
+ // try
+ // {
+ // userModule.createUser("user1");
+ // fail("Expected exception on duplicate user");
+ // }
+ // catch (ModuleException expected)
+ // {
+ // }
+ // }
+
+ public void testCreateRole() throws Exception
+ {
+ ctx.begin();
+ Role g3 = roleModule.createRole("role3", "roleName");
+ Assert.assertEquals("role3", g3.getName());
+ ctx.commit();
+
+ ctx.begin();
+ g3 = roleModule.findRoleByName("role3");
+ assertNotNull(g3);
+ Assert.assertEquals("role3", g3.getName());
+ ctx.commit();
+ }
+
+ // public void testCreateDuplicateRole() throws Exception
+ // {
+ // try
+ // {
+ // roleModule.createRole("user1");
+ // fail("Expected exception on duplicate role");
+ // }
+ // catch (ModuleException expected)
+ // {
+ // }
+ // }
+
+ public void testCountUser() throws Exception
+ {
+ ctx.begin();
+ Assert.assertEquals(3, userModule.getUserCount());
+ ctx.commit();
+ }
+
+ public void testRemoveNonExistingRole() throws Exception
+ {
+ ctx.begin();
+ try
+ {
+ roleModule.removeRole(new Long(Long.MAX_VALUE));
+ fail("Expected exception");
+ }
+ catch (IdentityException expected)
+ {
+ }
+ ctx.commit();
+ }
+
+ public void testRemoveRole() throws Exception
+ {
+ ctx.begin();
+ Role g1 = roleModule.findRoleByName("role1");
+ Object id = g1.getId();
+ roleModule.removeRole(id);
+ try
+ {
+ roleModule.findRoleById(id);
+ fail("Expected exception");
+ }
+ catch (IdentityException expected)
+ {
+ }
+ ctx.commit();
+
+ ctx.begin();
+ try
+ {
+ roleModule.findRoleById(id);
+ fail("Expected exception");
+ }
+ catch (IdentityException expected)
+ {
+ }
+ User u1 = userModule.findUserByUserName("user1");
+ assertNotNull(u1);
+ Assert.assertEquals("user1", u1.getUserName());
+ ctx.commit();
+ }
+
+ public void testRemoveUser() throws Exception
+ {
+ ctx.begin();
+ User u1 = userModule.findUserByUserName("user1");
+ Object id = u1.getId();
+ userModule.removeUser(id);
+ try
+ {
+ userModule.findUserById(id);
+ fail("Expected exception");
+ }
+ catch (IdentityException expected)
+ {
+ }
+ ctx.commit();
+
+ ctx.begin();
+ try
+ {
+ userModule.findUserById(id);
+ fail("Expected exception");
+ }
+ catch (IdentityException expected)
+ {
+ }
+ Role g1 = roleModule.findRoleByName("role1");
+ assertNotNull(g1);
+ Assert.assertEquals("role1", g1.getName());
+ Role g2 = roleModule.findRoleByName("role2");
+ assertNotNull(g2);
+ Assert.assertEquals("role2", g2.getName());
+ ctx.commit();
+ }
+
+ public void testFindRoles() throws Exception
+ {
+ ctx.begin();
+ Set roleNames = new HashSet(Arrays.asList(new Object[]{"role1",
"role2"}));
+ Set roles = roleModule.findRoles();
+
+ assertEquals(2, roles.size());
+ Iterator iterator = roles.iterator();
+ assertTrue(roleNames.contains(((Role)iterator.next()).getName()));
+ assertTrue(roleNames.contains(((Role)iterator.next()).getName()));
+ ctx.commit();
+ }
+
+ public void testFindRoleMembers() throws Exception
+ {
+ ctx.begin();
+ Set set1 = membershipModule.findRoleMembers("role1", 0, 10,
"user");
+ Set nameSet1 = new HashSet();
+ for (Iterator i = set1.iterator(); i.hasNext();)
+ {
+ User user = (User)i.next();
+ nameSet1.add(user.getUserName());
+ }
+ Set expectedNameSet1 = new HashSet();
+ expectedNameSet1.add("user1");
+ expectedNameSet1.add("user2");
+ assertEquals(expectedNameSet1, nameSet1);
+
+ //
+ Set set2 = membershipModule.findRoleMembers("role1", 0, 10,
"blah");
+ assertEquals(0, set2.size());
+
+ //
+ Set set3 = membershipModule.findRoleMembers("role1", 0, 10,
"");
+ Set nameSet3 = new HashSet();
+ for (Iterator i = set3.iterator(); i.hasNext();)
+ {
+ User user = (User)i.next();
+ nameSet3.add(user.getUserName());
+ }
+ Set expectedNameSet3 = new HashSet();
+ expectedNameSet3.add("user1");
+ expectedNameSet3.add("user2");
+ expectedNameSet3.add("admin");
+ assertEquals(expectedNameSet3, nameSet3);
+
+ //
+ Set set4 = membershipModule.findRoleMembers("role1", 0, 10,
"user1");
+ Set nameSet4 = new HashSet();
+ for (Iterator i = set4.iterator(); i.hasNext();)
+ {
+ User user = (User)i.next();
+ nameSet4.add(user.getUserName());
+ }
+ Set expectedNameSet4 = new HashSet();
+ expectedNameSet4.add("user1");
+ assertEquals(expectedNameSet4, nameSet4);
+ ctx.commit();
+ }
+
+ public void testDynamicProperty() throws Exception
+ {
+ ctx.begin();
+ User user = userModule.createUser("testname", "testpassword");
+ Map map = userProfileModule.getProperties(user);
+ assertNull(map.get("foo"));
+ //assertFalse(map.isReadOnly("foo"));
+ map.put("foo", "value");
+ assertEquals("value", map.get("foo"));
+ //assertFalse(map.isReadOnly("foo"));
+ ctx.commit();
+
+ ctx.begin();
+ user = userModule.findUserByUserName("testname");
+ map = userProfileModule.getProperties(user);
+ assertEquals("value", map.get("foo"));
+ //assertFalse(map.isReadOnly("foo"));
+ ctx.commit();
+ }
+
+ public void testStaticProperty() throws Exception
+ {
+ ctx.begin();
+
+ //
+ User user = userModule.createUser("testname", "testpassword");
+ Map map = userProfileModule.getProperties(user);
+ assertEquals("testname", map.get(P3PConstants.INFO_USER_NAME_NICKNAME));
+
+ // Test cannot remove a static property
+ try
+ {
+ map.remove(P3PConstants.INFO_USER_NAME_GIVEN);
+ fail("Should not be capable to remove static property");
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ // Test read only property
+ //assertTrue(map.isReadOnly(P3PConstants.INFO_USER_NAME_NICKNAME));
+ try
+ {
+ map.put(P3PConstants.INFO_USER_NAME_NICKNAME, "anothername");
+ fail("Should not be capable to modify a read only static property");
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ // Test non nullable and writable property
+ try
+ {
+ map.put(User.INFO_USER_VIEW_EMAIL_VIEW_REAL, null);
+ fail("Should not be capable to nullify a non nullable static
property");
+ }
+ catch (NullPointerException expected)
+ {
+ }
+ map.put(User.INFO_USER_VIEW_EMAIL_VIEW_REAL, "true");
+ assertEquals("true", userProfileModule.getProperty(user,
User.INFO_USER_VIEW_EMAIL_VIEW_REAL));
+
+ // Test boolean property
+ map.put(User.INFO_USER_VIEW_EMAIL_VIEW_REAL, "false");
+ assertEquals("false", map.get(User.INFO_USER_VIEW_EMAIL_VIEW_REAL));
+ assertEquals("false", userProfileModule.getProperty(user,
User.INFO_USER_VIEW_EMAIL_VIEW_REAL));
+
+ map.put(User.INFO_USER_VIEW_EMAIL_VIEW_REAL, "true");
+ assertEquals("true", map.get(User.INFO_USER_VIEW_EMAIL_VIEW_REAL));
+ assertEquals("true", userProfileModule.getProperty(user,
User.INFO_USER_VIEW_EMAIL_VIEW_REAL));
+
+ userProfileModule.setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL,
"false");
+ assertEquals("false", map.get(User.INFO_USER_VIEW_EMAIL_VIEW_REAL));
+ assertEquals("false", userProfileModule.getProperty(user,
User.INFO_USER_VIEW_EMAIL_VIEW_REAL));
+
+ userProfileModule.setProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL,
"true");
+ assertEquals("true", map.get(User.INFO_USER_VIEW_EMAIL_VIEW_REAL));
+ assertEquals("true", userProfileModule.getProperty(user,
User.INFO_USER_VIEW_EMAIL_VIEW_REAL));
+ try
+ {
+ map.put(User.INFO_USER_VIEW_EMAIL_VIEW_REAL, "truee");
+ fail("Should not be capable to set a bad value to boolean property");
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ // Test date
+ /*Date date = ((HibernateUserImpl)user).getRegistrationDate();
+ SimpleDateFormat sdf = new SimpleDateFormat();
+ assertEquals(sdf.format(date), map.get(User.INFO_USER_REGISTRATION_DATE));*/
+
+ ctx.commit();
+ }
+
+
+
+//
+ public void populate() throws Exception
+ {
+ ctx.begin();
+ User admin = userModule.createUser("admin", "");
+ User u1 = userModule.createUser("user1", "");
+ User u2 = userModule.createUser("user2", "");
+ Role g1 = roleModule.createRole("role1", "role1");
+ Role g2 = roleModule.createRole("role2", "role2");
+ membershipModule.assignRoles(u1, Collections.singleton(g1));
+ membershipModule.assignRoles(u2, new
CollectionBuilder().add(g1).add(g2).toHashSet());
+ membershipModule.assignRoles(admin, new
CollectionBuilder().add(g1).add(g2).toHashSet());
+ ctx.commit();
+ }
+
+
+
+
+
+ public interface Context
+ {
+ void begin();
+
+ void commit();
+ }
+}
Added:
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java
(rev 0)
+++
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -0,0 +1,175 @@
+package org.jboss.portal.test.identity.ldap;
+
+import org.jboss.portal.test.identity.db.DBTestCase;
+import org.jboss.portal.test.identity.db.DBIdentityTestCase;
+import org.jboss.portal.test.identity.UserTest;
+import org.jboss.portal.test.identity.IdentityTest;
+import org.jboss.portal.identity.IdentityServiceControllerImpl;
+import org.jboss.portal.identity.IdentityContext;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.ProfileMap;
+import org.jboss.portal.identity.UserModule;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.UserProfileModule;
+import org.jboss.portal.identity.db.HibernateUserImpl;
+import org.jboss.portal.identity.service.UserModuleService;
+import org.jboss.portal.identity.service.RoleModuleService;
+import org.jboss.portal.identity.service.MembershipModuleService;
+import org.jboss.portal.identity.service.UserProfileModuleService;
+import org.jboss.portal.common.p3p.P3PConstants;
+import org.apache.log4j.Appender;
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.SimpleLayout;
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import junit.framework.TestSuite;
+
+import java.util.Date;
+import java.text.SimpleDateFormat;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 5748 $
+ */
+public class LDAPIdentityTestCase extends LDAPTestCase implements IdentityTest.Context
+{
+ private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(DBTestCase.class);
+
+ static
+ {
+ Appender appender = new ConsoleAppender(new SimpleLayout());
+ Logger.getRoot().addAppender(appender);
+ Logger.getRoot().setLevel(Level.INFO);
+ Logger.getLogger("org.jboss.portal.identity").setLevel(Level.INFO);
+ }
+
+ public static TestSuite suite() throws Exception
+ {
+ System.out.println("###");
+ return createTestSuite(LDAPIdentityTestCase.class,
"directories-identity.xml", "datasources.xml");
+ }
+
+ private UserModule userModule;
+
+ private RoleModule roleModule;
+
+ private MembershipModule membershipModule;
+
+ private UserProfileModule userProfileModule;
+
+ private IdentityTest utc;
+
+
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+
+ //bootstrap identity modules
+ IdentityServiceControllerImpl controller = new IdentityServiceControllerImpl();
+ controller.setConfigFile(getDirectoryServerConfigParameter().getConfigFile());
+
controller.setDefaultConfigFile("test/config/standardidentity-config.xml");
+ controller.setRegisterMBeans(false);
+ controller.start();
+
+ identityContext = controller.getIdentityContext();
+
+ this.userModule =
(UserModuleService)identityContext.getObject(IdentityContext.TYPE_USER_MODULE);
+ this.roleModule =
(RoleModuleService)identityContext.getObject(IdentityContext.TYPE_ROLE_MODULE);
+ this.membershipModule =
(MembershipModuleService)identityContext.getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE);
+ this.userProfileModule =
(UserProfileModuleService)identityContext.getObject(IdentityContext.TYPE_USER_PROFILE_MODULE);
+
+ populate();
+ //
+ utc = new IdentityTest();
+ utc.setUserModule(userModule);
+ utc.setRoleModule(roleModule);
+ utc.setMembershipModule(membershipModule);
+ utc.setUserProfileModule(userProfileModule);
+ utc.setContext(this);
+ utc.populate();
+ }
+
+
+
+
+
+
+ public void testWorking() throws Exception
+ {
+
+ }
+
+ //
+
+ public void testFindUsersUsingFilter() throws Exception
+ {
+ utc.testFindUsersUsingFilter();
+ }
+
+ public void testFindUser1() throws Exception
+ {
+ utc.testFindUser1();
+ }
+
+ public void testFindUser2() throws Exception
+ {
+ utc.testFindUser2();
+ }
+
+ public void testFindUsers() throws Exception
+ {
+ utc.testFindUsers();
+ }
+
+ public void testCreateUser() throws Exception
+ {
+ utc.testCreateUser();
+ }
+
+ public void testCreateRole() throws Exception
+ {
+ utc.testCreateRole();
+ }
+
+ public void testCountUser() throws Exception
+ {
+ utc.testCountUser();
+ }
+
+ public void testRemoveNonExistingRole() throws Exception
+ {
+ utc.testRemoveNonExistingRole();
+ }
+
+ public void testRemoveRole() throws Exception
+ {
+ utc.testRemoveRole();
+ }
+
+ public void testRemoveUser() throws Exception
+ {
+ utc.testRemoveUser();
+ }
+
+ public void testFindRoles() throws Exception
+ {
+ utc.testFindRoles();
+ }
+
+ public void testFindRoleMembers() throws Exception
+ {
+ utc.testFindRoleMembers();
+ }
+
+ /*public void testDynamicProperty() throws Exception
+ {
+ utc.testDynamicProperty();
+ }
+
+ public void testStaticProperty() throws Exception
+ {
+ utc.testStaticProperty();
+ }*/
+}
Modified:
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleRoleModuleTestCase.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleRoleModuleTestCase.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleRoleModuleTestCase.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -45,7 +45,7 @@
public static TestSuite suite() throws Exception
{
- return createTestSuite(LDAPSimpleRoleModuleTestCase.class);
+ return createTestSuite(LDAPSimpleRoleModuleTestCase.class,
"directories-simplerolemodule.xml", "datasources.xml");
}
RoleModule roleModule;
Modified:
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleUserModuleTestCase.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleUserModuleTestCase.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleUserModuleTestCase.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -52,7 +52,7 @@
public static TestSuite suite() throws Exception
{
System.out.println("###");
- return createTestSuite(LDAPSimpleUserModuleTestCase.class);
+ return createTestSuite(LDAPSimpleUserModuleTestCase.class,
"directories-simpleusermodule.xml", "datasources.xml");
}
UserModule userModule;
@@ -73,28 +73,6 @@
{
super.setUp();
- //IdentityContextImpl context = new IdentityContextImpl();
- //context.start();
- //identityContext = context;
-
- /*SimpleConfigurationImpl configuration = new SimpleConfigurationImpl();
- configuration.setIdentityContext(identityContext);
- configuration.setConfigFile(getDirectoryServerConfigParameter().getConfigFile());
- configuration.start();
-
- LDAPConnectionContext connection = new LDAPConnectionContext();
- connection.setIdentityContext(identityContext);
- connection.start();
-
- LDAPUserModuleImpl userModule = new LDAPUserModuleImpl();
- userModule.setIdentityContext(identityContext);
-
- //userModule.setContainerDN("ou=People,dc=jboss,dc=org");
- //userModule.setUidAttributeID("uid");
-
- userModule.start();
- this.userModule = userModule;*/
-
IdentityServiceControllerImpl controller = new IdentityServiceControllerImpl();
controller.setConfigFile(getDirectoryServerConfigParameter().getConfigFile());
controller.setDefaultConfigFile("test/config/standardidentity-config.xml");
Modified:
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticGroupMembershipModuleTestCase.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticGroupMembershipModuleTestCase.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticGroupMembershipModuleTestCase.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -51,7 +51,7 @@
public static TestSuite suite() throws Exception
{
- return createTestSuite(LDAPStaticGroupMembershipModuleTestCase.class);
+ return createTestSuite(LDAPStaticGroupMembershipModuleTestCase.class,
"directories-staticgroupmembership.xml", "datasources.xml");
}
private UserModule userModule;
Modified:
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticRoleMembershipModuleTestCase.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticRoleMembershipModuleTestCase.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPStaticRoleMembershipModuleTestCase.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -51,7 +51,7 @@
public static TestSuite suite() throws Exception
{
- return createTestSuite(LDAPStaticRoleMembershipModuleTestCase.class);
+ return createTestSuite(LDAPStaticRoleMembershipModuleTestCase.class,
"directories-staticrolemembership.xml", "datasources.xml");
}
private UserModule userModule;
@@ -89,7 +89,7 @@
suffix = getDirectoryServerConfigParameter().getCleanUpDN();
- IdentityConfiguration configuration =
(IdentityConfiguration)identityContext.getObject(IdentityContext.TYPE_IDENTITY_CONFIGURATION);
+ /*IdentityConfiguration configuration =
(IdentityConfiguration)identityContext.getObject(IdentityContext.TYPE_IDENTITY_CONFIGURATION);
Set values = new HashSet();
values.add("ou=Roles,o=example2," + suffix);
configuration.setValues(IdentityConfiguration.GROUP_COMMON,IdentityConfiguration.ROLE_CONTAINER_DN,
values);
@@ -98,7 +98,7 @@
configuration.setValues(IdentityConfiguration.GROUP_COMMON,
IdentityConfiguration.USER_CONTAINER_DN, values);
values = new HashSet();
values.add("memberOf");
-
configuration.setValues(IdentityConfiguration.GROUP_COMMON,IdentityConfiguration.MEMBERSHIP_ATTRIBUTE_ID,
values);
+
configuration.setValues(IdentityConfiguration.GROUP_COMMON,IdentityConfiguration.MEMBERSHIP_ATTRIBUTE_ID,
values);*/
prefix =
((IdentityConfiguration)identityContext.getObject(IdentityContext.TYPE_IDENTITY_CONFIGURATION)).getValue(IdentityConfiguration.USER_UID_ATTRIBUTE_ID);
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPTestCase.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPTestCase.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPTestCase.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -66,13 +66,13 @@
Appender appender = new ConsoleAppender(new SimpleLayout());
Logger.getRoot().addAppender(appender);
Logger.getRoot().setLevel(Level.INFO);
- Logger.getLogger("org.jboss.portal.identity").setLevel(Level.DEBUG);
+ Logger.getLogger("org.jboss.portal.identity").setLevel(Level.INFO);
}
- public static TestSuite createTestSuite(Class clazz) throws Exception
+ public static TestSuite createTestSuite(Class clazz, String directories, String
datasources) throws Exception
{
- URL directoriesURL =
Thread.currentThread().getContextClassLoader().getResource("directories.xml");
- URL datasourcesURL =
Thread.currentThread().getContextClassLoader().getResource("datasources.xml");
+ URL directoriesURL =
Thread.currentThread().getContextClassLoader().getResource(directories);
+ URL datasourcesURL =
Thread.currentThread().getContextClassLoader().getResource(datasources);
Map parameterMap = new HashMap();
parameterMap.put("DirectoryServerConfig",
DSConfig.fromXML2(directoriesURL));
parameterMap.put("DataSourceConfig",
DataSourceSupport.Config.fromXML2(datasourcesURL));
@@ -83,6 +83,11 @@
return suite;
}
+ public static TestSuite createTestSuite(Class clazz) throws Exception
+ {
+ return createTestSuite(clazz, "directories.xml",
"datasources.xml");
+ }
+
public LDAPTestCase()
{
Modified:
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPUserProfileModuleTestCase.java
===================================================================
---
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPUserProfileModuleTestCase.java 2007-02-11
13:25:59 UTC (rev 6209)
+++
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPUserProfileModuleTestCase.java 2007-02-11
13:37:29 UTC (rev 6210)
@@ -42,7 +42,7 @@
public static TestSuite suite() throws Exception
{
- return createTestSuite(LDAPUserProfileModuleTestCase.class);
+ return createTestSuite(LDAPUserProfileModuleTestCase.class,
"directories-userprofilemodule.xml", "datasources.xml");
}
private UserModule userModule;
Added: trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml
(rev 0)
+++
trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml 2007-02-11
13:37:29 UTC (rev 6210)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>localhost</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>password</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+
<class>org.jboss.portal.identity.ldap.LDAPStaticRoleMembershipModuleImpl</class>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userContainerDN</name>
+
<value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleContainerDN</name>
+
<value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>membershipAttributeID</name>
+ <value>memberOf</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>userCreateAttibutes</group-name>
+ <option>
+ <name>objectClass</name>
+ <!--This objectclasses should work with Red Hat Directory-->
+ <value>top</value>
+ <value>person</value>
+ <value>inetOrgPerson</value>
+ <value>inetUser</value>
+ </option>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>sn</name>
+ <value>none</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>roleCreateAttibutes</group-name>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>objectClass</name>
+ <value>top</value>
+ <value>organizationalRole</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Added: trunk/identity/src/resources/test/config/identity/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/opends-config.xml
(rev 0)
+++ trunk/identity/src/resources/test/config/identity/opends-config.xml 2007-02-11
13:37:29 UTC (rev 6210)
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>localhost</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>password</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userContainerDN</name>
+
<value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleContainerDN</name>
+
<value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>userCreateAttibutes</group-name>
+ <option>
+ <name>objectClass</name>
+ <!--This objectclasses should work with Red Hat Directory-->
+ <value>top</value>
+ <value>person</value>
+ <value>inetOrgPerson</value>
+ </option>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>sn</name>
+ <value>none</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>roleCreateAttibutes</group-name>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <!--Some directory servers require this attribute to be valid DN-->
+ <!--For safety reasons point to the admin user here-->
+ <option>
+ <name>member</name>
+
<value>uid=admin,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Added: trunk/identity/src/resources/test/config/identity/openldap-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/openldap-config.xml
(rev 0)
+++ trunk/identity/src/resources/test/config/identity/openldap-config.xml 2007-02-11
13:37:29 UTC (rev 6210)
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>dev09.qa.atl.jboss.com</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Manager,dc=my-domain,dc=com</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>jbossqa</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userContainerDN</name>
+
<value>ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
+ </option>
+ <option>
+ <name>roleContainerDN</name>
+
<value>ou=Roles,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>userCreateAttibutes</group-name>
+ <option>
+ <name>objectClass</name>
+ <!--This objectclasses should work with Red Hat Directory-->
+ <value>top</value>
+ <value>person</value>
+ <value>inetOrgPerson</value>
+ </option>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>sn</name>
+ <value>none</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>roleCreateAttibutes</group-name>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <!--Some directory servers require this attribute to be valid DN-->
+ <!--For safety reasons point to the admin user here-->
+ <option>
+ <name>member</name>
+
<value>uid=dummynonexistinguser,ou=People,dc=jboss,dc=org</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Added: trunk/identity/src/resources/test/config/identity/rhds-config-staticrole.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/rhds-config-staticrole.xml
(rev 0)
+++
trunk/identity/src/resources/test/config/identity/rhds-config-staticrole.xml 2007-02-11
13:37:29 UTC (rev 6210)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>dev39.qa.atl.jboss.com</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>qpq123qpq</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+
<class>org.jboss.portal.identity.ldap.LDAPStaticRoleMembershipModuleImpl</class>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userContainerDN</name>
+
<value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleContainerDN</name>
+
<value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>membershipAttributeID</name>
+ <value>memberOf</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>userCreateAttibutes</group-name>
+ <option>
+ <name>objectClass</name>
+ <!--This objectclasses should work with Red Hat Directory-->
+ <value>top</value>
+ <value>person</value>
+ <value>inetOrgPerson</value>
+ <value>inetUser</value>
+ </option>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>sn</name>
+ <value>none</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>roleCreateAttibutes</group-name>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>objectClass</name>
+ <value>top</value>
+ <value>organizationalRole</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Added: trunk/identity/src/resources/test/config/identity/rhds-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/rhds-config.xml
(rev 0)
+++ trunk/identity/src/resources/test/config/identity/rhds-config.xml 2007-02-11 13:37:29
UTC (rev 6210)
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>dev39.qa.atl.jboss.com</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>qpq123qpq</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userContainerDN</name>
+
<value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleContainerDN</name>
+
<value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>userCreateAttibutes</group-name>
+ <option>
+ <name>objectClass</name>
+ <!--This objectclasses should work with Red Hat Directory-->
+ <value>top</value>
+ <value>person</value>
+ <value>inetOrgPerson</value>
+ </option>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>sn</name>
+ <value>none</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>roleCreateAttibutes</group-name>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <!--Some directory servers require this attribute to be valid DN-->
+ <!--For safety reasons point to the admin user here-->
+ <option>
+ <name>member</name>
+
<value>uid=dummynonexistinguser,ou=People,dc=jboss,dc=org</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Modified: trunk/identity/src/resources/test/config/standardidentity-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/standardidentity-config.xml 2007-02-11
13:25:59 UTC (rev 6209)
+++ trunk/identity/src/resources/test/config/standardidentity-config.xml 2007-02-11
13:37:29 UTC (rev 6210)
@@ -210,7 +210,7 @@
<option>
<name>sessionFactoryJNDIName</name>
<value>java:/portal/IdentitySessionFactory</value>
- </option>
+ </option> opends-config.xml
<option>
<name>jndiName</name>
<value>java:/portal/DBUserProfileModule</value>
Added: trunk/identity/src/resources/test/config/staticrole/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/staticrole/opends-config.xml
(rev 0)
+++ trunk/identity/src/resources/test/config/staticrole/opends-config.xml 2007-02-11
13:37:29 UTC (rev 6210)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>localhost</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>password</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+
<class>org.jboss.portal.identity.ldap.LDAPStaticRoleMembershipModuleImpl</class>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userContainerDN</name>
+
<value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleContainerDN</name>
+
<value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>membershipAttributeID</name>
+ <value>memberOf</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>userCreateAttibutes</group-name>
+ <option>
+ <name>objectClass</name>
+ <!--This objectclasses should work with Red Hat Directory-->
+ <value>top</value>
+ <value>person</value>
+ <value>inetOrgPerson</value>
+ <value>inetUser</value>
+ </option>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>sn</name>
+ <value>none</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>roleCreateAttibutes</group-name>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>objectClass</name>
+ <value>top</value>
+ <value>organizationalRole</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Added: trunk/identity/src/resources/test/config/staticrole/rhds-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/staticrole/rhds-config.xml
(rev 0)
+++ trunk/identity/src/resources/test/config/staticrole/rhds-config.xml 2007-02-11
13:37:29 UTC (rev 6210)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>dev39.qa.atl.jboss.com</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>qpq123qpq</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+
<class>org.jboss.portal.identity.ldap.LDAPStaticRoleMembershipModuleImpl</class>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userContainerDN</name>
+
<value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleContainerDN</name>
+
<value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>membershipAttributeID</name>
+ <value>memberOf</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>userCreateAttibutes</group-name>
+ <option>
+ <name>objectClass</name>
+ <!--This objectclasses should work with Red Hat Directory-->
+ <value>top</value>
+ <value>person</value>
+ <value>inetOrgPerson</value>
+ <value>inetUser</value>
+ </option>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>sn</name>
+ <value>none</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>roleCreateAttibutes</group-name>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>objectClass</name>
+ <value>top</value>
+ <value>organizationalRole</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Added: trunk/test/src/etc/directories-identity.xml
===================================================================
--- trunk/test/src/etc/directories-identity.xml (rev 0)
+++ trunk/test/src/etc/directories-identity.xml 2007-02-11 13:37:29 UTC (rev 6210)
@@ -0,0 +1,111 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<directories>
+ <directory>
+ <directory-name>OpenDS</directory-name>
+ <description>OpenDS service deployed on JBoss AS as an mbean
-StaticGroupMembership config</description>
+
+ <config-file>test/config/identity/opends-config.xml</config-file>
+ <host>localhost</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+
<populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>OpenDS - StaticRoleMembership</directory-name>
+ <description>OpenDS service deployed on JBoss AS as an mbean -
StaticRoleMembership config</description>
+
<config-file>test/config/identity/opends-config-staticrole.xml</config-file>
+ <host>localhost</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+
<populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>RedHatDS</directory-name>
+ <description>RedHat Directory in QA Labs (need vpn access) -
StaticGroupMembership config</description>
+
+ <config-file>test/config/identity/rhds-config.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>qpq123qpq</admin-password>
+
+
<populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>RedHatDS</directory-name>
+ <description>RedHat Directory in QA Labs (need vpn access) -
StaticRoleMembership config</description>
+
+
<config-file>test/config/identity/rhds-config-staticrole.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>qpq123qpq</admin-password>
+
+
<populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+
+ <directory>
+ <directory-name>OpenLDAP</directory-name>
+ <description>OpenLDAP Directory in QA Labs (need vpn access) -
StaticGroupMembership config</description>
+
+ <config-file>test/config/identity/openldap-config.xml</config-file>
+ <host>dev09.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
+ <admin-password>jbossqa</admin-password>
+
+
<populate-ldif>ldap/ldif/initial-tests-notpopulated-openldap.ldif</populate-ldif>
+
+ <cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
+ </directory>
+ <!--<directory>
+ <directory-name>MSAD</directory-name>
+ <description>Microsoft Active Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/msad-config.xml</config-file>
+ <host>dev44.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>JBOSS\jbossqa</admin-dn>
+ <admin-password>jboss42</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+
+ <cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
+ </directory>-->
+</directories>
Added: trunk/test/src/etc/directories-simplerolemodule.xml
===================================================================
--- trunk/test/src/etc/directories-simplerolemodule.xml (rev 0)
+++ trunk/test/src/etc/directories-simplerolemodule.xml 2007-02-11 13:37:29 UTC (rev
6210)
@@ -0,0 +1,85 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<directories>
+ <directory>
+ <directory-name>OpenDS</directory-name>
+ <description>OpenDS service deployed on JBoss AS as an
mbean</description>
+ <!--identity configuration file-->
+ <config-file>test/config/opends-config.xml</config-file>
+ <host>localhost</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+ <!--ldif from which LDAP will be populated before each test-->
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <!--DN that will be removed to perform cleanup after each test-->
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>RedHatDS</directory-name>
+ <description>RedHat Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/rhds-config.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>qpq123qpq</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>OpenLDAP</directory-name>
+ <description>OpenLDAP Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/openldap-config.xml</config-file>
+ <host>dev09.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
+ <admin-password>jbossqa</admin-password>
+
+
<populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+
+ <cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
+ </directory>
+ <!--<directory>
+ <directory-name>MSAD</directory-name>
+ <description>Microsoft Active Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/msad-config.xml</config-file>
+ <host>dev44.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>JBOSS\jbossqa</admin-dn>
+ <admin-password>jboss42</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+
+ <cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
+ </directory>-->
+</directories>
Added: trunk/test/src/etc/directories-simpleusermodule.xml
===================================================================
--- trunk/test/src/etc/directories-simpleusermodule.xml (rev 0)
+++ trunk/test/src/etc/directories-simpleusermodule.xml 2007-02-11 13:37:29 UTC (rev
6210)
@@ -0,0 +1,85 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<directories>
+ <directory>
+ <directory-name>OpenDS</directory-name>
+ <description>OpenDS service deployed on JBoss AS as an
mbean</description>
+ <!--identity configuration file-->
+ <config-file>test/config/opends-config.xml</config-file>
+ <host>localhost</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+ <!--ldif from which LDAP will be populated before each test-->
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <!--DN that will be removed to perform cleanup after each test-->
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>RedHatDS</directory-name>
+ <description>RedHat Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/rhds-config.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>qpq123qpq</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>OpenLDAP</directory-name>
+ <description>OpenLDAP Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/openldap-config.xml</config-file>
+ <host>dev09.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
+ <admin-password>jbossqa</admin-password>
+
+
<populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+
+ <cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
+ </directory>
+ <!--<directory>
+ <directory-name>MSAD</directory-name>
+ <description>Microsoft Active Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/msad-config.xml</config-file>
+ <host>dev44.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>JBOSS\jbossqa</admin-dn>
+ <admin-password>jboss42</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+
+ <cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
+ </directory>-->
+</directories>
Added: trunk/test/src/etc/directories-staticgroupmembership.xml
===================================================================
--- trunk/test/src/etc/directories-staticgroupmembership.xml (rev
0)
+++ trunk/test/src/etc/directories-staticgroupmembership.xml 2007-02-11 13:37:29 UTC (rev
6210)
@@ -0,0 +1,85 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<directories>
+ <directory>
+ <directory-name>OpenDS</directory-name>
+ <description>OpenDS service deployed on JBoss AS as an
mbean</description>
+ <!--identity configuration file-->
+ <config-file>test/config/opends-config.xml</config-file>
+ <host>localhost</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+ <!--ldif from which LDAP will be populated before each test-->
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <!--DN that will be removed to perform cleanup after each test-->
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>RedHatDS</directory-name>
+ <description>RedHat Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/rhds-config.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>qpq123qpq</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>OpenLDAP</directory-name>
+ <description>OpenLDAP Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/openldap-config.xml</config-file>
+ <host>dev09.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
+ <admin-password>jbossqa</admin-password>
+
+
<populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+
+ <cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
+ </directory>
+ <!--<directory>
+ <directory-name>MSAD</directory-name>
+ <description>Microsoft Active Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/msad-config.xml</config-file>
+ <host>dev44.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>JBOSS\jbossqa</admin-dn>
+ <admin-password>jboss42</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+
+ <cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
+ </directory>-->
+</directories>
Added: trunk/test/src/etc/directories-staticrolemembership.xml
===================================================================
--- trunk/test/src/etc/directories-staticrolemembership.xml (rev
0)
+++ trunk/test/src/etc/directories-staticrolemembership.xml 2007-02-11 13:37:29 UTC (rev
6210)
@@ -0,0 +1,85 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<directories>
+ <directory>
+ <directory-name>OpenDS</directory-name>
+ <description>OpenDS service deployed on JBoss AS as an
mbean</description>
+ <!--identity configuration file-->
+ <config-file>test/config/staticrole/opends-config.xml</config-file>
+ <host>localhost</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+ <!--ldif from which LDAP will be populated before each test-->
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <!--DN that will be removed to perform cleanup after each test-->
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>RedHatDS</directory-name>
+ <description>RedHat Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/staticrole/rhds-config.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>qpq123qpq</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <!--<directory>
+ <directory-name>OpenLDAP</directory-name>
+ <description>OpenLDAP Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/openldap-config.xml</config-file>
+ <host>dev09.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
+ <admin-password>jbossqa</admin-password>
+
+
<populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+
+ <cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
+ </directory>-->
+ <!--<directory>
+ <directory-name>MSAD</directory-name>
+ <description>Microsoft Active Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/msad-config.xml</config-file>
+ <host>dev44.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>JBOSS\jbossqa</admin-dn>
+ <admin-password>jboss42</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+
+ <cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
+ </directory>-->
+</directories>
Added: trunk/test/src/etc/directories-userprofilemodule.xml
===================================================================
--- trunk/test/src/etc/directories-userprofilemodule.xml (rev 0)
+++ trunk/test/src/etc/directories-userprofilemodule.xml 2007-02-11 13:37:29 UTC (rev
6210)
@@ -0,0 +1,85 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<directories>
+ <directory>
+ <directory-name>OpenDS</directory-name>
+ <description>OpenDS service deployed on JBoss AS as an
mbean</description>
+ <!--identity configuration file-->
+ <config-file>test/config/opends-config.xml</config-file>
+ <host>localhost</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+ <!--ldif from which LDAP will be populated before each test-->
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+ <!--DN that will be removed to perform cleanup after each test-->
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>RedHatDS</directory-name>
+ <description>RedHat Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/rhds-config.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>qpq123qpq</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
+
+
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>OpenLDAP</directory-name>
+ <description>OpenLDAP Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/openldap-config.xml</config-file>
+ <host>dev09.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
+ <admin-password>jbossqa</admin-password>
+
+
<populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
+
+ <cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
+ </directory>
+ <!--<directory>
+ <directory-name>MSAD</directory-name>
+ <description>Microsoft Active Directory in QA Labs (need vpn
access)</description>
+
+ <config-file>test/config/msad-config.xml</config-file>
+ <host>dev44.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>JBOSS\jbossqa</admin-dn>
+ <admin-password>jboss42</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+
+ <cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
+ </directory>-->
+</directories>
Modified: trunk/test/src/etc/directories.xml
===================================================================
--- trunk/test/src/etc/directories.xml 2007-02-11 13:25:59 UTC (rev 6209)
+++ trunk/test/src/etc/directories.xml 2007-02-11 13:37:29 UTC (rev 6210)
@@ -37,7 +37,7 @@
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
- <directory>
+ <!--<directory>
<directory-name>RedHatDS</directory-name>
<description>RedHat Directory in QA Labs (need vpn
access)</description>
@@ -81,5 +81,5 @@
<populate-ldif>ldap/ldif/initial-tests-qa-openldap.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
- </directory>
+ </directory>-->
</directories>
Added: trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated-openldap.ldif
===================================================================
--- trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated-openldap.ldif
(rev 0)
+++ trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated-openldap.ldif 2007-02-11
13:37:29 UTC (rev 6210)
@@ -0,0 +1,32 @@
+dn: dc=testsuite,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: dcObject
+objectclass: organization
+dc: testsuite
+o: testsuite
+
+dn: ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: ou=Roles,dc=testsuite,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+# tree2
+dn: o=example2,dc=testsuite,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organization
+o: example2
+
+dn: ou=People,o=example2,dc=testsuite,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: ou=Roles,o=example2,dc=testsuite,dc=portal,dc=my-domain,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
Added: trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif
===================================================================
--- trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif
(rev 0)
+++ trunk/test/src/etc/ldap/ldif/initial-tests-notpopulated.ldif 2007-02-11 13:37:29 UTC
(rev 6210)
@@ -0,0 +1,35 @@
+dn: dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: dcObject
+objectclass: organization
+dc: testsuite
+o: testsuite
+
+dn: ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+# tree2
+dn: o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organization
+o: example2
+
+dn: ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+
+