Author: bdaw
Date: 2009-06-12 06:09:20 -0400 (Fri, 12 Jun 2009)
New Revision: 606
Added:
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/MinimalFlexibleConfigTestCase.java
idm/trunk/idm-testsuite/src/test/resources/minimal-flexible-identity-config.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml
Removed:
idm/trunk/idm-core/src/test/resources/organization-test-config.xml
idm/trunk/idm-testsuite/src/test/resources/organization-test-config.xml
idm/trunk/idm-testsuite/src/test/resources/organization-test-jboss-unit-config.xml
Modified:
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/configuration/jaxb2/JAXB2IdentityConfiguration.java
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/repository/FallbackIdentityStoreRepository.java
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/types/SimpleIdentityObjectType.java
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
idm/trunk/idm-spi/src/main/java/org/jboss/identity/idm/spi/repository/IdentityStoreRepository.java
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/OrganizationTest.java
Log:
add "allowNotDefinedIdentityObjectTypes" - allow minimal idm config with maximum
flexibilty to use not configured identity types
Modified:
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/configuration/jaxb2/JAXB2IdentityConfiguration.java
===================================================================
---
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/configuration/jaxb2/JAXB2IdentityConfiguration.java 2009-06-11
20:28:06 UTC (rev 605)
+++
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/configuration/jaxb2/JAXB2IdentityConfiguration.java 2009-06-12
10:09:20 UTC (rev 606)
@@ -441,11 +441,11 @@
}
// all configured identity object types
- if (storeMD.getSupportedIdentityTypes() == null ||
storeMD.getSupportedIdentityTypes().size() == 0)
- {
- throw new IdentityConfigurationException("identity-store \"" +
storeMD.getId() + "\" doesn't have any supported " +
- "identity-object-types configured");
- }
+// if (storeMD.getSupportedIdentityTypes() == null ||
storeMD.getSupportedIdentityTypes().size() == 0)
+// {
+// throw new IdentityConfigurationException("identity-store \""
+ storeMD.getId() + "\" doesn't have any supported " +
+// "identity-object-types configured");
+// }
// check each configured types
for (IdentityObjectTypeMetaData typeMD : storeMD.getSupportedIdentityTypes())
Modified:
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java
===================================================================
---
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java 2009-06-11
20:28:06 UTC (rev 605)
+++
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java 2009-06-12
10:09:20 UTC (rev 606)
@@ -60,17 +60,24 @@
protected AttributeStore defaultAttributeStore;
+ protected IdentityRepositoryConfigurationContext configurationContext;
+
public static final String CACHE_OPTION = "cache";
public static final String CACHE_CONFIG_FILE_OPTION = "cache.config-file";
public static final String CACHE_PROVIDER_CLASS_OPTION =
"cache.provider.class";
+ public static final String ALLOW_NOT_DEFINED_IDENTITY_OBJECT_TYPES_OPTION =
"allowNotDefinedIdentityObjectTypes";
+ private boolean allowNotDefinedIdentityObjectTypes = false;
+
+
public void bootstrap(IdentityRepositoryConfigurationContext configurationContext,
Map<String, IdentityStore> bootstrappedIdentityStores,
Map<String, AttributeStore> bootstrappedAttributeStores)
throws IdentityException
{
+ this.configurationContext = configurationContext;
IdentityRepositoryConfigurationMetaData configurationMD =
configurationContext.getRepositoryConfigurationMetaData();
@@ -84,6 +91,13 @@
//TODO: cache wrap support
}
+ String allowNotDefinedIOT =
configurationMD.getOptionSingleValue(ALLOW_NOT_DEFINED_IDENTITY_OBJECT_TYPES_OPTION);
+
+ if (allowNotDefinedIOT != null &&
allowNotDefinedIOT.equalsIgnoreCase("true"))
+ {
+ this.allowNotDefinedIdentityObjectTypes = true;
+ }
+
if (isId != null && bootstrappedIdentityStores.keySet().contains(isId))
{
defaultIdentityStore = bootstrappedIdentityStores.get(isId);
@@ -239,14 +253,46 @@
return attributeStoreMappings;
}
- public IdentityStore getIdentityStore(IdentityObjectType identityObjectType)
+ public IdentityStore getIdentityStore(IdentityObjectType identityObjectType) throws
IdentityException
{
- return identityStoreMappings.get(identityObjectType.getName());
+ IdentityStore store = identityStoreMappings.get(identityObjectType.getName());
+
+ if (store == null)
+ {
+ String option =
configurationContext.getRepositoryConfigurationMetaData().getOptionSingleValue(ALLOW_NOT_DEFINED_IDENTITY_OBJECT_TYPES_OPTION);
+
+ if (option != null && option.equalsIgnoreCase("true"))
+ {
+ return defaultIdentityStore;
+ }
+ else
+ {
+ throw new IdentityException("IdentityObjectType not mapped in the
configuration: " + identityObjectType);
+ }
+ }
+
+ return store;
}
- public AttributeStore getAttributeStore(IdentityObjectType identityObjectType)
+ public AttributeStore getAttributeStore(IdentityObjectType identityObjectType) throws
IdentityException
{
- return attributeStoreMappings.get(identityObjectType.getName());
+ AttributeStore store = attributeStoreMappings.get(identityObjectType.getName());
+
+ if (store == null)
+ {
+ String option =
configurationContext.getRepositoryConfigurationMetaData().getOptionSingleValue(ALLOW_NOT_DEFINED_IDENTITY_OBJECT_TYPES_OPTION);
+
+ if (option != null && option.equalsIgnoreCase("true"))
+ {
+ return defaultIdentityStore;
+ }
+ else
+ {
+ throw new IdentityException("IdentityObjectType not mapped in the
configuration: " + identityObjectType);
+ }
+ }
+
+ return store;
}
protected boolean hasIdentityObject(IdentityStoreInvocationContext ctx, IdentityStore
is, IdentityObject io) throws IdentityException
@@ -266,4 +312,10 @@
}
return false;
}
+
+
+ public boolean isAllowNotDefinedIdentityObjectTypes()
+ {
+ return allowNotDefinedIdentityObjectTypes;
+ }
}
Modified:
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/repository/FallbackIdentityStoreRepository.java
===================================================================
---
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/repository/FallbackIdentityStoreRepository.java 2009-06-11
20:28:06 UTC (rev 605)
+++
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/repository/FallbackIdentityStoreRepository.java 2009-06-12
10:09:20 UTC (rev 606)
@@ -301,14 +301,30 @@
return featuresMetaData;
}
- IdentityStore resolveIdentityStore(IdentityObject io)
+ IdentityStore resolveIdentityStore(IdentityObject io) throws IdentityException
{
return resolveIdentityStore(io.getIdentityType());
}
IdentityStore resolveIdentityStore(IdentityObjectType iot)
{
- IdentityStore ids = getIdentityStore(iot);
+
+ IdentityStore ids = null;
+ try
+ {
+ ids = getIdentityStore(iot);
+ }
+ catch (IdentityException e)
+ {
+ if (isAllowNotDefinedAttributes())
+ {
+ return defaultIdentityStore;
+ }
+
+ throw new IllegalStateException("Used IdentityObjectType not mapped.
Consider using " + ALLOW_NOT_DEFINED_IDENTITY_OBJECT_TYPES_OPTION +
+ " repository option switch: " + iot );
+ }
+
if (ids == null)
{
ids = defaultIdentityStore;
@@ -318,10 +334,25 @@
AttributeStore resolveAttributeStore(IdentityObjectType iot)
{
- AttributeStore ads = getAttributeStore(iot);
+ AttributeStore ads = null;
+ try
+ {
+ ads = getAttributeStore(iot);
+ }
+ catch (IdentityException e)
+ {
+ if (isAllowNotDefinedAttributes())
+ {
+ return defaultAttributeStore;
+ }
+
+ throw new IllegalStateException("Used IdentityObjectType not mapped.
Consider using " + ALLOW_NOT_DEFINED_IDENTITY_OBJECT_TYPES_OPTION +
+ " repository option switch: " + iot );
+ }
+
if (ads == null)
{
- ads = defaultIdentityStore;
+ ads = defaultAttributeStore;
}
return ads;
}
@@ -1161,4 +1192,7 @@
{
return allowNotDefinedAttributes;
}
+
+
+
}
Modified:
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/types/SimpleIdentityObjectType.java
===================================================================
---
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/types/SimpleIdentityObjectType.java 2009-06-11
20:28:06 UTC (rev 605)
+++
idm/trunk/idm-core/src/main/java/org/jboss/identity/idm/impl/types/SimpleIdentityObjectType.java 2009-06-12
10:09:20 UTC (rev 606)
@@ -52,4 +52,12 @@
{
return name;
}
+
+ @Override
+ public String toString()
+ {
+ return "SimpleIdentityObjectType{" +
+ "name='" + name + '\'' +
+ '}';
+ }
}
Deleted: idm/trunk/idm-core/src/test/resources/organization-test-config.xml
===================================================================
--- idm/trunk/idm-core/src/test/resources/organization-test-config.xml 2009-06-11 20:28:06
UTC (rev 605)
+++ idm/trunk/idm-core/src/test/resources/organization-test-config.xml 2009-06-12 10:09:20
UTC (rev 606)
@@ -1,818 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_alpha"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
- <realms>
- <realm>
- <id>realm://RedHat/DB</id>
- <repository-id-ref>RedHat Repository DB</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- <realm>
- <id>realm://portal/SamplePortal/DB</id>
- <repository-id-ref>Sample Portal Repository DB</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- <realm>
- <id>realm://RedHat/DB_LDAP</id>
- <repository-id-ref>RedHat Repository DB+LDAP</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- <realm>
- <id>realm://portal/SamplePortal/DB_LDAP</id>
- <repository-id-ref>Sample Portal Repository
DB+LDAP</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- </realms>
- <repositories>
- <repository>
- <id>RedHat Repository DB</id>
-
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- <repository>
- <id>Sample Portal Repository DB</id>
-
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- <repository>
- <id>RedHat Repository DB+LDAP</id>
-
<class>org.jboss.identity.idm.impl.repository.FallbackIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <identity-store-mappings>
- <identity-store-mapping>
- <identity-store-id>Hibernate Identity
Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>DIVISION</identity-object-type>
- <identity-object-type>PROJECT</identity-object-type>
- <identity-object-type>PEOPLE</identity-object-type>
- </identity-object-types>
- <options/>
- </identity-store-mapping>
- <identity-store-mapping>
- <identity-store-id>LDAP Identity Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>USER</identity-object-type>
- <identity-object-type>ORGANIZATION</identity-object-type>
-
<identity-object-type>ORGANIZATION_UNIT</identity-object-type>
- <identity-object-type>DEPARTMENT</identity-object-type>
- </identity-object-types>
- <options>
- <option>
- <name>cache</name>
- <value>true</value>
- </option>
- <option>
- <name>cache.provider.class</name>
-
<value>org.jboss.identity.idm.impl.cache.IdentityStoreCacheSupportImpl</value>
- </option>
- <option>
- <name>cache.config-file</name>
-
<value>src/test/resources/jboss-cache-config.xml</value>
- </option>
- </options>
- </identity-store-mapping>
- </identity-store-mappings>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- <repository>
- <id>Sample Portal Repository DB+LDAP</id>
-
<class>org.jboss.identity.idm.impl.repository.FallbackIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <identity-store-mappings>
- <identity-store-mapping>
- <identity-store-id>Hibernate Identity
Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>SYSTEM</identity-object-type>
-
<identity-object-type>ADMINISTRATION</identity-object-type>
- <identity-object-type>COMMUNITY</identity-object-type>
- <identity-object-type>DIVISION</identity-object-type>
- <identity-object-type>SECURITY</identity-object-type>
- <identity-object-type>PEOPLE</identity-object-type>
- </identity-object-types>
- <options/>
- </identity-store-mapping>
- <identity-store-mapping>
- <identity-store-id>LDAP Identity Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>USER</identity-object-type>
- <identity-object-type>DEPARTMENT</identity-object-type>
- <identity-object-type>ORGANIZATION</identity-object-type>
-
<identity-object-type>ORGANIZATION_UNIT</identity-object-type>
- <identity-object-type>OFFICE</identity-object-type>
- </identity-object-types>
- <options>
- <option>
- <name>cache</name>
- <value>true</value>
- </option>
- <option>
- <name>cache.provider.class</name>
-
<value>org.jboss.identity.idm.impl.cache.IdentityStoreCacheSupportImpl</value>
- </option>
- <option>
- <name>cache.config-file</name>
-
<value>src/test/resources/jboss-cache-config.xml</value>
- </option>
- </options>
- </identity-store-mapping>
- </identity-store-mappings>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- </repositories>
- <stores>
- <attribute-stores/>
- <identity-stores>
- <identity-store>
- <id>Hibernate Identity Store</id>
-
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
- <external-config/>
- <supported-relationship-types>
-
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
- <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
- </supported-relationship-types>
- <supported-identity-object-types>
- <identity-object-type>
- <name>USER</name>
- <relationships>
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>COMMUNITY</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>OFFICE</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>SECURITY</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>PROJECT</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>PEOPLE</identity-object-type-ref>-->
- <!--</relationship>-->
- </relationships>
- <credentials>
- <credential-type>PASSWORD</credential-type>
- </credentials>
- <attributes>
- <attribute>
- <name>picture</name>
- <mapping>user.picture</mapping>
- <type>binary</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>email</name>
- <mapping>mail</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- <isUnique>true</isUnique>
- </attribute>
- </attributes>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DIVISION</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION_UNIT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DIVISION</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>OFFICE</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>PEOPLE</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>PROJECT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>DIVISION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>DEPARTMENT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>PROJECT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>PEOPLE</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ADMINISTRATION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>COMMUNITY</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>OFFICE</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>SECURITY</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>SYSTEM</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>SECURITY</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>COMMUNITY</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- </supported-identity-object-types>
- <options>
- <option>
- <name>hibernateConfiguration</name>
- <value>hibernate-jboss-identity.cfg.xml</value>
- </option>
- <!--<option>-->
- <!--<name>hibernateSessionFactoryJNDIName</name>-->
-
<!--<value>java:/jbossidentity/HibernateStoreSessionFactory</value>-->
- <!--</option>-->
- <option>
- <name>populateRelationshipTypes</name>
- <value>true</value>
- </option>
- <option>
- <name>populateIdentityObjectTypes</name>
- <value>true</value>
- </option>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- <option>
- <name>isRealmAware</name>
- <value>true</value>
- </option>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </identity-store>
- <identity-store>
- <id>LDAP Identity Store</id>
-
<class>org.jboss.identity.idm.impl.store.ldap.LDAPIdentityStoreImpl</class>
- <external-config/>
- <supported-relationship-types>
-
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
- </supported-relationship-types>
- <supported-identity-object-types>
- <identity-object-type>
- <name>USER</name>
- <relationships/>
- <credentials>
- <credential-type>PASSWORD</credential-type>
- </credentials>
- <attributes>
- <attribute>
- <name>phone</name>
- <mapping>telephoneNumber</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>email</name>
- <mapping>mail</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- <isUnique>true</isUnique>
- </attribute>
- <attribute>
- <name>description</name>
- <mapping>description</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>carLicense</name>
- <mapping>carLicense</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- </attributes>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>uid</value>
- </option>
- <option>
- <name>passwordAttributeName</name>
- <value>userPassword</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=People,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=inetOrgPerson</value>
- <value>sn= </value>
- <value>cn= </value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>OFFICE</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=Organizations,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION_UNIT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>OFFICE</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=OrganizationUnits,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>DEPARTMENT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=Departments,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>OFFICE</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=Offices,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- </supported-identity-object-types>
- <options>
- <option>
- <name>providerURL</name>
- <value>ldap://localhost:10389</value>
- </option>
- <option>
- <name>adminDN</name>
- <value>cn=Directory Manager</value>
- </option>
- <option>
- <name>adminPassword</name>
- <value>password</value>
- </option>
- <option>
- <name>searchTimeLimit</name>
- <value>10000</value>
- </option>
- </options>
- </identity-store>
- </identity-stores>
- </stores>
-</jboss-identity>
\ No newline at end of file
Modified:
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
===================================================================
---
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-06-11
20:28:06 UTC (rev 605)
+++
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-06-12
10:09:20 UTC (rev 606)
@@ -122,6 +122,8 @@
public static final String ALLOW_NOT_DEFINED_ATTRIBUTES =
"allowNotDefinedAttributes";
+ public static final String ALLOW_NOT_DEFINED_IDENTITY_OBJECT_TYPES_OPTION =
"allowNotDefinedIdentityObjectTypes";
+
public static final String DEFAULT_REALM_NAME =
HibernateIdentityStoreImpl.class.getName() + ".DEFAULT_REALM";
public static final String CREDENTIAL_TYPE_PASSWORD = "PASSWORD";
@@ -138,6 +140,8 @@
private boolean isAllowNotDefinedAttributes = false;
+ private boolean isAllowNotDefinedIdentityObjectTypes = false;
+
// TODO: rewrite this into some more handy object
private IdentityStoreConfigurationMetaData configurationMD;
@@ -286,6 +290,13 @@
this.isAllowNotDefinedAttributes = true;
}
+ String allowNotDefinedIOT =
configurationMD.getOptionSingleValue(ALLOW_NOT_DEFINED_IDENTITY_OBJECT_TYPES_OPTION);
+
+ if (allowNotDefinedIOT != null &&
allowNotDefinedIOT.equalsIgnoreCase("true"))
+ {
+ this.isAllowNotDefinedIdentityObjectTypes = true;
+ }
+
// Default realm
HibernateRealm realm = null;
@@ -561,13 +572,13 @@
HibernateIdentityObject hibernateObject = null;
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
try
{
hibernateObject = (HibernateIdentityObject)getHibernateSession(ctx).
createQuery(HibernateIdentityObject.findIdentityObjectByNameAndType)
- .setParameter("realm", getRealm(em, ctx))
+ .setParameter("realm", getRealm(hibernateSession, ctx))
.setParameter("name", name)
.setParameter("typeName", hibernateType.getName())
.uniqueResult();
@@ -688,7 +699,7 @@
@SuppressWarnings("unchecked")
public Collection<IdentityObject>
findIdentityObject(IdentityStoreInvocationContext ctx,
IdentityObject identity,
- IdentityObjectRelationshipType
relationshipType,
+ IdentityObjectRelationshipType
relationshipType,
boolean parent,
IdentityObjectSearchCriteria
criteria) throws IdentityException
{
@@ -787,7 +798,7 @@
q.setParameter("nameFilter", "%");
}
-
+
if (criteria != null && criteria.isPaged())
{
q.setFirstResult(criteria.getFirstResult());
@@ -843,8 +854,11 @@
if (!getSupportedFeatures().isRelationshipTypeSupported(fromIO.getIdentityType(),
toIO.getIdentityType(), relationshipType))
{
- throw new IdentityException("Relationship not supported. RelationshipType[
" + relationshipType.getName() + " ] " +
- "beetween: [ " + fromIO.getIdentityType().getName() + " ] and
[ " + toIO.getIdentityType().getName() + " ]");
+ if (!isAllowNotDefinedIdentityObjectTypes())
+ {
+ throw new IdentityException("Relationship not supported.
RelationshipType[ " + relationshipType.getName() + " ] " +
+ "beetween: [ " + fromIO.getIdentityType().getName() + " ]
and [ " + toIO.getIdentityType().getName() + " ]");
+ }
}
org.hibernate.Query query =
getHibernateSession(ctx).createQuery(QUERY_RELATIONSHIP_BY_FROM_TO_TYPE_NAME)
@@ -875,7 +889,7 @@
throw new IdentityException("Relationship name not present in the
store");
}
- relationship = new HibernateIdentityObjectRelationship(type, fromIO, toIO,
relationshipName);
+ relationship = new HibernateIdentityObjectRelationship(type, fromIO, toIO,
relationshipName);
}
else
{
@@ -885,7 +899,7 @@
getHibernateSession(ctx).persist(relationship);
return relationship;
-
+
}
@@ -902,7 +916,7 @@
HibernateIdentityObject toIO = safeGet(ctx, toIdentity);
HibernateIdentityObjectRelationshipType type =
getHibernateIdentityObjectRelationshipType(ctx, relationshipType);
- getSupportedFeatures().isRelationshipTypeSupported(fromIO.getIdentityType(),
toIO.getIdentityType(), relationshipType);
+ //getSupportedFeatures().isRelationshipTypeSupported(fromIO.getIdentityType(),
toIO.getIdentityType(), relationshipType);
org.hibernate.Query query = null;
@@ -940,7 +954,7 @@
throw new IdentityException("Relationship already present");
}
- HibernateIdentityObjectRelationship relationship =
(HibernateIdentityObjectRelationship)results.iterator().next();
+ HibernateIdentityObjectRelationship relationship =
(HibernateIdentityObjectRelationship)results.iterator().next();
fromIO.getFromRelationships().remove(relationship);
toIO.getToRelationships().remove(relationship);
@@ -1057,13 +1071,13 @@
throw new IllegalArgumentException("name is null");
}
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
- HibernateRealm realm = getRealm(em, ctx);
+ HibernateRealm realm = getRealm(hibernateSession, ctx);
try
{
- HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
+ HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)hibernateSession.createCriteria(HibernateIdentityObjectRelationshipName.class)
.add(Restrictions.eq("name",
name)).add(Restrictions.eq("realm", realm)).uniqueResult();
if (hiorn != null)
@@ -1091,13 +1105,13 @@
throw new IllegalArgumentException("name is null");
}
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
try
{
- HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
- .add(Restrictions.eq("name",
name)).add(Restrictions.eq("realm", getRealm(em, ctx))).uniqueResult();
+ HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)hibernateSession.createCriteria(HibernateIdentityObjectRelationshipName.class)
+ .add(Restrictions.eq("name",
name)).add(Restrictions.eq("realm", getRealm(hibernateSession,
ctx))).uniqueResult();
if (hiorn == null)
{
@@ -1121,7 +1135,7 @@
Set<String> names = null;
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
try
{
@@ -1131,19 +1145,19 @@
{
if (criteria.isAscending())
{
- q =
em.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesOrderedByNameAsc);
+ q =
hibernateSession.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesOrderedByNameAsc);
}
else
{
- q =
em.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesOrderedByNameDesc);
+ q =
hibernateSession.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesOrderedByNameDesc);
}
}
else
{
- q =
em.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNames);
+ q =
hibernateSession.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNames);
}
- q.setParameter("realm", getRealm(em, ctx));
+ q.setParameter("realm", getRealm(hibernateSession, ctx));
if (criteria != null && criteria.getFilter() != null)
{
@@ -1189,7 +1203,7 @@
HibernateIdentityObject hibernateObject = safeGet(ctx, identity);
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
try
{
@@ -1199,16 +1213,16 @@
{
if (criteria.isAscending())
{
- q =
em.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesForIdentityObjectOrderedByNameAsc);
+ q =
hibernateSession.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesForIdentityObjectOrderedByNameAsc);
}
else
{
- q =
em.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesForIdentityObjectOrdereByNameDesc);
+ q =
hibernateSession.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesForIdentityObjectOrdereByNameDesc);
}
}
else
{
- q =
em.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesForIdentityObject);
+ q =
hibernateSession.createQuery(HibernateIdentityObjectRelationshipName.findIdentityObjectRelationshipNamesForIdentityObject);
}
q.setParameter("identityObject", hibernateObject);
@@ -1247,13 +1261,13 @@
throw new IllegalArgumentException("name is null");
}
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
try
{
- HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
- .add(Restrictions.eq("name",
name)).add(Restrictions.eq("realm", getRealm(em, ctx))).uniqueResult();
+ HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)hibernateSession.createCriteria(HibernateIdentityObjectRelationshipName.class)
+ .add(Restrictions.eq("name",
name)).add(Restrictions.eq("realm", getRealm(hibernateSession,
ctx))).uniqueResult();
if (hiorn == null)
{
@@ -1276,13 +1290,13 @@
throw new IllegalArgumentException("name is null");
}
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
try
{
- HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
- .add(Restrictions.eq("name",
name)).add(Restrictions.eq("realm", getRealm(em, ctx))).uniqueResult();
+ HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)hibernateSession.createCriteria(HibernateIdentityObjectRelationshipName.class)
+ .add(Restrictions.eq("name",
name)).add(Restrictions.eq("realm", getRealm(hibernateSession,
ctx))).uniqueResult();
if (hiorn == null)
{
@@ -1305,13 +1319,13 @@
throw new IllegalArgumentException("name is null");
}
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
try
{
- HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)em.createCriteria(HibernateIdentityObjectRelationshipName.class)
- .add(Restrictions.eq("name",
name)).add(Restrictions.eq("realm", getRealm(em, ctx))).uniqueResult();
+ HibernateIdentityObjectRelationshipName hiorn =
(HibernateIdentityObjectRelationshipName)hibernateSession.createCriteria(HibernateIdentityObjectRelationshipName.class)
+ .add(Restrictions.eq("name",
name)).add(Restrictions.eq("realm", getRealm(hibernateSession,
ctx))).uniqueResult();
if (hiorn == null)
{
@@ -1516,7 +1530,7 @@
Set<HibernateIdentityObjectAttribute> storeAttributes =
hibernateObject.getAttributes();
Map<String, IdentityObjectAttribute> result = new HashMap<String,
IdentityObjectAttribute>();
-
+
// Remap the names
for (HibernateIdentityObjectAttribute attribute : storeAttributes)
{
@@ -1676,7 +1690,7 @@
}
}
}
-
+
}
public void addAttributes(IdentityStoreInvocationContext ctx, IdentityObject identity,
IdentityObjectAttribute[] attributes) throws IdentityException
@@ -1707,8 +1721,13 @@
}
- IdentityObjectAttributeMetaData amd = mdMap.get(attribute.getName());
+ IdentityObjectAttributeMetaData amd = null;
+ if (mdMap != null)
+ {
+ amd = mdMap.get(attribute.getName());
+ }
+
if (amd != null)
{
@@ -1760,7 +1779,7 @@
{
IdentityObjectAttribute attribute = mappedAttributes.get(name);
- IdentityObjectAttributeMetaData amd = mdMap.get(attribute.getName());
+ IdentityObjectAttributeMetaData amd = mdMap != null ?
mdMap.get(attribute.getName()) : null;
// Default to text
String type = amd != null ? amd.getType() :
IdentityObjectAttributeMetaData.TEXT_TYPE;
@@ -1920,14 +1939,6 @@
q.setParameter("identityType", hiot)
.setParameter("attributeName", attrMappedName)
.setParameter("value", attribute.getValue()).list();
-//
-// List<HibernateIdentityObjectAttribute> attrs =
(List<HibernateIdentityObjectAttribute>)
-// session.createCriteria(HibernateIdentityObjectAttribute.class)
-// .createAlias("identityObject", "io")
-// .createAlias("values", "v")
-// .add(Restrictions.eq("io.identityType", hiot))
-// .add(Restrictions.eq("name", attrMappedName))
-// .add(Restrictions.like("v[0]", attribute.getValue())).list();
if (attrs.size() == 0)
{
@@ -2012,7 +2023,7 @@
HibernateIdentityObject hibernateObject = safeGet(ctx, identityObject);
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
if
(supportedFeatures.isCredentialSupported(hibernateObject.getIdentityType(),credential.getType()))
{
@@ -2061,7 +2072,7 @@
throw new IdentityException("Not supported credential value: " +
value.getClass());
}
- em.persist(hibernateCredential);
+ hibernateSession.persist(hibernateCredential);
hibernateObject.addCredential(hibernateCredential);
@@ -2076,7 +2087,7 @@
-
+
// Internal
public void addIdentityObjectType(IdentityStoreInvocationContext ctx,
IdentityObjectType type) throws IdentityException
@@ -2136,32 +2147,55 @@
throw new IllegalArgumentException("IdentityObjectType is null");
}
+
if (!getSupportedFeatures().isIdentityObjectTypeSupported(iot))
{
- throw new IdentityException("IdentityType not supported by this
IdentityStore implementation: " + iot);
+ if (!isAllowNotDefinedIdentityObjectTypes())
+ {
+ throw new IdentityException("IdentityType not supported by this
IdentityStore implementation: " + iot);
+ }
}
}
private HibernateIdentityObjectType
getHibernateIdentityObjectType(IdentityStoreInvocationContext ctx, IdentityObjectType
type) throws IdentityException
{
+ checkIOType(type);
+
HibernateIdentityObjectType hibernateType = null;
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
-
try
{
- hibernateType = (HibernateIdentityObjectType)em.
+ Query q = hibernateSession.
createQuery(HibernateIdentityObjectType.findIdentityObjectTypeByName)
- .setParameter("name", type.getName())
- .uniqueResult() ;
+ .setParameter("name", type.getName());
+
+ hibernateType = (HibernateIdentityObjectType)q.uniqueResult();
+
+ if (hibernateType == null)
+ {
+ if (isAllowNotDefinedIdentityObjectTypes())
+ {
+ populateObjectTypes(hibernateSession, new String[]{type.getName()});
+ }
+
+ hibernateType = (HibernateIdentityObjectType)q.uniqueResult();
+ }
+
+
}
- catch (HibernateException e)
+ catch (Exception e)
{
throw new IdentityException("IdentityObjectType[" + type.getName() +
"] not present in the store.", e);
}
+ if (hibernateType == null)
+ {
+ throw new IdentityException("IdentityObjectType[" + type.getName() +
"] not present in the store.");
+ }
+
return hibernateType;
}
@@ -2170,15 +2204,15 @@
HibernateIdentityObject hibernateObject = null;
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
try
{
- hibernateObject =
(HibernateIdentityObject)em.createQuery(HibernateIdentityObject.findIdentityObjectByNameAndType)
+ hibernateObject =
(HibernateIdentityObject)hibernateSession.createQuery(HibernateIdentityObject.findIdentityObjectByNameAndType)
.setParameter("name", io.getName())
.setParameter("typeName", io.getIdentityType().getName())
- .setParameter("realm", getRealm(em, ctx))
+ .setParameter("realm", getRealm(hibernateSession, ctx))
.uniqueResult();
}
catch (Exception e)
@@ -2194,11 +2228,11 @@
HibernateIdentityObjectRelationshipType relationshipType = null;
- Session em = getHibernateSession(ctx);
+ Session hibernateSession = getHibernateSession(ctx);
try
{
- relationshipType = (HibernateIdentityObjectRelationshipType)em.
+ relationshipType = (HibernateIdentityObjectRelationshipType)hibernateSession.
createQuery(HibernateIdentityObjectRelationshipType.findIdentityObjectRelationshipTypeByName)
.setParameter("name", iot.getName())
.uniqueResult();
@@ -2464,5 +2498,11 @@
}
}
+ protected boolean isAllowNotDefinedIdentityObjectTypes()
+ {
+ return isAllowNotDefinedIdentityObjectTypes;
+ }
+
+
}
Modified:
idm/trunk/idm-spi/src/main/java/org/jboss/identity/idm/spi/repository/IdentityStoreRepository.java
===================================================================
---
idm/trunk/idm-spi/src/main/java/org/jboss/identity/idm/spi/repository/IdentityStoreRepository.java 2009-06-11
20:28:06 UTC (rev 605)
+++
idm/trunk/idm-spi/src/main/java/org/jboss/identity/idm/spi/repository/IdentityStoreRepository.java 2009-06-12
10:09:20 UTC (rev 606)
@@ -72,13 +72,13 @@
* @param identityObjectType
* @return proper identity store to store given identity type
*/
- IdentityStore getIdentityStore(IdentityObjectType identityObjectType);
+ IdentityStore getIdentityStore(IdentityObjectType identityObjectType) throws
IdentityException;
/**
* @param identityObjectType
* @return proper identity store to store given identity type
*/
- AttributeStore getAttributeStore(IdentityObjectType identityObjectType);
+ AttributeStore getAttributeStore(IdentityObjectType identityObjectType) throws
IdentityException;
/**
Modified:
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java
===================================================================
---
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java 2009-06-11
20:28:06 UTC (rev 605)
+++
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java 2009-06-12
10:09:20 UTC (rev 606)
@@ -57,7 +57,7 @@
public class IdentityTestPOJO extends TestCase
{
- private String identityConfig = "organization-test-jboss-unit-config.xml";
+ private String identityConfig = "test-identity-config.xml";
private String realmName;
Copied:
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/MinimalFlexibleConfigTestCase.java
(from rev 592,
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/OrganizationTestCase.java)
===================================================================
---
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/MinimalFlexibleConfigTestCase.java
(rev 0)
+++
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/MinimalFlexibleConfigTestCase.java 2009-06-12
10:09:20 UTC (rev 606)
@@ -0,0 +1,150 @@
+/*
+* 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.
+*/
+
+package org.jboss.identity.idm.impl.api;
+
+import org.jboss.identity.idm.impl.IdentityTestPOJO;
+import org.jboss.identity.idm.impl.configuration.IdentityConfigurationImpl;
+import org.jboss.identity.idm.api.IdentitySessionFactory;
+import org.jboss.unit.api.pojo.annotations.Create;
+import org.jboss.unit.api.pojo.annotations.Destroy;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.api.pojo.annotations.Parameter;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class MinimalFlexibleConfigTestCase extends IdentityTestPOJO implements
APITestContext
+{
+ private OrganizationTest orgTest;
+
+ private PersistenceManagerTest persistenceManagerTest;
+
+ private RelationshipManagerTest relationshipManagerTest;
+
+ private RoleManagerTest roleManagerTest;
+
+ private UserQueryTest userQueryTest;
+
+ private GroupQueryTest groupQueryTest;
+
+ private RoleQueryTest roleQueryTest;
+
+ private IdentitySessionFactory identitySessionFactory;
+
+ @Create
+ public void setUp() throws Exception
+ {
+ setIdentityConfig("minimal-flexible-identity-config.xml");
+ setRealmName("realm://FlexibleRealm");
+
+ super.start();
+
+ orgTest = new OrganizationTest(this);
+
+ persistenceManagerTest = new PersistenceManagerTest(this);
+ relationshipManagerTest = new RelationshipManagerTest(this);
+ roleManagerTest = new RoleManagerTest(this);
+
+ userQueryTest = new UserQueryTest(this);
+ groupQueryTest = new GroupQueryTest(this);
+ roleQueryTest = new RoleQueryTest(this);
+
+ identitySessionFactory = new IdentityConfigurationImpl().
+ configure(getIdentityConfig()).buildIdentitySessionFactory();
+ }
+
+ @Destroy
+ public void tearDown() throws Exception
+ {
+ super.stop();
+ }
+
+ public IdentitySessionFactory getIdentitySessionFactory()
+ {
+ return identitySessionFactory;
+ }
+
+ @Test
+ public void testOrganization() throws Exception
+ {
+
+ orgTest.testRedHatOrganization(getRealmName());
+ }
+
+ @Test
+ public void testSamplePortal() throws Exception
+ {
+
+ orgTest.testSamplePortal(getRealmName());
+ }
+
+ @Test
+ public void testPersistenceManager() throws Exception
+ {
+ persistenceManagerTest.testMethods(getRealmName());
+ }
+
+ @Test
+ public void testRelationshipManager() throws Exception
+ {
+ relationshipManagerTest.testMethods(getRealmName());
+ }
+
+ @Test
+ public void testRelationshipManagerCascade() throws Exception
+ {
+ relationshipManagerTest.testCascade(getRealmName());
+ }
+
+ @Test
+ public void testRelationshipManagerMergedRoleAssociations() throws Exception
+ {
+ relationshipManagerTest.testMergedRoleAssociations(getRealmName());
+ }
+
+ @Test
+ public void testRoleManager() throws Exception
+ {
+ roleManagerTest.testMethods(getRealmName());
+ }
+
+ @Test
+ public void testUserQuery() throws Exception
+ {
+ userQueryTest.testQuery(getRealmName());
+ }
+
+ @Test
+ public void testGroupQuery() throws Exception
+ {
+ groupQueryTest.testQuery(getRealmName());
+ }
+
+ @Test
+ public void testRoleQuery() throws Exception
+ {
+ roleQueryTest.testQuery(getRealmName());
+ }
+
+}
\ No newline at end of file
Modified:
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/OrganizationTest.java
===================================================================
---
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/OrganizationTest.java 2009-06-11
20:28:06 UTC (rev 605)
+++
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/OrganizationTest.java 2009-06-12
10:09:20 UTC (rev 606)
@@ -272,87 +272,117 @@
assertTrue(groups.contains(portalTeamGroup));
- // Check that binary attribute picture is mapped
- AttributeDescription attributeDescription =
session.getAttributesManager().getAttributeDescription(bdawidowUser,
"picture");
- assertNotNull(attributeDescription);
- assertEquals("binary", attributeDescription.getType());
-
-
- // Generate random binary data for binary attribute
- Random random = new Random();
-
- // 900 kilobytes
- byte[] picture = new byte[921600];
- random.nextBytes(picture);
// User attributes
Attribute[] userInfo = new Attribute[]
{
new SimpleAttribute(P3PConstants.INFO_USER_NAME_GIVEN, new
String[]{"Boleslaw"}),
new SimpleAttribute(P3PConstants.INFO_USER_NAME_FAMILY, new
String[]{"Dawidowicz"}),
- new SimpleAttribute("picture", new byte[][]{picture}),
+ //new SimpleAttribute("picture", new byte[][]{picture}),
new SimpleAttribute("email", new
String[]{"bd(a)example.com"})
};
session.getAttributesManager().addAttributes(bdawidowUser, userInfo);
Map<String, Attribute> attributes =
session.getAttributesManager().getAttributes(bdawidowUser);
- assertEquals(4, attributes.keySet().size());
+ assertEquals(3, attributes.keySet().size());
assertEquals("Dawidowicz",
(attributes.get(P3PConstants.INFO_USER_NAME_FAMILY)).getValue());
- assertTrue(Arrays.equals((byte[])attributes.get("picture").getValue(),
picture));
+
+ // Generate random binary data for binary attribute
+ Random random = new Random();
+
+ // Check that binary attribute picture is mapped
+ AttributeDescription attributeDescription =
session.getAttributesManager().getAttributeDescription(bdawidowUser,
"picture");
+
+ if (attributeDescription != null &&
attributeDescription.getType().equals("binary"))
+ {
+
+ // 900 kilobytes
+ byte[] picture = new byte[921600];
+ random.nextBytes(picture);
+
+ userInfo = new Attribute[]
+ {
+ new SimpleAttribute("picture", new byte[][]{picture}),
+ };
+
+ session.getAttributesManager().addAttributes(bdawidowUser, userInfo);
+
+ attributes = session.getAttributesManager().getAttributes(bdawidowUser);
+ assertEquals(4, attributes.keySet().size());
+ assertEquals("Dawidowicz",
(attributes.get(P3PConstants.INFO_USER_NAME_FAMILY)).getValue());
+ assertTrue(Arrays.equals((byte[])attributes.get("picture").getValue(),
picture));
+ }
+
+
// Find user by email
assertNull(session.getAttributesManager().findUserByUniqueAttribute("email",
"toto"));
User user =
session.getAttributesManager().findUserByUniqueAttribute("email",
"bd(a)example.com");
assertEquals(bdawidowUser, user);
- // check if same unique email can be used for other user
- try
+ // If email is configured as unique it should not be possible to set same value for
different user
+
+ attributeDescription =
session.getAttributesManager().getAttributeDescription(bdawidowUser, "email");
+
+ if (attributeDescription != null && attributeDescription.isUnique())
{
- session.getAttributesManager().addAttributes(theuteUser, userInfo);
- fail();
+
+
+ // check if same unique email can be used for other user
+ try
+ {
+ userInfo = new Attribute[]
+ {
+ new SimpleAttribute("email", new
String[]{"bd(a)example.com"})
+ };
+
+ session.getAttributesManager().addAttributes(theuteUser, userInfo);
+ fail();
+ }
+ catch (IdentityException e)
+ {
+ // expected
+ }
}
- catch (IdentityException e)
- {
- // expected
- }
-
// Credential
User anotherOne = bdawidowUser;
//session.getPersistenceManager().createUser("blah1");
-
assertTrue(session.getAttributesManager().isCredentialTypeSupported(PasswordCredential.TYPE));
+ if
(session.getAttributesManager().isCredentialTypeSupported(PasswordCredential.TYPE))
+ {
- // #1
- session.getAttributesManager().updatePassword(anotherOne, "secret");
- assertTrue(session.getAttributesManager().validatePassword(anotherOne,
"secret"));
- assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret2"));
- assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret3"));
+ // #1
+ session.getAttributesManager().updatePassword(anotherOne, "secret");
+ assertTrue(session.getAttributesManager().validatePassword(anotherOne,
"secret"));
+ assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret2"));
+ assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret3"));
- // #1
- session.getAttributesManager().updatePassword(anotherOne, "secret2");
- assertTrue(session.getAttributesManager().validatePassword(anotherOne,
"secret2"));
- assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret"));
- assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret3"));
+ // #1
+ session.getAttributesManager().updatePassword(anotherOne, "secret2");
+ assertTrue(session.getAttributesManager().validatePassword(anotherOne,
"secret2"));
+ assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret"));
+ assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret3"));
- // #1
- session.getAttributesManager().updatePassword(anotherOne, "secret3");
- assertTrue(session.getAttributesManager().validatePassword(anotherOne,
"secret3"));
- assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret"));
- assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret2"));
+ // #1
+ session.getAttributesManager().updatePassword(anotherOne, "secret3");
+ assertTrue(session.getAttributesManager().validatePassword(anotherOne,
"secret3"));
+ assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret"));
+ assertFalse(session.getAttributesManager().validatePassword(anotherOne,
"secret2"));
- // #2
- Credential password = new PasswordCredential("secretPhrase");
- session.getAttributesManager().updateCredential(anotherOne, password);
- assertTrue(session.getAttributesManager().validateCredentials(anotherOne, new
Credential[]{password}));
+ // #2
+ Credential password = new PasswordCredential("secretPhrase");
+ session.getAttributesManager().updateCredential(anotherOne, password);
+ assertTrue(session.getAttributesManager().validateCredentials(anotherOne, new
Credential[]{password}));
- // #3
+ // #3
+ }
if
(session.getAttributesManager().isCredentialTypeSupported(BinaryCredential.TYPE))
{
Copied: idm/trunk/idm-testsuite/src/test/resources/minimal-flexible-identity-config.xml
(from rev 601,
idm/trunk/idm-testsuite/src/test/resources/organization-test-jboss-unit-config.xml)
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/minimal-flexible-identity-config.xml
(rev 0)
+++
idm/trunk/idm-testsuite/src/test/resources/minimal-flexible-identity-config.xml 2009-06-12
10:09:20 UTC (rev 606)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_alpha"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
+ <realms>
+ <realm>
+ <id>realm://FlexibleRealm</id>
+ <repository-id-ref>Flexible Repo</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+ <repositories>
+ <repository>
+ <id>Flexible Repo</id>
+
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
+ <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
+ <options>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </repository>
+ </repositories>
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>Hibernate Identity Store</id>
+
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types/>
+ <options>
+ <option>
+ <name>hibernateSessionFactoryJNDIName</name>
+
<value>java:/jbossidentity/HibernateStoreSessionFactory</value>
+ </option>
+ <option>
+ <name>populateRelationshipTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>isRealmAware</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store>
+ </identity-stores>
+ </stores>
+</jboss-identity>
\ No newline at end of file
Deleted: idm/trunk/idm-testsuite/src/test/resources/organization-test-config.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/organization-test-config.xml 2009-06-11
20:28:06 UTC (rev 605)
+++ idm/trunk/idm-testsuite/src/test/resources/organization-test-config.xml 2009-06-12
10:09:20 UTC (rev 606)
@@ -1,818 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_alpha"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
- <realms>
- <realm>
- <id>realm://RedHat/DB</id>
- <repository-id-ref>RedHat Repository DB</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- <realm>
- <id>realm://portal/SamplePortal/DB</id>
- <repository-id-ref>Sample Portal Repository DB</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- <realm>
- <id>realm://RedHat/DB_LDAP</id>
- <repository-id-ref>RedHat Repository DB+LDAP</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- <realm>
- <id>realm://portal/SamplePortal/DB_LDAP</id>
- <repository-id-ref>Sample Portal Repository
DB+LDAP</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- </realms>
- <repositories>
- <repository>
- <id>RedHat Repository DB</id>
-
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- <repository>
- <id>Sample Portal Repository DB</id>
-
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- <repository>
- <id>RedHat Repository DB+LDAP</id>
-
<class>org.jboss.identity.idm.impl.repository.FallbackIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <identity-store-mappings>
- <identity-store-mapping>
- <identity-store-id>Hibernate Identity
Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>DIVISION</identity-object-type>
- <identity-object-type>PROJECT</identity-object-type>
- <identity-object-type>PEOPLE</identity-object-type>
- </identity-object-types>
- <options/>
- </identity-store-mapping>
- <identity-store-mapping>
- <identity-store-id>LDAP Identity Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>USER</identity-object-type>
- <identity-object-type>ORGANIZATION</identity-object-type>
-
<identity-object-type>ORGANIZATION_UNIT</identity-object-type>
- <identity-object-type>DEPARTMENT</identity-object-type>
- </identity-object-types>
- <options>
- <option>
- <name>cache</name>
- <value>true</value>
- </option>
- <option>
- <name>cache.provider.class</name>
-
<value>org.jboss.identity.idm.impl.cache.IdentityStoreCacheSupportImpl</value>
- </option>
- <option>
- <name>cache.config-file</name>
-
<value>src/test/resources/jboss-cache-config.xml</value>
- </option>
- </options>
- </identity-store-mapping>
- </identity-store-mappings>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- <repository>
- <id>Sample Portal Repository DB+LDAP</id>
-
<class>org.jboss.identity.idm.impl.repository.FallbackIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <identity-store-mappings>
- <identity-store-mapping>
- <identity-store-id>Hibernate Identity
Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>SYSTEM</identity-object-type>
-
<identity-object-type>ADMINISTRATION</identity-object-type>
- <identity-object-type>COMMUNITY</identity-object-type>
- <identity-object-type>DIVISION</identity-object-type>
- <identity-object-type>SECURITY</identity-object-type>
- <identity-object-type>PEOPLE</identity-object-type>
- </identity-object-types>
- <options/>
- </identity-store-mapping>
- <identity-store-mapping>
- <identity-store-id>LDAP Identity Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>USER</identity-object-type>
- <identity-object-type>DEPARTMENT</identity-object-type>
- <identity-object-type>ORGANIZATION</identity-object-type>
-
<identity-object-type>ORGANIZATION_UNIT</identity-object-type>
- <identity-object-type>OFFICE</identity-object-type>
- </identity-object-types>
- <options>
- <option>
- <name>cache</name>
- <value>true</value>
- </option>
- <option>
- <name>cache.provider.class</name>
-
<value>org.jboss.identity.idm.impl.cache.IdentityStoreCacheSupportImpl</value>
- </option>
- <option>
- <name>cache.config-file</name>
-
<value>src/test/resources/jboss-cache-config.xml</value>
- </option>
- </options>
- </identity-store-mapping>
- </identity-store-mappings>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- </repositories>
- <stores>
- <attribute-stores/>
- <identity-stores>
- <identity-store>
- <id>Hibernate Identity Store</id>
-
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
- <external-config/>
- <supported-relationship-types>
-
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
- <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
- </supported-relationship-types>
- <supported-identity-object-types>
- <identity-object-type>
- <name>USER</name>
- <relationships>
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>COMMUNITY</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>OFFICE</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>SECURITY</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>PROJECT</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>PEOPLE</identity-object-type-ref>-->
- <!--</relationship>-->
- </relationships>
- <credentials>
- <credential-type>PASSWORD</credential-type>
- </credentials>
- <attributes>
- <attribute>
- <name>picture</name>
- <mapping>user.picture</mapping>
- <type>binary</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>email</name>
- <mapping>mail</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- <isUnique>true</isUnique>
- </attribute>
- </attributes>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DIVISION</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION_UNIT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DIVISION</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>OFFICE</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>PEOPLE</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>PROJECT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>DIVISION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>DEPARTMENT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>PROJECT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>PEOPLE</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ADMINISTRATION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>COMMUNITY</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>OFFICE</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>SECURITY</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>SYSTEM</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>SECURITY</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>COMMUNITY</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- </supported-identity-object-types>
- <options>
- <option>
- <name>hibernateConfiguration</name>
- <value>hibernate-jboss-identity.cfg.xml</value>
- </option>
- <!--<option>-->
- <!--<name>hibernateSessionFactoryJNDIName</name>-->
-
<!--<value>java:/jbossidentity/HibernateStoreSessionFactory</value>-->
- <!--</option>-->
- <option>
- <name>populateRelationshipTypes</name>
- <value>true</value>
- </option>
- <option>
- <name>populateIdentityObjectTypes</name>
- <value>true</value>
- </option>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- <option>
- <name>isRealmAware</name>
- <value>true</value>
- </option>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </identity-store>
- <identity-store>
- <id>LDAP Identity Store</id>
-
<class>org.jboss.identity.idm.impl.store.ldap.LDAPIdentityStoreImpl</class>
- <external-config/>
- <supported-relationship-types>
-
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
- </supported-relationship-types>
- <supported-identity-object-types>
- <identity-object-type>
- <name>USER</name>
- <relationships/>
- <credentials>
- <credential-type>PASSWORD</credential-type>
- </credentials>
- <attributes>
- <attribute>
- <name>phone</name>
- <mapping>telephoneNumber</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>email</name>
- <mapping>mail</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- <isUnique>true</isUnique>
- </attribute>
- <attribute>
- <name>description</name>
- <mapping>description</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>carLicense</name>
- <mapping>carLicense</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- </attributes>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>uid</value>
- </option>
- <option>
- <name>passwordAttributeName</name>
- <value>userPassword</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=People,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=inetOrgPerson</value>
- <value>sn= </value>
- <value>cn= </value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>OFFICE</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=Organizations,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION_UNIT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>OFFICE</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=OrganizationUnits,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>DEPARTMENT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=Departments,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>OFFICE</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=Offices,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- </supported-identity-object-types>
- <options>
- <option>
- <name>providerURL</name>
- <value>ldap://localhost:10389</value>
- </option>
- <option>
- <name>adminDN</name>
- <value>cn=Directory Manager</value>
- </option>
- <option>
- <name>adminPassword</name>
- <value>password</value>
- </option>
- <option>
- <name>searchTimeLimit</name>
- <value>10000</value>
- </option>
- </options>
- </identity-store>
- </identity-stores>
- </stores>
-</jboss-identity>
\ No newline at end of file
Deleted:
idm/trunk/idm-testsuite/src/test/resources/organization-test-jboss-unit-config.xml
===================================================================
---
idm/trunk/idm-testsuite/src/test/resources/organization-test-jboss-unit-config.xml 2009-06-11
20:28:06 UTC (rev 605)
+++
idm/trunk/idm-testsuite/src/test/resources/organization-test-jboss-unit-config.xml 2009-06-12
10:09:20 UTC (rev 606)
@@ -1,818 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_alpha"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
- <realms>
- <realm>
- <id>realm://RedHat/DB</id>
- <repository-id-ref>RedHat Repository DB</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- <realm>
- <id>realm://portal/SamplePortal/DB</id>
- <repository-id-ref>Sample Portal Repository DB</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- <realm>
- <id>realm://RedHat/DB_LDAP</id>
- <repository-id-ref>RedHat Repository DB+LDAP</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- <realm>
- <id>realm://portal/SamplePortal/DB_LDAP</id>
- <repository-id-ref>Sample Portal Repository
DB+LDAP</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- </realms>
- <repositories>
- <repository>
- <id>RedHat Repository DB</id>
-
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- <repository>
- <id>Sample Portal Repository DB</id>
-
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- <repository>
- <id>RedHat Repository DB+LDAP</id>
-
<class>org.jboss.identity.idm.impl.repository.FallbackIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <identity-store-mappings>
- <identity-store-mapping>
- <identity-store-id>Hibernate Identity
Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>DIVISION</identity-object-type>
- <identity-object-type>PROJECT</identity-object-type>
- <identity-object-type>PEOPLE</identity-object-type>
- </identity-object-types>
- <options/>
- </identity-store-mapping>
- <identity-store-mapping>
- <identity-store-id>LDAP Identity Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>USER</identity-object-type>
- <identity-object-type>ORGANIZATION</identity-object-type>
-
<identity-object-type>ORGANIZATION_UNIT</identity-object-type>
- <identity-object-type>DEPARTMENT</identity-object-type>
- </identity-object-types>
- <options>
- <option>
- <name>cache</name>
- <value>false</value>
- </option>
- <option>
- <name>cache.provider.class</name>
-
<value>org.jboss.identity.idm.impl.cache.IdentityStoreCacheProviderImpl</value>
- </option>
- <option>
- <name>cache.config-file</name>
- <value>jboss-cache-config.xml</value>
- </option>
- </options>
- </identity-store-mapping>
- </identity-store-mappings>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- <repository>
- <id>Sample Portal Repository DB+LDAP</id>
-
<class>org.jboss.identity.idm.impl.repository.FallbackIdentityStoreRepository</class>
- <external-config/>
- <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
- <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
- <identity-store-mappings>
- <identity-store-mapping>
- <identity-store-id>Hibernate Identity
Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>SYSTEM</identity-object-type>
-
<identity-object-type>ADMINISTRATION</identity-object-type>
- <identity-object-type>COMMUNITY</identity-object-type>
- <identity-object-type>DIVISION</identity-object-type>
- <identity-object-type>SECURITY</identity-object-type>
- <identity-object-type>PEOPLE</identity-object-type>
- </identity-object-types>
- <options/>
- </identity-store-mapping>
- <identity-store-mapping>
- <identity-store-id>LDAP Identity Store</identity-store-id>
- <identity-object-types>
- <identity-object-type>USER</identity-object-type>
- <identity-object-type>DEPARTMENT</identity-object-type>
- <identity-object-type>ORGANIZATION</identity-object-type>
-
<identity-object-type>ORGANIZATION_UNIT</identity-object-type>
- <identity-object-type>OFFICE</identity-object-type>
- </identity-object-types>
- <options>
- <option>
- <name>cache</name>
- <value>false</value>
- </option>
- <option>
- <name>cache.provider.class</name>
-
<value>org.jboss.identity.idm.impl.cache.IdentityStoreCacheProviderImpl</value>
- </option>
- <option>
- <name>cache.config-file</name>
- <value>jboss-cache-config.xml</value>
- </option>
- </options>
- </identity-store-mapping>
- </identity-store-mappings>
- <options>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </repository>
- </repositories>
- <stores>
- <attribute-stores/>
- <identity-stores>
- <identity-store>
- <id>Hibernate Identity Store</id>
-
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
- <external-config/>
- <supported-relationship-types>
-
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
- <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
- </supported-relationship-types>
- <supported-identity-object-types>
- <identity-object-type>
- <name>USER</name>
- <relationships>
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>COMMUNITY</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>OFFICE</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>SECURITY</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>PROJECT</identity-object-type-ref>-->
- <!--</relationship>-->
- <!--<relationship>-->
-
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
-
<!--<identity-object-type-ref>PEOPLE</identity-object-type-ref>-->
- <!--</relationship>-->
- </relationships>
- <credentials>
- <credential-type>PASSWORD</credential-type>
- </credentials>
- <attributes>
- <attribute>
- <name>picture</name>
- <mapping>user.picture</mapping>
- <type>binary</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>email</name>
- <mapping>mail</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- <isUnique>true</isUnique>
- </attribute>
- </attributes>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DIVISION</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION_UNIT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DIVISION</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>OFFICE</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>PEOPLE</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>PROJECT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>DIVISION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>DEPARTMENT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>PROJECT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>PEOPLE</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>ADMINISTRATION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>COMMUNITY</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>OFFICE</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>SECURITY</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- <identity-object-type>
- <name>SYSTEM</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>SECURITY</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>COMMUNITY</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options/>
- </identity-object-type>
- </supported-identity-object-types>
- <options>
- <!--<option>-->
- <!--<name>hibernateConfiguration</name>-->
- <!--<value>hibernate-jboss-identity.cfg.xml</value>-->
- <!--</option>-->
- <option>
- <name>hibernateSessionFactoryJNDIName</name>
-
<value>java:/jbossidentity/HibernateStoreSessionFactory</value>
- </option>
- <option>
- <name>populateRelationshipTypes</name>
- <value>true</value>
- </option>
- <option>
- <name>populateIdentityObjectTypes</name>
- <value>true</value>
- </option>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- <option>
- <name>isRealmAware</name>
- <value>true</value>
- </option>
- <option>
- <name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- </options>
- </identity-store>
- <identity-store>
- <id>LDAP Identity Store</id>
-
<class>org.jboss.identity.idm.impl.store.ldap.LDAPIdentityStoreImpl</class>
- <external-config/>
- <supported-relationship-types>
-
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
- </supported-relationship-types>
- <supported-identity-object-types>
- <identity-object-type>
- <name>USER</name>
- <relationships/>
- <credentials>
- <credential-type>PASSWORD</credential-type>
- </credentials>
- <attributes>
- <attribute>
- <name>phone</name>
- <mapping>telephoneNumber</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>description</name>
- <mapping>description</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>carLicense</name>
- <mapping>carLicense</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- </attribute>
- <attribute>
- <name>email</name>
- <mapping>mail</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- <isUnique>true</isUnique>
- </attribute>
- </attributes>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>uid</value>
- </option>
- <option>
- <name>passwordAttributeName</name>
- <value>userPassword</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=People,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=inetOrgPerson</value>
- <value>sn= </value>
- <value>cn= </value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>OFFICE</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=Organizations,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>ORGANIZATION_UNIT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>OFFICE</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=OrganizationUnits,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>DEPARTMENT</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
- </relationship>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=Departments,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- <identity-object-type>
- <name>OFFICE</name>
- <relationships>
- <relationship>
-
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
-
<identity-object-type-ref>USER</identity-object-type-ref>
- </relationship>
- </relationships>
- <credentials/>
- <attributes/>
- <options>
- <option>
- <name>idAttributeName</name>
- <value>cn</value>
- </option>
- <option>
- <name>ctxDNs</name>
-
<value>ou=Offices,o=test,dc=portal,dc=example,dc=com</value>
- </option>
- <!--<option>-->
- <!--<name>entrySearchFilter</name>-->
- <!--<value></value>-->
- <!--</option>-->
- <option>
- <name>allowCreateEntry</name>
- <value>true</value>
- </option>
- <option>
- <name>membershipAttributeName</name>
- <value>member</value>
- </option>
- <option>
- <name>isMembershipAttributeDN</name>
- <value>true</value>
- </option>
- <option>
- <name>allowEmptyMemberships</name>
- <value>true</value>
- </option>
- <option>
- <name>createEntryAttributeValues</name>
- <value>objectClass=top</value>
- <value>objectClass=groupOfNames</value>
- </option>
- </options>
- </identity-object-type>
- </supported-identity-object-types>
- <options>
- <option>
- <name>providerURL</name>
- <value>ldap://localhost:10389</value>
- </option>
- <option>
- <name>adminDN</name>
- <value>cn=Directory Manager</value>
- </option>
- <option>
- <name>adminPassword</name>
- <value>password</value>
- </option>
- <option>
- <name>searchTimeLimit</name>
- <value>10000</value>
- </option>
- </options>
- </identity-store>
- </identity-stores>
- </stores>
-</jboss-identity>
\ No newline at end of file
Copied: idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml (from rev 601,
idm/trunk/idm-testsuite/src/test/resources/organization-test-jboss-unit-config.xml)
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml
(rev 0)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml 2009-06-12
10:09:20 UTC (rev 606)
@@ -0,0 +1,818 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_alpha"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
+ <realms>
+ <realm>
+ <id>realm://RedHat/DB</id>
+ <repository-id-ref>RedHat Repository DB</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ <realm>
+ <id>realm://portal/SamplePortal/DB</id>
+ <repository-id-ref>Sample Portal Repository DB</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ <realm>
+ <id>realm://RedHat/DB_LDAP</id>
+ <repository-id-ref>RedHat Repository DB+LDAP</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ <realm>
+ <id>realm://portal/SamplePortal/DB_LDAP</id>
+ <repository-id-ref>Sample Portal Repository
DB+LDAP</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+ <repositories>
+ <repository>
+ <id>RedHat Repository DB</id>
+
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
+ <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
+ <options>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </repository>
+ <repository>
+ <id>Sample Portal Repository DB</id>
+
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
+ <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
+ <options>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </repository>
+ <repository>
+ <id>RedHat Repository DB+LDAP</id>
+
<class>org.jboss.identity.idm.impl.repository.FallbackIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
+ <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
+ <identity-store-mappings>
+ <identity-store-mapping>
+ <identity-store-id>Hibernate Identity
Store</identity-store-id>
+ <identity-object-types>
+ <identity-object-type>DIVISION</identity-object-type>
+ <identity-object-type>PROJECT</identity-object-type>
+ <identity-object-type>PEOPLE</identity-object-type>
+ </identity-object-types>
+ <options/>
+ </identity-store-mapping>
+ <identity-store-mapping>
+ <identity-store-id>LDAP Identity Store</identity-store-id>
+ <identity-object-types>
+ <identity-object-type>USER</identity-object-type>
+ <identity-object-type>ORGANIZATION</identity-object-type>
+
<identity-object-type>ORGANIZATION_UNIT</identity-object-type>
+ <identity-object-type>DEPARTMENT</identity-object-type>
+ </identity-object-types>
+ <options>
+ <option>
+ <name>cache</name>
+ <value>false</value>
+ </option>
+ <option>
+ <name>cache.provider.class</name>
+
<value>org.jboss.identity.idm.impl.cache.IdentityStoreCacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.config-file</name>
+ <value>jboss-cache-config.xml</value>
+ </option>
+ </options>
+ </identity-store-mapping>
+ </identity-store-mappings>
+ <options>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </repository>
+ <repository>
+ <id>Sample Portal Repository DB+LDAP</id>
+
<class>org.jboss.identity.idm.impl.repository.FallbackIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>Hibernate Identity
Store</default-identity-store-id>
+ <default-attribute-store-id>Hibernate Identity
Store</default-attribute-store-id>
+ <identity-store-mappings>
+ <identity-store-mapping>
+ <identity-store-id>Hibernate Identity
Store</identity-store-id>
+ <identity-object-types>
+ <identity-object-type>SYSTEM</identity-object-type>
+
<identity-object-type>ADMINISTRATION</identity-object-type>
+ <identity-object-type>COMMUNITY</identity-object-type>
+ <identity-object-type>DIVISION</identity-object-type>
+ <identity-object-type>SECURITY</identity-object-type>
+ <identity-object-type>PEOPLE</identity-object-type>
+ </identity-object-types>
+ <options/>
+ </identity-store-mapping>
+ <identity-store-mapping>
+ <identity-store-id>LDAP Identity Store</identity-store-id>
+ <identity-object-types>
+ <identity-object-type>USER</identity-object-type>
+ <identity-object-type>DEPARTMENT</identity-object-type>
+ <identity-object-type>ORGANIZATION</identity-object-type>
+
<identity-object-type>ORGANIZATION_UNIT</identity-object-type>
+ <identity-object-type>OFFICE</identity-object-type>
+ </identity-object-types>
+ <options>
+ <option>
+ <name>cache</name>
+ <value>false</value>
+ </option>
+ <option>
+ <name>cache.provider.class</name>
+
<value>org.jboss.identity.idm.impl.cache.IdentityStoreCacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.config-file</name>
+ <value>jboss-cache-config.xml</value>
+ </option>
+ </options>
+ </identity-store-mapping>
+ </identity-store-mappings>
+ <options>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </repository>
+ </repositories>
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>Hibernate Identity Store</id>
+
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>USER</name>
+ <relationships>
+ <!--<relationship>-->
+
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
+
<!--<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>-->
+ <!--</relationship>-->
+ <!--<relationship>-->
+
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
+
<!--<identity-object-type-ref>COMMUNITY</identity-object-type-ref>-->
+ <!--</relationship>-->
+ <!--<relationship>-->
+
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
+
<!--<identity-object-type-ref>OFFICE</identity-object-type-ref>-->
+ <!--</relationship>-->
+ <!--<relationship>-->
+
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
+
<!--<identity-object-type-ref>SECURITY</identity-object-type-ref>-->
+ <!--</relationship>-->
+ <!--<relationship>-->
+
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
+
<!--<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>-->
+ <!--</relationship>-->
+ <!--<relationship>-->
+
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
+
<!--<identity-object-type-ref>PROJECT</identity-object-type-ref>-->
+ <!--</relationship>-->
+ <!--<relationship>-->
+
<!--<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>-->
+
<!--<identity-object-type-ref>PEOPLE</identity-object-type-ref>-->
+ <!--</relationship>-->
+ </relationships>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes>
+ <attribute>
+ <name>picture</name>
+ <mapping>user.picture</mapping>
+ <type>binary</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ </attribute>
+ <attribute>
+ <name>email</name>
+ <mapping>mail</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ <isUnique>true</isUnique>
+ </attribute>
+ </attributes>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ORGANIZATION</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>DIVISION</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ORGANIZATION_UNIT</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>DIVISION</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>OFFICE</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>PEOPLE</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>PROJECT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>DIVISION</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>DEPARTMENT</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>PROJECT</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>PEOPLE</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ADMINISTRATION</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>COMMUNITY</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>OFFICE</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>SECURITY</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ <identity-object-type>
+ <name>SYSTEM</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_ROLE</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>SECURITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>COMMUNITY</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <!--<option>-->
+ <!--<name>hibernateConfiguration</name>-->
+ <!--<value>hibernate-jboss-identity.cfg.xml</value>-->
+ <!--</option>-->
+ <option>
+ <name>hibernateSessionFactoryJNDIName</name>
+
<value>java:/jbossidentity/HibernateStoreSessionFactory</value>
+ </option>
+ <option>
+ <name>populateRelationshipTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>isRealmAware</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store>
+ <identity-store>
+ <id>LDAP Identity Store</id>
+
<class>org.jboss.identity.idm.impl.store.ldap.LDAPIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>USER</name>
+ <relationships/>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes>
+ <attribute>
+ <name>phone</name>
+ <mapping>telephoneNumber</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ </attribute>
+ <attribute>
+ <name>description</name>
+ <mapping>description</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ </attribute>
+ <attribute>
+ <name>carLicense</name>
+ <mapping>carLicense</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ </attribute>
+ <attribute>
+ <name>email</name>
+ <mapping>mail</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ <isUnique>true</isUnique>
+ </attribute>
+ </attributes>
+ <options>
+ <option>
+ <name>idAttributeName</name>
+ <value>uid</value>
+ </option>
+ <option>
+ <name>passwordAttributeName</name>
+ <value>userPassword</value>
+ </option>
+ <option>
+ <name>ctxDNs</name>
+
<value>ou=People,o=test,dc=portal,dc=example,dc=com</value>
+ </option>
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>createEntryAttributeValues</name>
+ <value>objectClass=top</value>
+ <value>objectClass=inetOrgPerson</value>
+ <value>sn= </value>
+ <value>cn= </value>
+ </option>
+ </options>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ORGANIZATION</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>OFFICE</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options>
+ <option>
+ <name>idAttributeName</name>
+ <value>cn</value>
+ </option>
+ <option>
+ <name>ctxDNs</name>
+
<value>ou=Organizations,o=test,dc=portal,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>membershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isMembershipAttributeDN</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowEmptyMemberships</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>createEntryAttributeValues</name>
+ <value>objectClass=top</value>
+ <value>objectClass=groupOfNames</value>
+ </option>
+ </options>
+ </identity-object-type>
+ <identity-object-type>
+ <name>ORGANIZATION_UNIT</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>OFFICE</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options>
+ <option>
+ <name>idAttributeName</name>
+ <value>cn</value>
+ </option>
+ <option>
+ <name>ctxDNs</name>
+
<value>ou=OrganizationUnits,o=test,dc=portal,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>membershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isMembershipAttributeDN</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowEmptyMemberships</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>createEntryAttributeValues</name>
+ <value>objectClass=top</value>
+ <value>objectClass=groupOfNames</value>
+ </option>
+ </options>
+ </identity-object-type>
+ <identity-object-type>
+ <name>DEPARTMENT</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>DEPARTMENT</identity-object-type-ref>
+ </relationship>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>ORGANIZATION_UNIT</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options>
+ <option>
+ <name>idAttributeName</name>
+ <value>cn</value>
+ </option>
+ <option>
+ <name>ctxDNs</name>
+
<value>ou=Departments,o=test,dc=portal,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>membershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isMembershipAttributeDN</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowEmptyMemberships</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>createEntryAttributeValues</name>
+ <value>objectClass=top</value>
+ <value>objectClass=groupOfNames</value>
+ </option>
+ </options>
+ </identity-object-type>
+ <identity-object-type>
+ <name>OFFICE</name>
+ <relationships>
+ <relationship>
+
<relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+
<identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes/>
+ <options>
+ <option>
+ <name>idAttributeName</name>
+ <value>cn</value>
+ </option>
+ <option>
+ <name>ctxDNs</name>
+
<value>ou=Offices,o=test,dc=portal,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>membershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isMembershipAttributeDN</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowEmptyMemberships</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>createEntryAttributeValues</name>
+ <value>objectClass=top</value>
+ <value>objectClass=groupOfNames</value>
+ </option>
+ </options>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+ <name>providerURL</name>
+ <value>ldap://localhost:10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>password</value>
+ </option>
+ <option>
+ <name>searchTimeLimit</name>
+ <value>10000</value>
+ </option>
+ </options>
+ </identity-store>
+ </identity-stores>
+ </stores>
+</jboss-identity>
\ No newline at end of file