JBoss Identity SVN: r962 - in idm/trunk/idm-testsuite/src/test/resources: datasources and 1 other directory.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-11-16 15:55:38 -0500 (Mon, 16 Nov 2009)
New Revision: 962
Added:
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-opends12.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-opends20.xml
Modified:
idm/trunk/idm-testsuite/src/test/resources/datasources/directories.xml
Log:
- fix for opends tests in hudson
Modified: idm/trunk/idm-testsuite/src/test/resources/datasources/directories.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/datasources/directories.xml 2009-11-16 17:00:28 UTC (rev 961)
+++ idm/trunk/idm-testsuite/src/test/resources/datasources/directories.xml 2009-11-16 20:55:38 UTC (rev 962)
@@ -41,7 +41,7 @@
<directory-name>OpenDS-2-0</directory-name>
<description>ldap://dev39.qa.atl.jboss.com:2389</description>
<!--identity configuration file-->
- <config-file>test-identity-config.xml</config-file>
+ <config-file>test-identity-config-opends20.xml</config-file>
<host>dev39.qa.atl.jboss.com</host>
<port>2389</port>
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
@@ -56,7 +56,7 @@
<directory-name>OpenDS-1-2</directory-name>
<description>ldap://dev39.qa.atl.jboss.com:3389</description>
<!--identity configuration file-->
- <config-file>test-identity-config.xml</config-file>
+ <config-file>test-identity-config-opends12.xml</config-file>
<host>dev39.qa.atl.jboss.com</host>
<port>3389</port>
<context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
Copied: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-opends12.xml (from rev 956, idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml)
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config-opends12.xml (rev 0)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config-opends12.xml 2009-11-16 20:55:38 UTC (rev 962)
@@ -0,0 +1,922 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_beta"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_beta 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>
+ <options>
+ <option>
+ <name>cache.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.xml</value>
+ </option>
+ </options>
+ </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>
+ <options>
+ <option>
+ <name>cache.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.xml</value>
+ </option>
+ </options>
+ </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>
+ <options>
+ <option>
+ <name>cache.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.xml</value>
+ </option>
+ </options>
+ </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>
+ <options>
+ <option>
+ <name>cache.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.xml</value>
+ </option>
+ </options>
+ </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.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheIdentityStoreCacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.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.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheIdentityStoreCacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.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/>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</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,o=trunk,o=idm,o=jbid,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,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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>GROUP</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=Groups,o=test,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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>ROLE</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=Roles,o=test,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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://dev39.qa.atl.jboss.com:3389</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
Added: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-opends20.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config-opends20.xml (rev 0)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config-opends20.xml 2009-11-16 20:55:38 UTC (rev 962)
@@ -0,0 +1,922 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_beta"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_beta 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>
+ <options>
+ <option>
+ <name>cache.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.xml</value>
+ </option>
+ </options>
+ </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>
+ <options>
+ <option>
+ <name>cache.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.xml</value>
+ </option>
+ </options>
+ </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>
+ <options>
+ <option>
+ <name>cache.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.xml</value>
+ </option>
+ </options>
+ </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>
+ <options>
+ <option>
+ <name>cache.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheAPICacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.xml</value>
+ </option>
+ </options>
+ </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.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheIdentityStoreCacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.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.providerClass</name>
+ <value>org.jboss.identity.idm.impl.cache.JBossCacheIdentityStoreCacheProviderImpl</value>
+ </option>
+ <option>
+ <name>cache.configFile</name>
+ <value>jboss-cache.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/>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</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,o=trunk,o=idm,o=jbid,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,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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>GROUP</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=Groups,o=test,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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>ROLE</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=Roles,o=test,o=trunk,o=idm,o=jbid,dc=example,dc=com</value>
+ </option>
+ <!--<option>-->
+ <!--<name>entrySearchFilter</name>-->
+ <!--<value></value>-->
+ <!--</option>-->
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</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://dev39.qa.atl.jboss.com:2389</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
16 years, 6 months
JBoss Identity SVN: r961 - idm/trunk/idm-testsuite/src/test/resources/datasources.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-11-16 12:00:28 -0500 (Mon, 16 Nov 2009)
New Revision: 961
Modified:
idm/trunk/idm-testsuite/src/test/resources/datasources/directories.xml
Log:
- add OpenDS 1.2 and 2.0 to the testsuite
Modified: idm/trunk/idm-testsuite/src/test/resources/datasources/directories.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/datasources/directories.xml 2009-11-16 16:48:56 UTC (rev 960)
+++ idm/trunk/idm-testsuite/src/test/resources/datasources/directories.xml 2009-11-16 17:00:28 UTC (rev 961)
@@ -38,6 +38,36 @@
<cleanup-dn>o=jbid,dc=example,dc=com</cleanup-dn>
</directory>
<directory>
+ <directory-name>OpenDS-2-0</directory-name>
+ <description>ldap://dev39.qa.atl.jboss.com:2389</description>
+ <!--identity configuration file-->
+ <config-file>test-identity-config.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>2389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+ <!--ldif from which LDAP will be populated before each test-->
+ <populate-ldif>ldap/initial-empty-opends.ldif</populate-ldif>
+ <!--DN that will be removed to perform cleanup after each test-->
+ <cleanup-dn>o=jbid,dc=example,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>OpenDS-1-2</directory-name>
+ <description>ldap://dev39.qa.atl.jboss.com:3389</description>
+ <!--identity configuration file-->
+ <config-file>test-identity-config.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>3389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+ <!--ldif from which LDAP will be populated before each test-->
+ <populate-ldif>ldap/initial-empty-opends.ldif</populate-ldif>
+ <!--DN that will be removed to perform cleanup after each test-->
+ <cleanup-dn>o=jbid,dc=example,dc=com</cleanup-dn>
+ </directory>
+ <directory>
<directory-name>SunDS</directory-name>
<description>ldap://dev39.qa.atl.jboss.com:1389</description>
<!--identity configuration file-->
16 years, 6 months
JBoss Identity SVN: r960 - identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp.
by jboss-identity-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2009-11-16 11:48:56 -0500 (Mon, 16 Nov 2009)
New Revision: 960
Modified:
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostSignatureFormAuthenticator.java
Log:
unnecessary method
Modified: identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostSignatureFormAuthenticator.java
===================================================================
--- identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostSignatureFormAuthenticator.java 2009-11-16 16:47:11 UTC (rev 959)
+++ identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostSignatureFormAuthenticator.java 2009-11-16 16:48:56 UTC (rev 960)
@@ -27,7 +27,6 @@
import java.net.URL;
import java.security.GeneralSecurityException;
import java.security.PublicKey;
-import java.util.Map;
import javax.xml.bind.JAXBException;
import javax.xml.crypto.MarshalException;
@@ -38,8 +37,6 @@
import org.apache.log4j.Logger;
import org.jboss.identity.federation.api.saml.v2.request.SAML2Request;
import org.jboss.identity.federation.core.config.KeyProviderType;
-import org.jboss.identity.federation.core.exceptions.ConfigurationException;
-import org.jboss.identity.federation.core.exceptions.ProcessingException;
import org.jboss.identity.federation.core.interfaces.TrustKeyConfigurationException;
import org.jboss.identity.federation.core.interfaces.TrustKeyManager;
import org.jboss.identity.federation.core.interfaces.TrustKeyProcessingException;
@@ -49,7 +46,6 @@
import org.jboss.identity.federation.core.util.XMLSignatureUtil;
import org.jboss.identity.federation.saml.v2.protocol.AuthnRequestType;
import org.jboss.identity.federation.saml.v2.protocol.ResponseType;
-import org.jboss.identity.federation.web.constants.GeneralConstants;
import org.jboss.identity.federation.web.util.PostBindingUtil;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
@@ -167,13 +163,4 @@
}
return false;
}
-
- protected void addAdditionalChainConfigOptions(Map<String, Object> chainConfigOptions)
- throws ConfigurationException, ProcessingException
- {
- if(this.keyManager != null)
- {
- chainConfigOptions.put(GeneralConstants.KEYPAIR, keyManager.getSigningKeyPair());
- }
- }
}
\ No newline at end of file
16 years, 6 months
JBoss Identity SVN: r959 - in identity-federation/trunk: jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp and 6 other directories.
by jboss-identity-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2009-11-16 11:47:11 -0500 (Mon, 16 Nov 2009)
New Revision: 959
Added:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/util/CoreConfigUtil.java
Modified:
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/idp/IDPRedirectWithSignatureValve.java
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/idp/IDPWebBrowserSSOValve.java
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostSignatureFormAuthenticator.java
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectSignatureFormAuthenticator.java
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/impl/DefaultSAML2HandlerChain.java
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/plugins/saml/SAML20TokenProvider.java
identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/handlers/saml2/SAML2SignatureValidationHandler.java
identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/SAMLHandlerChainProcessor.java
identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderBaseProcessor.java
identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderSAMLRequestProcessor.java
identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderSAMLResponseProcessor.java
identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/util/IDPWebRequestUtil.java
Log:
handler signatures
Modified: identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/idp/IDPRedirectWithSignatureValve.java
===================================================================
--- identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/idp/IDPRedirectWithSignatureValve.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/idp/IDPRedirectWithSignatureValve.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -51,6 +51,7 @@
import org.jboss.identity.federation.core.interfaces.TrustKeyProcessingException;
import org.jboss.identity.federation.core.saml.v2.constants.JBossSAMLURIConstants;
import org.jboss.identity.federation.core.saml.v2.util.DocumentUtil;
+import org.jboss.identity.federation.core.util.CoreConfigUtil;
import org.jboss.identity.federation.core.util.XMLEncryptionUtil;
import org.jboss.identity.federation.saml.v2.assertion.EncryptedElementType;
import org.jboss.identity.federation.saml.v2.protocol.ResponseType;
@@ -98,14 +99,8 @@
super.start();
KeyProviderType keyProvider = this.idpConfiguration.getKeyProvider();
try
- {
- ClassLoader tcl = SecurityActions.getContextClassLoader();
- String keyManagerClassName = keyProvider.getClassName();
- if(keyManagerClassName == null)
- throw new RuntimeException("KeyManager class name is null");
-
- Class<?> clazz = tcl.loadClass(keyManagerClassName);
- this.keyManager = (TrustKeyManager) clazz.newInstance();
+ {
+ this.keyManager = CoreConfigUtil.getTrustKeyManager(keyProvider);
keyManager.setAuthProperties(keyProvider.getAuth());
keyManager.setValidatingAlias(keyProvider.getValidatingAlias());
}
Modified: identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/idp/IDPWebBrowserSSOValve.java
===================================================================
--- identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/idp/IDPWebBrowserSSOValve.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/idp/IDPWebBrowserSSOValve.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -35,6 +35,8 @@
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
@@ -79,6 +81,7 @@
import org.jboss.identity.federation.core.saml.v2.interfaces.SAML2HandlerResponse;
import org.jboss.identity.federation.core.saml.v2.interfaces.SAML2Handler.HANDLER_TYPE;
import org.jboss.identity.federation.core.saml.v2.util.HandlerUtil;
+import org.jboss.identity.federation.core.util.CoreConfigUtil;
import org.jboss.identity.federation.core.util.StringUtil;
import org.jboss.identity.federation.saml.v2.SAML2Object;
import org.jboss.identity.federation.saml.v2.protocol.RequestAbstractType;
@@ -128,8 +131,13 @@
private Context context = null;
- private transient String samlHandlerChainClass = null;
+ private transient String samlHandlerChainClass = null;
+ /**
+ * A Lock for Handler operations in the chain
+ */
+ private Lock chainLock = new ReentrantLock();
+
//Set a list of attributes we are interested in separated by comma
public void setAttributeList(String attribList)
{
@@ -349,6 +357,12 @@
requestOptions.put(GeneralConstants.ASSERTIONS_VALIDITY, this.assertionValidity);
requestOptions.put(GeneralConstants.CONFIGURATION, this.idpConfiguration);
+ if(this.keyManager != null)
+ {
+ PublicKey validatingKey = CoreConfigUtil.getValidatingKey(keyManager, request.getRemoteAddr());
+ requestOptions.put(GeneralConstants.SENDER_PUBLIC_KEY, validatingKey);
+ }
+
Map<String,Object> attribs = this.attribManager.getAttributes(userPrincipal, attributeKeys);
requestOptions.put(GeneralConstants.ATTRIBUTES, attribs);
@@ -369,10 +383,18 @@
if(handlers != null)
{
- for(SAML2Handler handler: handlers)
+ try
{
- handler.handleRequestType(saml2HandlerRequest, saml2HandlerResponse);
- willSendRequest = saml2HandlerResponse.getSendRequest();
+ chainLock.lock();
+ for(SAML2Handler handler: handlers)
+ {
+ handler.handleRequestType(saml2HandlerRequest, saml2HandlerResponse);
+ willSendRequest = saml2HandlerResponse.getSendRequest();
+ }
+ }
+ finally
+ {
+ chainLock.unlock();
}
}
}
@@ -502,11 +524,19 @@
if(handlers != null)
{
- for(SAML2Handler handler: handlers)
+ try
{
- handler.reset();
- handler.handleStatusResponseType(saml2HandlerRequest, saml2HandlerResponse);
- willSendRequest = saml2HandlerResponse.getSendRequest();
+ chainLock.lock();
+ for (SAML2Handler handler : handlers)
+ {
+ handler.reset();
+ handler.handleStatusResponseType(saml2HandlerRequest, saml2HandlerResponse);
+ willSendRequest = saml2HandlerResponse.getSendRequest();
+ }
+ }
+ finally
+ {
+ chainLock.unlock();
}
}
}
@@ -790,23 +820,7 @@
ClassLoader tcl = SecurityActions.getContextClassLoader();
AttributeManager delegate = (AttributeManager) tcl.loadClass(attributeManager).newInstance();
this.attribManager.setDelegate(delegate);
- }
- //Get the handlers
- String handlerConfigFileName = GeneralConstants.HANDLER_CONFIG_FILE_LOCATION;
- handlers = ConfigurationUtil.getHandlers(context.getServletContext().getResourceAsStream(handlerConfigFileName));
- chain.addAll(HandlerUtil.getHandlers(handlers));
-
- Map<String, Object> chainConfigOptions = new HashMap<String, Object>();
- chainConfigOptions.put(GeneralConstants.ROLE_GENERATOR, roleGenerator);
- chainConfigOptions.put(GeneralConstants.CONFIGURATION, idpConfiguration);
-
- SAML2HandlerChainConfig handlerChainConfig = new DefaultSAML2HandlerChainConfig(chainConfigOptions);
- Set<SAML2Handler> samlHandlers = chain.handlers();
-
- for(SAML2Handler handler: samlHandlers)
- {
- handler.initChainConfig(handlerChainConfig);
- }
+ }
}
catch (Exception e)
{
@@ -821,13 +835,7 @@
try
{
- ClassLoader tcl = SecurityActions.getContextClassLoader();
- String keyManagerClassName = keyProvider.getClassName();
- if(keyManagerClassName == null)
- throw new RuntimeException("KeyManager class name is null");
-
- Class<?> clazz = tcl.loadClass(keyManagerClassName);
- this.keyManager = (TrustKeyManager) clazz.newInstance();
+ this.keyManager = CoreConfigUtil.getTrustKeyManager(keyProvider);
keyManager.setAuthProperties(keyProvider.getAuth());
keyManager.setValidatingAlias(keyProvider.getValidatingAlias());
}
@@ -839,6 +847,33 @@
if(trace) log.trace("Key Provider=" + keyProvider.getClassName());
}
+ try
+ {
+ //Get the handlers
+ String handlerConfigFileName = GeneralConstants.HANDLER_CONFIG_FILE_LOCATION;
+ handlers = ConfigurationUtil.getHandlers(context.getServletContext().getResourceAsStream(handlerConfigFileName));
+ chain.addAll(HandlerUtil.getHandlers(handlers));
+
+ Map<String, Object> chainConfigOptions = new HashMap<String, Object>();
+ chainConfigOptions.put(GeneralConstants.ROLE_GENERATOR, roleGenerator);
+ chainConfigOptions.put(GeneralConstants.CONFIGURATION, idpConfiguration);
+ if(this.keyManager != null)
+ chainConfigOptions.put(GeneralConstants.KEYPAIR, keyManager.getSigningKeyPair());
+
+ SAML2HandlerChainConfig handlerChainConfig = new DefaultSAML2HandlerChainConfig(chainConfigOptions);
+ Set<SAML2Handler> samlHandlers = chain.handlers();
+
+ for(SAML2Handler handler: samlHandlers)
+ {
+ handler.initChainConfig(handlerChainConfig);
+ }
+ }
+ catch(Exception e)
+ {
+ log.error("Exception dealing with handler configuration:",e);
+ throw new LifecycleException(e.getLocalizedMessage());
+ }
+
//Add some keys to the attibutes
String[] ak = new String[] {"mail","cn","commonname","givenname",
"surname","employeeType",
Modified: identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java
===================================================================
--- identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/BaseFormAuthenticator.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -27,6 +27,8 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
import javax.servlet.ServletContext;
@@ -35,6 +37,7 @@
import org.apache.catalina.connector.Request;
import org.apache.log4j.Logger;
import org.jboss.identity.federation.core.config.SPType;
+import org.jboss.identity.federation.core.exceptions.ConfigurationException;
import org.jboss.identity.federation.core.exceptions.ProcessingException;
import org.jboss.identity.federation.core.handler.config.Handlers;
import org.jboss.identity.federation.core.saml.v2.factories.SAML2HandlerChainFactory;
@@ -67,6 +70,14 @@
protected transient SAML2HandlerChain chain = null;
protected transient String samlHandlerChainClass = null;
+
+ protected Map<String, Object> chainConfigOptions = new HashMap<String, Object>();
+
+
+ /**
+ * A Lock for Handler operations in the chain
+ */
+ protected Lock chainLock = new ReentrantLock();
public BaseFormAuthenticator()
{
@@ -155,21 +166,32 @@
handlers = ConfigurationUtil.getHandlers(servletContext.getResourceAsStream(handlerConfigFileName));
chain.addAll(HandlerUtil.getHandlers(handlers));
- Map<String, Object> chainConfigOptions = new HashMap<String, Object>();
- chainConfigOptions.put(GeneralConstants.CONFIGURATION, spConfiguration);
- chainConfigOptions.put(GeneralConstants.ROLE_VALIDATOR_IGNORE, "false"); //No validator as tomcat realm does validn
-
- SAML2HandlerChainConfig handlerChainConfig = new DefaultSAML2HandlerChainConfig(chainConfigOptions);
- Set<SAML2Handler> samlHandlers = chain.handlers();
-
- for(SAML2Handler handler: samlHandlers)
- {
- handler.initChainConfig(handlerChainConfig);
- }
+ this.populateChainConfig();
+ this.initializeHandlerChain();
}
catch(Exception e)
{
throw new RuntimeException(e);
}
+ }
+
+ protected void initializeHandlerChain()
+ throws ConfigurationException, ProcessingException
+ {
+ populateChainConfig();
+ SAML2HandlerChainConfig handlerChainConfig = new DefaultSAML2HandlerChainConfig(chainConfigOptions);
+ Set<SAML2Handler> samlHandlers = chain.handlers();
+
+ for(SAML2Handler handler: samlHandlers)
+ {
+ handler.initChainConfig(handlerChainConfig);
+ }
}
+
+ protected void populateChainConfig()
+ throws ConfigurationException, ProcessingException
+ {
+ chainConfigOptions.put(GeneralConstants.CONFIGURATION, spConfiguration);
+ chainConfigOptions.put(GeneralConstants.ROLE_VALIDATOR_IGNORE, "false"); //No validator as tomcat realm does validn
+ }
}
\ No newline at end of file
Modified: identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
===================================================================
--- identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -118,7 +118,7 @@
{
ServiceProviderBaseProcessor baseProcessor = new ServiceProviderBaseProcessor(true, serviceURL);
- saml2HandlerResponse = baseProcessor.process(httpContext, handlers);
+ saml2HandlerResponse = baseProcessor.process(httpContext, handlers, chainLock);
saml2HandlerResponse.setDestination(identityURL);
}
catch(ProcessingException pe)
@@ -185,7 +185,7 @@
ServiceProviderSAMLResponseProcessor responseProcessor =
new ServiceProviderSAMLResponseProcessor(true, serviceURL);
SAML2HandlerResponse saml2HandlerResponse =
- responseProcessor.process(samlResponse, httpContext, handlers);
+ responseProcessor.process(samlResponse, httpContext, handlers, chainLock);
Document samlResponseDocument = saml2HandlerResponse.getResultingDocument();
relayState = saml2HandlerResponse.getRelayState();
@@ -262,7 +262,7 @@
{
ServiceProviderSAMLRequestProcessor requestProcessor =
new ServiceProviderSAMLRequestProcessor(true, this.serviceURL);
- boolean result = requestProcessor.process(samlRequest, httpContext, handlers);
+ boolean result = requestProcessor.process(samlRequest, httpContext, handlers, chainLock);
if(result)
return result;
Modified: identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostSignatureFormAuthenticator.java
===================================================================
--- identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostSignatureFormAuthenticator.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPPostSignatureFormAuthenticator.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -27,6 +27,7 @@
import java.net.URL;
import java.security.GeneralSecurityException;
import java.security.PublicKey;
+import java.util.Map;
import javax.xml.bind.JAXBException;
import javax.xml.crypto.MarshalException;
@@ -37,6 +38,8 @@
import org.apache.log4j.Logger;
import org.jboss.identity.federation.api.saml.v2.request.SAML2Request;
import org.jboss.identity.federation.core.config.KeyProviderType;
+import org.jboss.identity.federation.core.exceptions.ConfigurationException;
+import org.jboss.identity.federation.core.exceptions.ProcessingException;
import org.jboss.identity.federation.core.interfaces.TrustKeyConfigurationException;
import org.jboss.identity.federation.core.interfaces.TrustKeyManager;
import org.jboss.identity.federation.core.interfaces.TrustKeyProcessingException;
@@ -46,6 +49,7 @@
import org.jboss.identity.federation.core.util.XMLSignatureUtil;
import org.jboss.identity.federation.saml.v2.protocol.AuthnRequestType;
import org.jboss.identity.federation.saml.v2.protocol.ResponseType;
+import org.jboss.identity.federation.web.constants.GeneralConstants;
import org.jboss.identity.federation.web.util.PostBindingUtil;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
@@ -163,4 +167,13 @@
}
return false;
}
+
+ protected void addAdditionalChainConfigOptions(Map<String, Object> chainConfigOptions)
+ throws ConfigurationException, ProcessingException
+ {
+ if(this.keyManager != null)
+ {
+ chainConfigOptions.put(GeneralConstants.KEYPAIR, keyManager.getSigningKeyPair());
+ }
+ }
}
\ No newline at end of file
Modified: identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java
===================================================================
--- identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectFormAuthenticator.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -123,7 +123,7 @@
{
ServiceProviderBaseProcessor baseProcessor = new ServiceProviderBaseProcessor(false, serviceURL);
- saml2HandlerResponse = baseProcessor.process(httpContext, handlers);
+ saml2HandlerResponse = baseProcessor.process(httpContext, handlers, chainLock);
saml2HandlerResponse.setDestination(identityURL);
}
catch(ProcessingException pe)
@@ -153,6 +153,8 @@
try
{
String samlMsg = DocumentUtil.getDocumentAsString(samlResponseDocument);
+ if(trace)
+ log.trace("SAML Document=" + samlMsg);
String base64Request = RedirectBindingUtil.deflateBase64URLEncode(samlMsg.getBytes("UTF-8"));
String destinationURL = destination +
@@ -191,7 +193,7 @@
ServiceProviderSAMLResponseProcessor responseProcessor =
new ServiceProviderSAMLResponseProcessor(false, serviceURL);
SAML2HandlerResponse saml2HandlerResponse =
- responseProcessor.process(samlResponse, httpContext, handlers);
+ responseProcessor.process(samlResponse, httpContext, handlers, chainLock);
Document samlResponseDocument = saml2HandlerResponse.getResultingDocument();
relayState = saml2HandlerResponse.getRelayState();
@@ -260,7 +262,7 @@
{
if(trace)
log.trace("Server Exception:", e);
- throw new IOException("Server Exception");
+ throw new IOException("Server Exception:"+ e.getLocalizedMessage());
}
}
@@ -272,7 +274,7 @@
{
ServiceProviderSAMLRequestProcessor requestProcessor =
new ServiceProviderSAMLRequestProcessor(false, this.serviceURL);
- boolean result = requestProcessor.process(samlRequest, httpContext, handlers);
+ boolean result = requestProcessor.process(samlRequest, httpContext, handlers, chainLock);
if(result)
return result;
Modified: identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectSignatureFormAuthenticator.java
===================================================================
--- identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectSignatureFormAuthenticator.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/tomcat/sp/SPRedirectSignatureFormAuthenticator.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -38,6 +38,7 @@
import org.jboss.identity.federation.core.config.KeyProviderType;
import org.jboss.identity.federation.core.exceptions.ConfigurationException;
import org.jboss.identity.federation.core.exceptions.ParsingException;
+import org.jboss.identity.federation.core.exceptions.ProcessingException;
import org.jboss.identity.federation.core.interfaces.TrustKeyConfigurationException;
import org.jboss.identity.federation.core.interfaces.TrustKeyManager;
import org.jboss.identity.federation.core.interfaces.TrustKeyProcessingException;
@@ -95,6 +96,18 @@
throw new LifecycleException(e.getLocalizedMessage());
}
if(trace) log.trace("Key Provider=" + keyProvider.getClassName());
+
+ //Initialize the handler chain again, mainly for the signing pair
+ try
+ {
+ populateChainConfig();
+ super.initializeHandlerChain();
+ }
+ catch (Exception e)
+ {
+ log.error("Exception reading configuration:",e);
+ throw new LifecycleException(e.getLocalizedMessage());
+ }
}
protected boolean validate(Request request) throws IOException, GeneralSecurityException
@@ -184,5 +197,18 @@
{
throw new GeneralSecurityException(e);
}
- }
+ }
+
+ @Override
+ protected void populateChainConfig()
+ throws ConfigurationException, ProcessingException
+ {
+ super.populateChainConfig();
+ if(this.keyManager != null)
+ {
+ if(trace)
+ log.trace("Adding Keypair to the chain config");
+ chainConfigOptions.put(GeneralConstants.KEYPAIR, keyManager.getSigningKeyPair());
+ }
+ }
}
\ No newline at end of file
Modified: identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/impl/DefaultSAML2HandlerChain.java
===================================================================
--- identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/impl/DefaultSAML2HandlerChain.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/impl/DefaultSAML2HandlerChain.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -23,7 +23,7 @@
import java.util.Collection;
import java.util.Collections;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.Set;
import org.jboss.identity.federation.core.saml.v2.interfaces.SAML2Handler;
@@ -36,7 +36,7 @@
*/
public class DefaultSAML2HandlerChain implements SAML2HandlerChain
{
- private Set<SAML2Handler> handlers = new HashSet<SAML2Handler>();
+ private Set<SAML2Handler> handlers = new LinkedHashSet<SAML2Handler>();
/**
* @see SAML2HandlerChain#add(SAML2Handler)
Added: identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/util/CoreConfigUtil.java
===================================================================
--- identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/util/CoreConfigUtil.java (rev 0)
+++ identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/util/CoreConfigUtil.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.federation.core.util;
+
+import java.security.PublicKey;
+
+import org.apache.log4j.Logger;
+import org.jboss.identity.federation.core.config.KeyProviderType;
+import org.jboss.identity.federation.core.config.ProviderType;
+import org.jboss.identity.federation.core.exceptions.ConfigurationException;
+import org.jboss.identity.federation.core.exceptions.ProcessingException;
+import org.jboss.identity.federation.core.interfaces.TrustKeyManager;
+
+/**
+ * Utility for configuration
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Nov 13, 2009
+ */
+public class CoreConfigUtil
+{
+ private static Logger log = Logger.getLogger(CoreConfigUtil.class);
+
+ /**
+ * Given either the IDP Configuration or the SP Configuration, derive
+ * the TrustKeyManager
+ * @param idpOrSPConfiguration
+ * @return
+ */
+ public static TrustKeyManager getTrustKeyManager(ProviderType idpOrSPConfiguration)
+ {
+ KeyProviderType keyProvider = idpOrSPConfiguration.getKeyProvider();
+ return getTrustKeyManager(keyProvider);
+ }
+
+ /**
+ * Once the {@code KeyProviderType} is derived, get
+ * the {@code TrustKeyManager}
+ * @param keyProvider
+ * @return
+ */
+ public static TrustKeyManager getTrustKeyManager(KeyProviderType keyProvider)
+ {
+ TrustKeyManager trustKeyManager = null;
+ try
+ {
+ ClassLoader tcl = SecurityActions.getContextClassLoader();
+ String keyManagerClassName = keyProvider.getClassName();
+ if(keyManagerClassName == null)
+ throw new RuntimeException("KeyManager class name is null");
+
+ Class<?> clazz = tcl.loadClass(keyManagerClassName);
+ trustKeyManager = (TrustKeyManager) clazz.newInstance();
+ }
+ catch(Exception e)
+ {
+ log.error("Exception in getting TrustKeyManager:",e);
+ }
+ return trustKeyManager;
+ }
+
+ /**
+ * Get the validating key
+ * @param idpSpConfiguration
+ * @param domain
+ * @return
+ * @throws ConfigurationException
+ * @throws ProcessingException
+ */
+ public static PublicKey getValidatingKey(ProviderType idpSpConfiguration, String domain)
+ throws ConfigurationException, ProcessingException
+ {
+ TrustKeyManager trustKeyManager = getTrustKeyManager(idpSpConfiguration);
+
+ return getValidatingKey(trustKeyManager, domain);
+ }
+
+ /**
+ * Get the validating key given the trust key manager
+ * @param trustKeyManager
+ * @param domain
+ * @return
+ * @throws ConfigurationException
+ * @throws ProcessingException
+ */
+ public static PublicKey getValidatingKey(TrustKeyManager trustKeyManager,
+ String domain)
+ throws ConfigurationException, ProcessingException
+ {
+ if(trustKeyManager == null)
+ throw new IllegalArgumentException("Trust Key Manager is null");
+
+ return trustKeyManager.getValidatingKey(domain);
+ }
+}
\ No newline at end of file
Modified: identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/plugins/saml/SAML20TokenProvider.java
===================================================================
--- identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/plugins/saml/SAML20TokenProvider.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/wstrust/plugins/saml/SAML20TokenProvider.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -71,6 +71,7 @@
private static Logger logger = Logger.getLogger(SAML20TokenProvider.class);
+ @SuppressWarnings("unused")
private Map<String, String> properties;
/*
Modified: identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/handlers/saml2/SAML2SignatureValidationHandler.java
===================================================================
--- identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/handlers/saml2/SAML2SignatureValidationHandler.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/handlers/saml2/SAML2SignatureValidationHandler.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -24,9 +24,11 @@
import java.security.PublicKey;
import org.apache.log4j.Logger;
+import org.jboss.identity.federation.core.exceptions.ConfigurationException;
import org.jboss.identity.federation.core.exceptions.ProcessingException;
import org.jboss.identity.federation.core.saml.v2.interfaces.SAML2HandlerRequest;
import org.jboss.identity.federation.core.saml.v2.interfaces.SAML2HandlerResponse;
+import org.jboss.identity.federation.core.saml.v2.util.DocumentUtil;
import org.jboss.identity.federation.core.util.XMLSignatureUtil;
import org.jboss.identity.federation.web.constants.GeneralConstants;
import org.w3c.dom.Document;
@@ -38,6 +40,7 @@
public class SAML2SignatureValidationHandler extends BaseSAML2Handler
{
private static Logger log = Logger.getLogger(SAML2SignatureValidationHandler.class);
+ private boolean trace = log.isTraceEnabled();
/**
* @see {@code SAML2Handler#handleRequestType(SAML2HandlerRequest, SAML2HandlerResponse)}
@@ -45,6 +48,16 @@
public void handleRequestType(SAML2HandlerRequest request, SAML2HandlerResponse response) throws ProcessingException
{
Document signedDocument = request.getRequestDocument();
+ if(trace)
+ {
+ try
+ {
+ log.trace("Will validate :" + DocumentUtil.getDocumentAsString(signedDocument));
+ }
+ catch (ConfigurationException e)
+ {
+ }
+ }
PublicKey publicKey = (PublicKey) request.getOptions().get(GeneralConstants.SENDER_PUBLIC_KEY);
this.validateSender(signedDocument, publicKey);
}
Modified: identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/SAMLHandlerChainProcessor.java
===================================================================
--- identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/SAMLHandlerChainProcessor.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/SAMLHandlerChainProcessor.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
+import java.util.concurrent.locks.Lock;
import org.jboss.identity.federation.core.exceptions.ProcessingException;
import org.jboss.identity.federation.core.saml.v2.interfaces.SAML2Handler;
@@ -49,25 +50,34 @@
public void callHandlerChain(SAML2Object samlObject,
SAML2HandlerRequest saml2HandlerRequest,
SAML2HandlerResponse saml2HandlerResponse,
- HTTPContext httpContext)
+ HTTPContext httpContext,
+ Lock chainLock)
throws ProcessingException, IOException
{
- //Deal with handler chains
- for(SAML2Handler handler : handlers)
+ try
{
- if(saml2HandlerResponse.isInError())
+ chainLock.lock();
+ //Deal with handler chains
+ for (SAML2Handler handler : handlers)
{
- httpContext.getResponse().sendError(saml2HandlerResponse.getErrorCode());
- break;
+ if (saml2HandlerResponse.isInError())
+ {
+ httpContext.getResponse().sendError(saml2HandlerResponse.getErrorCode());
+ break;
+ }
+ if (samlObject instanceof RequestAbstractType)
+ {
+ handler.handleRequestType(saml2HandlerRequest, saml2HandlerResponse);
+ }
+ else
+ {
+ handler.handleStatusResponseType(saml2HandlerRequest, saml2HandlerResponse);
+ }
}
- if(samlObject instanceof RequestAbstractType)
- {
- handler.handleRequestType(saml2HandlerRequest, saml2HandlerResponse);
- }
- else
- {
- handler.handleStatusResponseType(saml2HandlerRequest, saml2HandlerResponse);
- }
+ }
+ finally
+ {
+ chainLock.unlock();
}
}
}
\ No newline at end of file
Modified: identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderBaseProcessor.java
===================================================================
--- identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderBaseProcessor.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderBaseProcessor.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.util.Set;
+import java.util.concurrent.locks.Lock;
import javax.servlet.http.HttpServletRequest;
@@ -45,12 +46,14 @@
import org.jboss.identity.federation.web.core.HTTPContext;
/**
+ * A processor util at the SP
* @author Anil.Saldhana(a)redhat.com
* @since Oct 27, 2009
*/
public class ServiceProviderBaseProcessor
{
protected static Logger log = Logger.getLogger(ServiceProviderBaseProcessor.class);
+ private boolean trace = log.isTraceEnabled();
protected boolean postBinding;
protected String serviceURL;
@@ -67,7 +70,8 @@
}
public SAML2HandlerResponse process(HTTPContext httpContext,
- Set<SAML2Handler> handlers)
+ Set<SAML2Handler> handlers,
+ Lock chainLock)
throws ProcessingException, IOException, ParsingException, ConfigurationException
{
//Neither saml request nor response from IDP
@@ -82,6 +86,11 @@
//Reset the state
try
{
+ if(trace)
+ log.trace("Handlers are : " + handlers);
+
+ chainLock.lock();
+
for(SAML2Handler handler: handlers)
{
handler.reset();
@@ -102,7 +111,11 @@
{
log.error("Processing Exception:", pe);
throw new RuntimeException(pe);
- }
+ }
+ finally
+ {
+ chainLock.unlock();
+ }
return saml2HandlerResponse;
}
@@ -123,6 +136,5 @@
HttpServletRequest request = httpContext.getRequest();
String gloStr = request.getParameter(GeneralConstants.GLOBAL_LOGOUT);
return isNotNull(gloStr) && "true".equalsIgnoreCase(gloStr);
- }
-
+ }
}
\ No newline at end of file
Modified: identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderSAMLRequestProcessor.java
===================================================================
--- identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderSAMLRequestProcessor.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderSAMLRequestProcessor.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -26,6 +26,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Set;
+import java.util.concurrent.locks.Lock;
import javax.servlet.http.HttpServletResponse;
@@ -54,8 +55,7 @@
* @since Oct 27, 2009
*/
public class ServiceProviderSAMLRequestProcessor extends ServiceProviderBaseProcessor
-{
-
+{
/**
* Construct
* @param postBinding Whether it is the Post Binding
@@ -66,8 +66,20 @@
super(postBinding,serviceURL);
}
+ /**
+ * Process the message
+ * @param samlRequest
+ * @param httpContext
+ * @param handlers
+ * @param chainLock A Lock on the chain of handlers that needs to be used for locking
+ * @return
+ * @throws ProcessingException
+ * @throws IOException
+ * @throws ParsingException
+ * @throws ConfigurationException
+ */
public boolean process(String samlRequest, HTTPContext httpContext,
- Set<SAML2Handler> handlers)
+ Set<SAML2Handler> handlers, Lock chainLock)
throws ProcessingException, IOException, ParsingException, ConfigurationException
{
SAML2Request saml2Request = new SAML2Request();
@@ -96,7 +108,7 @@
SAMLHandlerChainProcessor chainProcessor = new SAMLHandlerChainProcessor(handlers);
chainProcessor.callHandlerChain(samlObject, saml2HandlerRequest,
- saml2HandlerResponse, httpContext);
+ saml2HandlerResponse, httpContext, chainLock);
Document samlResponseDocument = saml2HandlerResponse.getResultingDocument();
String relayState = saml2HandlerResponse.getRelayState();
Modified: identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderSAMLResponseProcessor.java
===================================================================
--- identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderSAMLResponseProcessor.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/process/ServiceProviderSAMLResponseProcessor.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Set;
+import java.util.concurrent.locks.Lock;
import org.jboss.identity.federation.api.saml.v2.response.SAML2Response;
import org.jboss.identity.federation.core.exceptions.ConfigurationException;
@@ -57,8 +58,21 @@
super(postBinding, serviceURL);
}
+ /**
+ * Process the message
+ * @param samlResponse
+ * @param httpContext
+ * @param handlers
+ * @param chainLock a lock that needs to be used to process the chain of handlers
+ * @return
+ * @throws ProcessingException
+ * @throws IOException
+ * @throws ParsingException
+ * @throws ConfigurationException
+ */
public SAML2HandlerResponse process(String samlResponse, HTTPContext httpContext,
- Set<SAML2Handler> handlers)
+ Set<SAML2Handler> handlers,
+ Lock chainLock)
throws ProcessingException, IOException, ParsingException, ConfigurationException
{
SAML2Response saml2Response = new SAML2Response();
@@ -90,7 +104,7 @@
SAMLHandlerChainProcessor chainProcessor = new SAMLHandlerChainProcessor(handlers);
chainProcessor.callHandlerChain(samlObject, saml2HandlerRequest,
- saml2HandlerResponse, httpContext);
+ saml2HandlerResponse, httpContext, chainLock);
return saml2HandlerResponse;
}
Modified: identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/util/IDPWebRequestUtil.java
===================================================================
--- identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/util/IDPWebRequestUtil.java 2009-11-16 14:04:51 UTC (rev 958)
+++ identity-federation/trunk/jboss-identity-web/src/main/java/org/jboss/identity/federation/web/util/IDPWebRequestUtil.java 2009-11-16 16:47:11 UTC (rev 959)
@@ -377,6 +377,7 @@
{
try
{
+ sb.append("?");
sb.append(RedirectBindingSignatureUtil.getSAMLResponseURLWithSignature(urlEncodedResponse,
urlEncodedRelayState, keyManager.getSigningKey()));
}
16 years, 6 months
JBoss Identity SVN: r958 - idm/trunk/idm-hibernate/src/main/resources/mappings.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-11-16 09:04:51 -0500 (Mon, 16 Nov 2009)
New Revision: 958
Modified:
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredential.hbm.xml
Log:
- fix
Modified: idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-11-16 13:05:06 UTC (rev 957)
+++ idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-11-16 14:04:51 UTC (rev 958)
@@ -46,7 +46,7 @@
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
not-null="false"
column="BIN_VALUE_ID"
- unique="true"
+ unique="false"
lazy="proxy"
access="field"
fetch="select"
Modified: idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredential.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredential.hbm.xml 2009-11-16 13:05:06 UTC (rev 957)
+++ idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredential.hbm.xml 2009-11-16 14:04:51 UTC (rev 958)
@@ -16,7 +16,7 @@
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
not-null="false"
column="BIN_VALUE_ID"
- unique="true"
+ unique="false"
lazy="proxy"
access="field"
fetch="select"
16 years, 6 months
JBoss Identity SVN: r957 - in idm/trunk: idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate and 1 other directory.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-11-16 08:05:06 -0500 (Mon, 16 Nov 2009)
New Revision: 957
Modified:
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java
Log:
- more for sybase
Modified: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-11-16 13:05:06 UTC (rev 957)
@@ -46,7 +46,7 @@
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
not-null="false"
column="BIN_VALUE_ID"
- unique="true"
+ unique="false"
lazy="proxy"
access="field"
fetch="select"
Modified: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml 2009-11-16 13:05:06 UTC (rev 957)
@@ -16,7 +16,7 @@
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
not-null="false"
column="BIN_VALUE_ID"
- unique="true"
+ unique="false"
lazy="proxy"
access="field"
fetch="select"
Modified: idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java
===================================================================
--- idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java 2009-11-16 11:04:22 UTC (rev 956)
+++ idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java 2009-11-16 13:05:06 UTC (rev 957)
@@ -83,6 +83,7 @@
attr.setTextValues(values1);
user1.getAttributes().add(attr);
+
commit();
begin();
@@ -101,6 +102,21 @@
attr.setBinaryValue(new HibernateIdentityObjectAttributeBinaryValue(picture));
user1.addAttribute(attr);
+ values1 = new HashSet<String>();
+ values1.add("Val1");
+
+ attr = new HibernateIdentityObjectAttribute(user1, "simple3", HibernateIdentityObjectAttribute.TYPE_TEXT);
+ attr.setTextValues(values1);
+ user1.getAttributes().add(attr);
+
+ values1 = new HashSet<String>();
+ values1.add("Val8");
+ values1.add("Val15");
+
+ attr = new HibernateIdentityObjectAttribute(user1, "simple4", HibernateIdentityObjectAttribute.TYPE_TEXT);
+ attr.setTextValues(values1);
+ user1.getAttributes().add(attr);
+
commit();
begin();
@@ -115,7 +131,7 @@
random.nextBytes(picture);
- attr = new HibernateIdentityObjectAttribute(user1, "simple3", HibernateIdentityObjectAttribute.TYPE_BINARY);
+ attr = new HibernateIdentityObjectAttribute(user1, "simple5", HibernateIdentityObjectAttribute.TYPE_BINARY);
attr.setBinaryValue(new HibernateIdentityObjectAttributeBinaryValue(picture));
user1.getAttributes().add(attr);
@@ -127,15 +143,25 @@
user1 = (HibernateIdentityObject)session.get(HibernateIdentityObject.class, new Long(user1.getId()));
- assertEquals(3, user1.getAttributes().size());
+ assertEquals(5, user1.getAttributes().size());
int binaryCount = ((Integer)session.createCriteria(HibernateIdentityObjectAttributeBinaryValue.class).
setProjection(Projections.rowCount()).uniqueResult()).intValue();
assertEquals(2,binaryCount);
+ int attrCount = ((Integer)session.createCriteria(HibernateIdentityObjectAttribute.class).
+ setProjection(Projections.rowCount()).uniqueResult()).intValue();
+
+ assertEquals(5,attrCount);
+
session.delete(user1);
+ attrCount = ((Integer)session.createCriteria(HibernateIdentityObjectAttribute.class).
+ setProjection(Projections.rowCount()).uniqueResult()).intValue();
+
+ assertEquals(0,attrCount);
+
binaryCount = ((Integer)session.createCriteria(HibernateIdentityObjectAttributeBinaryValue.class).
setProjection(Projections.rowCount()).uniqueResult()).intValue();
16 years, 6 months
JBoss Identity SVN: r956 - in idm/trunk: idm-hibernate/src/main/resources and 6 other directories.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-11-16 06:04:22 -0500 (Mon, 16 Nov 2009)
New Revision: 956
Added:
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/MaterializedBlobType.java
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectType.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateRealm.hbm.xml
idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/SimpleTestCase.java
Removed:
idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity-classes.cfg.xml
idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml
Modified:
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
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/store/hibernate/EvilBinaryTestCase.java
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad-local.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-openldapds.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-redhatds.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config-sunds.xml
idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml
Log:
another take on sybase binary mappings
Added: idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/MaterializedBlobType.java
===================================================================
--- idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/MaterializedBlobType.java (rev 0)
+++ idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/MaterializedBlobType.java 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,52 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2009, 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.model.hibernate;
+
+import org.hibernate.type.AbstractBynaryType;
+
+import java.sql.Types;
+
+public class MaterializedBlobType extends AbstractBynaryType
+{
+
+ public int sqlType() {
+ return Types.BLOB;
+ }
+
+ public String getName() {
+ return "materialized-blob";
+ }
+
+ public Class getReturnedClass() {
+ return byte[].class;
+ }
+
+ protected Object toExternalFormat(byte[] bytes) {
+ return bytes;
+ }
+
+ protected byte[] toInternalFormat(Object bytes) {
+ return ( byte[] ) bytes;
+ }
+}
Modified: idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -14,7 +14,7 @@
<property name="value"
type="org.hibernate.type.PrimitiveByteArrayBlobType"
access="field"
- lazy="true"
+ lazy="false"
not-null="true">
<column name="VALUE" length="10240000"/>
</property>
Modified: idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -14,7 +14,7 @@
<property name="value"
type="org.hibernate.type.PrimitiveByteArrayBlobType"
access="field"
- lazy="true"
+ lazy="false"
not-null="true">
<column name="VALUE" length="10240000"/>
</property>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObject.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ table="jbid_io">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <set name="attributes"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute" />
+ </set>
+ <set name="credentials"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential" />
+ </set>
+ <set name="fromRelationships"
+ inverse="true"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="FROM_IDENTITY" />
+ </key>
+ <one-to-many class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
+ </set>
+ <many-to-one name="identityType"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="IDENTITY_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_props"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <set name="toRelationships"
+ inverse="true"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="TO_IDENTITY" />
+ </key>
+ <one-to-many class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
+ </set>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"
+ table="jbid_io_attr">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ATTRIBUTE_ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="identityObject"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="join">
+ <column name="IDENTITY_OBJECT_ID" not-null="true" unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="property"
+ lazy="false">
+ <column name="NAME"
+ unique-key="id" />
+ </property>
+ <property name="type"
+ type="java.lang.String"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="ATTRIBUTE_TYPE"/>
+ </property>
+ <set name="textValues"
+ table="jbid_io_attr_text_values"
+ cascade="all, delete-orphan"
+ access="field"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="TEXT_ATTR_VALUE_ID"/>
+ <element type="string"
+ column="ATTR_VALUE"/>
+ </set>
+ <many-to-one name="binaryValue"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="true"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ table="jbid_attr_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.jboss.identity.idm.impl.model.hibernate.MaterializedBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredential.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential"
+ table="jbid_io_creden">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="binaryValue"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="true"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ <many-to-one name="identityObject"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="IDENTITY_OBJECT_ID"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_creden_props"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <property name="textValue"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="TEXT" />
+ </property>
+ <many-to-one name="type"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="CREDENTIAL_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ table="jbid_creden_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.jboss.identity.idm.impl.model.hibernate.MaterializedBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectCredentialType.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ table="jbid_io_creden_type">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationship.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"
+ table="jbid_io_rel">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="fromIdentityObject"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="FROM_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="name"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ access="field"
+ fetch="join"
+ lazy="proxy">
+ <column name="NAME"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="toIdentityObject"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="TO_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="type"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REL_TYPE"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_rel_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="true">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipName.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ table="jbid_io_rel_name">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID"/>
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_rel_name_props"
+ cascade="all, delete-orphan"
+ lazy="true"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectRelationshipType.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ table="jbid_io_rel_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectType.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectType.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateIdentityObjectType.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ table="jbid_io_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Added: idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateRealm.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateRealm.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/sybase-mappings/HibernateRealm.hbm.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"
+ table="jbid_realm">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_real_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="true">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
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-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java 2009-11-16 11:04:22 UTC (rev 956)
@@ -93,18 +93,26 @@
hibernateSupport.setConfig(hibernateSupportConfig);
hibernateSupport.setJNDIName("java:/jbossidentity/HibernateStoreSessionFactory");
+ String prefix = "mappings/";
+
+ //Sybase support hack
+ if (dataSourceName.startsWith("sybase-"))
+ {
+ prefix = "sybase-mappings/";
+ }
+
List<String> mappings = new LinkedList<String>();
- mappings.add("mappings/HibernateIdentityObject.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectAttribute.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectCredential.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectCredentialType.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectRelationship.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectRelationshipName.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectRelationshipType.hbm.xml");
- mappings.add("mappings/HibernateIdentityObjectType.hbm.xml");
- mappings.add("mappings/HibernateRealm.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObject.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectCredentialBinaryValue.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectAttributeBinaryValue.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectAttribute.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectCredential.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectCredentialType.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectRelationship.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectRelationshipName.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectRelationshipType.hbm.xml");
+ mappings.add(prefix + "HibernateIdentityObjectType.hbm.xml");
+ mappings.add(prefix + "HibernateRealm.hbm.xml");
hibernateSupport.setMappings(mappings);
Added: idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/SimpleTestCase.java
===================================================================
--- idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/SimpleTestCase.java (rev 0)
+++ idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/api/SimpleTestCase.java 2009-11-16 11:04:22 UTC (rev 956)
@@ -0,0 +1,140 @@
+/*
+* 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.api.IdentitySessionFactory;
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.impl.IdentityTestPOJO;
+import org.jboss.identity.idm.impl.configuration.IdentityConfigurationImpl;
+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 java.util.logging.Logger;
+
+/**
+ * Some iteration to help find possible n+1 selects in logs.
+ *
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class SimpleTestCase extends IdentityTestPOJO implements APITestContext
+{
+ private static Logger log = Logger.getLogger(SimpleTestCase.class.getName());
+
+
+ IdentitySessionFactory identitySessionFactory;
+
+ @Create
+ public void setUp() throws Exception
+ {
+ super.start();
+
+ setRealmName("realm://RedHat/DB");
+
+
+ identitySessionFactory = new IdentityConfigurationImpl().
+ configure(getIdentityConfig()).buildIdentitySessionFactory();
+
+ log.fine("Statistics after IdentitySessionFactory creation:");
+ hibernateSupport.getSessionFactory().getStatistics().logSummary();
+
+ }
+
+ @Destroy
+ public void tearDown() throws Exception
+ {
+ super.stop();
+ }
+
+ public IdentitySessionFactory getIdentitySessionFactory()
+ {
+ return identitySessionFactory;
+ }
+
+ @Test
+ public void testPersistenceManager() throws Exception
+ {
+ IdentitySession session = identitySessionFactory.createIdentitySession(getRealmName());
+
+
+ String ORGANIZATION = "ORGANIZATION";
+
+
+
+ for (int i = 0; i < 50; i++)
+ {
+ log.fine("\n\n\n### Create Group: " + i + "\n");
+
+ begin();
+ session.getPersistenceManager().createGroup("test" + i, ORGANIZATION);
+ commit();
+
+ }
+
+ for (int i = 0; i < 50; i++)
+ {
+ log.fine("\n\n\n### Create User: " + i + "\n");
+
+ begin();
+ session.getPersistenceManager().createUser("test" + i);
+ commit();
+
+ }
+
+ String groupKey = session.getPersistenceManager().createGroupKey("test0", ORGANIZATION);
+
+ for (int i = 0; i < 50; i++)
+ {
+ log.fine("\n\n\n### Associate User[" + i + "] to a Group" + "\n");
+
+ begin();
+ session.getRelationshipManager().associateUserByKeys(groupKey, "test" + i);
+ commit();
+
+ }
+
+ begin();
+
+ groupKey = session.getPersistenceManager().createGroup("master", ORGANIZATION).getKey();
+
+ commit();
+
+ for (int i = 0; i < 50; i++)
+ {
+ log.fine("\n\n\n### Associate Group[" + i + "] of type DEPARTMENT to a Group" + groupKey + "\n");
+
+
+
+ begin();
+ String groupKey2 = session.getPersistenceManager().createGroupKey("test" + i, ORGANIZATION);
+ session.getRelationshipManager().associateGroupsByKeys(groupKey, groupKey2);
+ commit();
+
+ }
+
+
+
+ }
+
+}
\ No newline at end of file
Modified: idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java
===================================================================
--- idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java 2009-11-16 11:04:22 UTC (rev 956)
@@ -94,7 +94,7 @@
Random random = new Random();
// Small
- byte[] picture = new byte[512];
+ byte[] picture = new byte[512000];
random.nextBytes(picture);
attr = new HibernateIdentityObjectAttribute(user1, "simple2", HibernateIdentityObjectAttribute.TYPE_BINARY);
Deleted: idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity-classes.cfg.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity-classes.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity-classes.cfg.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -1,48 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
- ~ contributors as indicated by the @authors tag. See the ~
- ~ copyright.txt in the distribution for a full listing of ~
- ~ individual contributors. ~
- ~ ~
- ~ This is free software; you can redistribute it and/or modify it ~
- ~ under the terms of the GNU Lesser General Public License as ~
- ~ published by the Free Software Foundation; either version 2.1 of ~
- ~ the License, or (at your option) any later version. ~
- ~ ~
- ~ This software is distributed in the hope that it will be useful, ~
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
- ~ Lesser General Public License for more details. ~
- ~ ~
- ~ You should have received a copy of the GNU Lesser General Public ~
- ~ License along with this software; if not, write to the Free ~
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-<hibernate-configuration>
- <session-factory>
-
- <property name="hibernate.generate_statistics">true</property>
- <property name="hibernate.show_sql">false</property>
- <property name="cache.use_second_level_cache">true</property>
- <property name="cache.use_query_cache">false</property>
-
- <property name="current_session_context_class">thread</property>
-
- <!--<property name="connection.datasource"></property>-->
-
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:unit-testing-jpa1</property>
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
- <property name="hibernate.hbm2ddl.auto">create-drop</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
-
- </session-factory>
-</hibernate-configuration>
\ No newline at end of file
Deleted: idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -1,63 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
- ~ contributors as indicated by the @authors tag. See the ~
- ~ copyright.txt in the distribution for a full listing of ~
- ~ individual contributors. ~
- ~ ~
- ~ This is free software; you can redistribute it and/or modify it ~
- ~ under the terms of the GNU Lesser General Public License as ~
- ~ published by the Free Software Foundation; either version 2.1 of ~
- ~ the License, or (at your option) any later version. ~
- ~ ~
- ~ This software is distributed in the hope that it will be useful, ~
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
- ~ Lesser General Public License for more details. ~
- ~ ~
- ~ You should have received a copy of the GNU Lesser General Public ~
- ~ License along with this software; if not, write to the Free ~
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-<hibernate-configuration>
- <session-factory>
-
- <property name="hibernate.generate_statistics">true</property>
- <property name="hibernate.show_sql">false</property>
- <property name="cache.use_second_level_cache">true</property>
- <property name="cache.use_query_cache">false</property>
-
- <property name="current_session_context_class">thread</property>
-
- <!--<property name="connection.datasource"></property>-->
-
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:unit-testing-jpa1</property>
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
- <property name="hibernate.hbm2ddl.auto">create-drop</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
-
- <!-- Mapping classes -->
- <!-- all nessesary mappings are added programatically to the configuration in the store-->
- <!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
- <!--<mapping resource="mappings/HibernateRealm.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObjectAttribute.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObjectType.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObjectRelationship.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObjectRelationshipType.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateIdentityObjectRelationshipName.hbm.xml"/>-->
-
- </session-factory>
-</hibernate-configuration>
\ No newline at end of file
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad-local.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad-local.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad-local.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -204,6 +204,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config-msad.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -176,6 +176,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-openldapds.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config-openldapds.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config-openldapds.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -204,6 +204,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-redhatds.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config-redhatds.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config-redhatds.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -204,6 +204,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config-sunds.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config-sunds.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config-sunds.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -204,6 +204,7 @@
</relationships>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
Modified: idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml 2009-11-16 09:16:38 UTC (rev 955)
+++ idm/trunk/idm-testsuite/src/test/resources/test-identity-config.xml 2009-11-16 11:04:22 UTC (rev 956)
@@ -215,6 +215,7 @@
<relationships/>
<credentials>
<credential-type>PASSWORD</credential-type>
+ <credential-type>BINARY</credential-type>
</credentials>
<attributes>
<attribute>
16 years, 6 months
JBoss Identity SVN: r955 - in idm/trunk: example/auth/src/main/resources and 8 other directories.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-11-16 04:16:38 -0500 (Mon, 16 Nov 2009)
New Revision: 955
Added:
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectAttributeBinaryValue.java
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredentialBinaryValue.java
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
Removed:
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateBinaryValue.java
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateBinaryValue.hbm.xml
Modified:
idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/hsqldb.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/hsqldburl.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mssql.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mysql.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/oracle.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/postgresql.hibernate.cfg.xml
idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/sybase.hibernate.cfg.xml
idm/trunk/example/auth/src/main/resources/jboss.idm.hibernate.cfg.xml
idm/trunk/example/simple/src/test/resources/hibernate-jboss-identity-classes.cfg.xml
idm/trunk/example/simple/src/test/resources/hibernate-jboss-identity.cfg.xml
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectAttribute.java
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java
idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml
idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredential.hbm.xml
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/store/hibernate/EvilBinaryTestCase.java
idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml
idm/trunk/integration/deployer/src/main/resources/jboss.idm.hibernate.cfg.xml
Log:
another hibernate mapping change
Modified: idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/hsqldb.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/hsqldb.hibernate.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/hsqldb.hibernate.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -46,7 +46,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<mapping resource="mappings/HibernateRealm.hbm.xml"/>
- <mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>
Modified: idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/hsqldburl.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/hsqldburl.hibernate.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/hsqldburl.hibernate.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -46,7 +46,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<mapping resource="mappings/HibernateRealm.hbm.xml"/>
- <mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>
Modified: idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mssql.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mssql.hibernate.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mssql.hibernate.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -46,7 +46,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<mapping resource="mappings/HibernateRealm.hbm.xml"/>
- <mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>
Modified: idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mysql.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mysql.hibernate.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/mysql.hibernate.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -45,7 +45,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<mapping resource="mappings/HibernateRealm.hbm.xml"/>
- <mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>
Modified: idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/oracle.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/oracle.hibernate.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/oracle.hibernate.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -46,7 +46,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<mapping resource="mappings/HibernateRealm.hbm.xml"/>
- <mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>
Modified: idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/postgresql.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/postgresql.hibernate.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/postgresql.hibernate.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -46,7 +46,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<mapping resource="mappings/HibernateRealm.hbm.xml"/>
- <mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>
Modified: idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/sybase.hibernate.cfg.xml
===================================================================
--- idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/sybase.hibernate.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/assembly/src/main/files/jboss/hibernate.cfg/sybase.hibernate.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -46,7 +46,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<mapping resource="mappings/HibernateRealm.hbm.xml"/>
- <mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>
Modified: idm/trunk/example/auth/src/main/resources/jboss.idm.hibernate.cfg.xml
===================================================================
--- idm/trunk/example/auth/src/main/resources/jboss.idm.hibernate.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/example/auth/src/main/resources/jboss.idm.hibernate.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -67,7 +67,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<mapping resource="mappings/HibernateRealm.hbm.xml"/>
- <mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>
Modified: idm/trunk/example/simple/src/test/resources/hibernate-jboss-identity-classes.cfg.xml
===================================================================
--- idm/trunk/example/simple/src/test/resources/hibernate-jboss-identity-classes.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/example/simple/src/test/resources/hibernate-jboss-identity-classes.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -48,7 +48,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<mapping resource="mappings/HibernateRealm.hbm.xml"/>
- <mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>
+ <mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>
<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>
Modified: idm/trunk/example/simple/src/test/resources/hibernate-jboss-identity.cfg.xml
===================================================================
--- idm/trunk/example/simple/src/test/resources/hibernate-jboss-identity.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/example/simple/src/test/resources/hibernate-jboss-identity.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -51,7 +51,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<!--<mapping resource="mappings/HibernateRealm.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>-->
+ <!--<mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>-->
+ <!--<mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>-->
<!--<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>-->
<!--<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>-->
<!--<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>-->
Deleted: idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateBinaryValue.java
===================================================================
--- idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateBinaryValue.java 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateBinaryValue.java 2009-11-16 09:16:38 UTC (rev 955)
@@ -1,60 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2009, 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.model.hibernate;
-
-public class HibernateBinaryValue
-{
- private Long id;
-
- private byte[] value = null;
-
- public HibernateBinaryValue()
- {
- }
-
- public HibernateBinaryValue(byte[] value)
- {
- this.value = value;
- }
-
- public Long getId()
- {
- return id;
- }
-
- public void setId(Long id)
- {
- this.id = id;
- }
-
- public byte[] getValue()
- {
- return value;
- }
-
- public void setValue(byte[] value)
- {
- this.value = value;
- }
-}
Modified: idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectAttribute.java
===================================================================
--- idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectAttribute.java 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectAttribute.java 2009-11-16 09:16:38 UTC (rev 955)
@@ -48,7 +48,7 @@
private String type;
- private HibernateBinaryValue binaryValue = null;
+ private HibernateIdentityObjectAttributeBinaryValue binaryValue = null;
private Set<String> textValues = new HashSet<String>();
@@ -108,12 +108,12 @@
this.type = newType;
}
- public HibernateBinaryValue getBinaryValue()
+ public HibernateIdentityObjectAttributeBinaryValue getBinaryValue()
{
return binaryValue;
}
- public void setBinaryValue(HibernateBinaryValue binaryValue)
+ public void setBinaryValue(HibernateIdentityObjectAttributeBinaryValue binaryValue)
{
this.binaryValue = binaryValue;
}
@@ -174,7 +174,7 @@
throw new IllegalArgumentException("byte[] value expected with a set type." + " Name=" + name + "; type=" + type);
}
- setBinaryValue(new HibernateBinaryValue((byte[])value));
+ setBinaryValue(new HibernateIdentityObjectAttributeBinaryValue((byte[])value));
}
else
{
Copied: idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectAttributeBinaryValue.java (from rev 947, idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateBinaryValue.java)
===================================================================
--- idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectAttributeBinaryValue.java (rev 0)
+++ idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectAttributeBinaryValue.java 2009-11-16 09:16:38 UTC (rev 955)
@@ -0,0 +1,60 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2009, 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.model.hibernate;
+
+public class HibernateIdentityObjectAttributeBinaryValue
+{
+ private Long id;
+
+ private byte[] value = null;
+
+ public HibernateIdentityObjectAttributeBinaryValue()
+ {
+ }
+
+ public HibernateIdentityObjectAttributeBinaryValue(byte[] value)
+ {
+ this.value = value;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public byte[] getValue()
+ {
+ return value;
+ }
+
+ public void setValue(byte[] value)
+ {
+ this.value = value;
+ }
+}
Modified: idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java
===================================================================
--- idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredential.java 2009-11-16 09:16:38 UTC (rev 955)
@@ -46,7 +46,7 @@
private String textValue;
- private HibernateBinaryValue binaryValue;
+ private HibernateIdentityObjectCredentialBinaryValue binaryValue;
private Map<String, String> properties = new HashMap<String, String>();
@@ -74,12 +74,12 @@
this.textValue = textValue;
}
- public HibernateBinaryValue getBinaryValue()
+ public HibernateIdentityObjectCredentialBinaryValue getBinaryValue()
{
return binaryValue;
}
- public void setBinaryValue(HibernateBinaryValue binaryValue)
+ public void setBinaryValue(HibernateIdentityObjectCredentialBinaryValue binaryValue)
{
this.binaryValue = binaryValue;
}
Added: idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredentialBinaryValue.java
===================================================================
--- idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredentialBinaryValue.java (rev 0)
+++ idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObjectCredentialBinaryValue.java 2009-11-16 09:16:38 UTC (rev 955)
@@ -0,0 +1,60 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2009, 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.model.hibernate;
+
+public class HibernateIdentityObjectCredentialBinaryValue
+{
+ private Long id;
+
+ private byte[] value = null;
+
+ public HibernateIdentityObjectCredentialBinaryValue()
+ {
+ }
+
+ public HibernateIdentityObjectCredentialBinaryValue(byte[] value)
+ {
+ this.value = value;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public byte[] getValue()
+ {
+ return value;
+ }
+
+ public void setValue(byte[] value)
+ {
+ this.value = value;
+ }
+}
\ 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-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-hibernate/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-11-16 09:16:38 UTC (rev 955)
@@ -419,7 +419,8 @@
return config
.addResource("mappings/HibernateIdentityObject.hbm.xml")
- .addResource("mappings/HibernateBinaryValue.hbm.xml")
+ .addResource("mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml")
+ .addResource("mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml")
.addResource("mappings/HibernateIdentityObjectAttribute.hbm.xml")
.addResource("mappings/HibernateIdentityObjectCredential.hbm.xml")
.addResource("mappings/HibernateIdentityObjectCredentialType.hbm.xml")
@@ -1789,7 +1790,7 @@
throw new IdentityException("Wrong attribute mapping. Attribute persisted as binary is mapped with: "
+ type + ". Attribute name: " + name);
}
- HibernateBinaryValue bv = new HibernateBinaryValue((byte[])attribute.getValue());
+ HibernateIdentityObjectAttributeBinaryValue bv = new HibernateIdentityObjectAttributeBinaryValue((byte[])attribute.getValue());
getHibernateSession(ctx).persist(bv);
storeAttribute.setBinaryValue(bv);
}
@@ -1810,7 +1811,7 @@
}
else if (type.equals(HibernateIdentityObjectAttribute.TYPE_BINARY))
{
- HibernateBinaryValue bv = new HibernateBinaryValue((byte[])attribute.getValue());
+ HibernateIdentityObjectAttributeBinaryValue bv = new HibernateIdentityObjectAttributeBinaryValue((byte[])attribute.getValue());
getHibernateSession(ctx).persist(bv);
newAttribute.setBinaryValue(bv);
}
@@ -1959,7 +1960,7 @@
+ type + ". Attribute name: " + name);
}
- HibernateBinaryValue bv = new HibernateBinaryValue((byte[])attribute.getValue());
+ HibernateIdentityObjectAttributeBinaryValue bv = new HibernateIdentityObjectAttributeBinaryValue((byte[])attribute.getValue());
getHibernateSession(ctx).persist(bv);
hibernateAttribute.setBinaryValue(bv);
}
@@ -1992,7 +1993,7 @@
values.add((byte[])value);
}
hibernateAttribute = new HibernateIdentityObjectAttribute(hibernateObject, name, HibernateIdentityObjectAttribute.TYPE_BINARY);
- HibernateBinaryValue bv = new HibernateBinaryValue((byte[])attribute.getValue());
+ HibernateIdentityObjectAttributeBinaryValue bv = new HibernateIdentityObjectAttributeBinaryValue((byte[])attribute.getValue());
getHibernateSession(ctx).persist(bv);
hibernateAttribute.setBinaryValue(bv);
}
@@ -2248,7 +2249,7 @@
}
else if (value instanceof byte[])
{
- HibernateBinaryValue bv = new HibernateBinaryValue((byte[])value);
+ HibernateIdentityObjectCredentialBinaryValue bv = new HibernateIdentityObjectCredentialBinaryValue((byte[])value);
getHibernateSession(ctx).persist(bv);
hibernateCredential.setBinaryValue(bv);
}
Deleted: idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateBinaryValue.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateBinaryValue.hbm.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateBinaryValue.hbm.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateBinaryValue"
- table="jbid_bin_value">
- <cache usage="read-write"/>
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ATTRIBUTE_ID" />
- <generator class="native"/>
- </id>
- <property name="value"
- type="org.hibernate.type.PrimitiveByteArrayBlobType"
- access="field"
- lazy="true"
- not-null="true">
- <column name="VALUE" length="10240000"/>
- </property>
- </class>
-</hibernate-mapping>
Modified: idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttribute.hbm.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -43,16 +43,13 @@
column="ATTR_VALUE"/>
</set>
<many-to-one name="binaryValue"
- class="org.jboss.identity.idm.impl.model.hibernate.HibernateBinaryValue"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
not-null="false"
+ column="BIN_VALUE_ID"
+ unique="true"
lazy="proxy"
access="field"
fetch="select"
- cascade="all">
- <column name="BINARY_VALUE"
- not-null="false"/>
- </many-to-one>
-
-
+ cascade="all"/>
</class>
</hibernate-mapping>
Copied: idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml (from rev 947, idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateBinaryValue.hbm.xml)
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ table="jbid_attr_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.hibernate.type.PrimitiveByteArrayBlobType"
+ access="field"
+ lazy="true"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Modified: idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredential.hbm.xml
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredential.hbm.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredential.hbm.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -12,16 +12,15 @@
<column name="ID" />
<generator class="native"/>
</id>
- <many-to-one name="binaryValue"
- class="org.jboss.identity.idm.impl.model.hibernate.HibernateBinaryValue"
+ <many-to-one name="binaryValue"
+ class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
not-null="false"
+ column="BIN_VALUE_ID"
+ unique="true"
lazy="proxy"
access="field"
fetch="select"
- cascade="all">
- <column name="BINARY_VALUE"
- not-null="false"/>
- </many-to-one>
+ cascade="all"/>
<many-to-one name="identityObject"
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"
access="field"
Copied: idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml (from rev 947, idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateBinaryValue.hbm.xml)
===================================================================
--- idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml (rev 0)
+++ idm/trunk/idm-hibernate/src/main/resources/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ table="jbid_creden_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.hibernate.type.PrimitiveByteArrayBlobType"
+ access="field"
+ lazy="true"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
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-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/IdentityTestPOJO.java 2009-11-16 09:16:38 UTC (rev 955)
@@ -95,7 +95,8 @@
List<String> mappings = new LinkedList<String>();
mappings.add("mappings/HibernateIdentityObject.hbm.xml");
- mappings.add("mappings/HibernateBinaryValue.hbm.xml");
+ mappings.add("mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml");
+ mappings.add("mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml");
mappings.add("mappings/HibernateIdentityObjectAttribute.hbm.xml");
mappings.add("mappings/HibernateIdentityObjectCredential.hbm.xml");
mappings.add("mappings/HibernateIdentityObjectCredentialType.hbm.xml");
Modified: idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java
===================================================================
--- idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-testsuite/src/test/java/org/jboss/identity/idm/impl/store/hibernate/EvilBinaryTestCase.java 2009-11-16 09:16:38 UTC (rev 955)
@@ -24,13 +24,10 @@
import org.jboss.identity.idm.impl.model.hibernate.*;
import org.jboss.identity.idm.impl.IdentityTestPOJO;
-import org.jboss.identity.idm.impl.api.PasswordCredential;
import org.jboss.unit.api.pojo.annotations.Destroy;
import org.jboss.unit.api.pojo.annotations.Create;
import org.jboss.unit.api.pojo.annotations.Test;
import org.hibernate.Session;
-import org.hibernate.Query;
-import org.hibernate.criterion.Projection;
import org.hibernate.criterion.Projections;
import java.util.*;
@@ -97,11 +94,11 @@
Random random = new Random();
// Small
- byte[] picture = new byte[4];
+ byte[] picture = new byte[512];
random.nextBytes(picture);
attr = new HibernateIdentityObjectAttribute(user1, "simple2", HibernateIdentityObjectAttribute.TYPE_BINARY);
- attr.setBinaryValue(new HibernateBinaryValue(picture));
+ attr.setBinaryValue(new HibernateIdentityObjectAttributeBinaryValue(picture));
user1.addAttribute(attr);
commit();
@@ -119,7 +116,7 @@
attr = new HibernateIdentityObjectAttribute(user1, "simple3", HibernateIdentityObjectAttribute.TYPE_BINARY);
- attr.setBinaryValue(new HibernateBinaryValue(picture));
+ attr.setBinaryValue(new HibernateIdentityObjectAttributeBinaryValue(picture));
user1.getAttributes().add(attr);
commit();
@@ -132,14 +129,14 @@
assertEquals(3, user1.getAttributes().size());
- int binaryCount = ((Integer)session.createCriteria(HibernateBinaryValue.class).
+ int binaryCount = ((Integer)session.createCriteria(HibernateIdentityObjectAttributeBinaryValue.class).
setProjection(Projections.rowCount()).uniqueResult()).intValue();
assertEquals(2,binaryCount);
session.delete(user1);
- binaryCount = ((Integer)session.createCriteria(HibernateBinaryValue.class).
+ binaryCount = ((Integer)session.createCriteria(HibernateIdentityObjectAttributeBinaryValue.class).
setProjection(Projections.rowCount()).uniqueResult()).intValue();
assertEquals(0,binaryCount);
Modified: idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/idm-testsuite/src/test/resources/hibernate-jboss-identity.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -48,7 +48,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<!--<mapping resource="mappings/HibernateRealm.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>-->
+ <!--<mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>-->
+ <!--<mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>-->
<!--<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>-->
<!--<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>-->
<!--<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>-->
Modified: idm/trunk/integration/deployer/src/main/resources/jboss.idm.hibernate.cfg.xml
===================================================================
--- idm/trunk/integration/deployer/src/main/resources/jboss.idm.hibernate.cfg.xml 2009-11-16 06:23:40 UTC (rev 954)
+++ idm/trunk/integration/deployer/src/main/resources/jboss.idm.hibernate.cfg.xml 2009-11-16 09:16:38 UTC (rev 955)
@@ -49,7 +49,8 @@
<!-- all nessesary mappings are added programatically to the configuration in the store-->
<!-- this is for manual SF creation or when 'addHibernateMappings' is set to false in the store configuration-->
<!--<mapping resource="mappings/HibernateRealm.hbm.xml"/>-->
- <!--<mapping resource="mappings/HibernateBinaryValue.hbm.xml"/>-->
+ <!--<mapping resource="mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml"/>-->
+ <!--<mapping resource="mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml"/>-->
<!--<mapping resource="mappings/HibernateIdentityObject.hbm.xml"/>-->
<!--<mapping resource="mappings/HibernateIdentityObjectCredential.hbm.xml"/>-->
<!--<mapping resource="mappings/HibernateIdentityObjectCredentialType.hbm.xml"/>-->
16 years, 6 months
JBoss Identity SVN: r954 - idm/trunk/idm-testsuite/src/test/resources/datasources.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-11-16 01:23:40 -0500 (Mon, 16 Nov 2009)
New Revision: 954
Modified:
idm/trunk/idm-testsuite/src/test/resources/datasources/datasources.xml
Log:
fix db2 connection url
Modified: idm/trunk/idm-testsuite/src/test/resources/datasources/datasources.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/datasources/datasources.xml 2009-11-16 05:56:01 UTC (rev 953)
+++ idm/trunk/idm-testsuite/src/test/resources/datasources/datasources.xml 2009-11-16 06:23:40 UTC (rev 954)
@@ -69,7 +69,7 @@
</datasource>
<datasource>
<datasource-name>db2-9-7</datasource-name>
- <connection-url>vmg06.mw.lab.eng.bos.redhat.com:50000/jbossqa</connection-url>
+ <connection-url>jdbc:db2://vmg06.mw.lab.eng.bos.redhat.com:50000/jbossqa</connection-url>
<driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
<user-name>identity</user-name>
<password>identity</password>
16 years, 6 months
JBoss Identity SVN: r953 - idm/trunk/idm-testsuite/src/test/resources/datasources.
by jboss-identity-commits@lists.jboss.org
Author: bdaw
Date: 2009-11-16 00:56:01 -0500 (Mon, 16 Nov 2009)
New Revision: 953
Modified:
idm/trunk/idm-testsuite/src/test/resources/datasources/datasources.xml
Log:
toto
Modified: idm/trunk/idm-testsuite/src/test/resources/datasources/datasources.xml
===================================================================
--- idm/trunk/idm-testsuite/src/test/resources/datasources/datasources.xml 2009-11-16 05:49:48 UTC (rev 952)
+++ idm/trunk/idm-testsuite/src/test/resources/datasources/datasources.xml 2009-11-16 05:56:01 UTC (rev 953)
@@ -54,7 +54,7 @@
</datasource>
<datasource>
<datasource-name>sybase-15-0-3_8kb</datasource-name>
- <connection-url>jdbc:sybase:Tds:vmg07.mw.lab.eng.bos.redhat.com:5000/identity</connection-url>
+ <connection-url>jdbc:sybase:Tds:vmg07.mw.lab.eng.bos.redhat.com:5000/jbidentity</connection-url>
<driver-class>com.sybase.jdbc3.jdbc.SybDriver</driver-class>
<user-name>jbidentity</user-name>
<password>jbidentity</password>
16 years, 6 months