directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r564425 [2/4] - in /directory/sandbox/djencks/triplesec-jacc2: ./ admin-api2/ admin-api2/src/main/java/org/safehaus/triplesec/admin/ admin-api2/src/main/java/org/safehaus/triplesec/admin/dao/ admin-api2/src/main/java/org/safehaus/triplesec/...
Date Thu, 09 Aug 2007 23:40:18 GMT
Modified: directory/sandbox/djencks/triplesec-jacc2/configuration-io/src/main/java/org/safehaus/triplesec/configuration/ServerXmlUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/configuration-io/src/main/java/org/safehaus/triplesec/configuration/ServerXmlUtils.java?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/configuration-io/src/main/java/org/safehaus/triplesec/configuration/ServerXmlUtils.java (original)
+++ directory/sandbox/djencks/triplesec-jacc2/configuration-io/src/main/java/org/safehaus/triplesec/configuration/ServerXmlUtils.java Thu Aug  9 16:40:15 2007
@@ -125,10 +125,10 @@
         
         addProperty( bean, "allowAnonymousAccess", configuration.isAllowAnonymousAccess() );
         addProperty( bean, "accessControlEnabled", configuration.isAccessControlEnabled() );
-        addProperty( bean, "ldapPort", configuration.getLdapPort() );
-        addProperty( bean, "ldapsCertificateFile", configuration.getLdapsCertificateFile() );
-        addProperty( bean, "ldapsCertificatePassword", configuration.getLdapsCertificatePassword() );
-        addProperty( bean, "ldapsPort", configuration.getLdapsPort() );
+//        addProperty( bean, "ldapPort", configuration.getLdapPort() );
+//        addProperty( bean, "ldapsCertificateFile", configuration.getLdapsCertificateFile() );
+//        addProperty( bean, "ldapsCertificatePassword", configuration.getLdapsCertificatePassword() );
+//        addProperty( bean, "ldapsPort", configuration.getLdapsPort() );
         addProperty( bean, "httpPort", configuration.getHttpPort() );
         
         if ( configuration.getLdifDirectory() != null )
@@ -137,11 +137,11 @@
         }
         
         addProperty( bean, "workingDirectory", configuration.getWorkingDirectory() );
-        addProperty( bean, "enableChangePassword", configuration.isEnableChangePassword() );
-        addProperty( bean, "enableKerberos", configuration.isEnableKerberos() );
-        addProperty( bean, "enableLdaps", configuration.isEnableLdaps() );
+//        addProperty( bean, "enableChangePassword", configuration.isEnableChangePassword() );
+//        addProperty( bean, "enableKerberos", configuration.isEnableKerberos() );
+//        addProperty( bean, "enableLdaps", configuration.isEnableLdaps() );
         addProperty( bean, "enableNetworking", configuration.isEnableNetworking() );
-        addProperty( bean, "enableNtp", configuration.isEnableNtp() );
+//        addProperty( bean, "enableNtp", configuration.isEnableNtp() );
         addProperty( bean, "enableHttp", configuration.isEnableHttp() );
         addProperty( bean, "exitVmOnShutdown", configuration.isExitVmOnShutdown() );
         addProperty( bean, "shutdownHookEnabled", configuration.isShutdownHookEnabled() );
@@ -151,7 +151,7 @@
             addBeans( "ldifFilters", bean, configuration.getLdifFilters() );
         }
         
-        addBeans( "extendedOperationHandlers", bean, ( List ) configuration.getExtendedOperationHandlers() );
+//        addBeans( "extendedOperationHandlers", bean, ( List ) configuration.getExtendedOperationHandlers() );
         //TODO HELP HELP !!!
 //        addBeans( "bootstrapSchemas", bean, configuration.getBootstrapSchemas() );
         
@@ -209,9 +209,11 @@
         MutablePartitionConfiguration configuration ) throws Exception
     {
         Element bean = beansElement.addElement( "bean" );
-        bean.addAttribute( "id", configuration.getName() + "PartitionConfiguration" );
+//        bean.addAttribute( "id", configuration.getName() + "PartitionConfiguration" );
+        bean.addAttribute( "id", configuration.getId() + "PartitionConfiguration" );
         bean.addAttribute( "class", MutablePartitionConfiguration.class.getName() );
-        addProperty( bean, "name", configuration.getName() );
+//        addProperty( bean, "name", configuration.getName() );
+        addProperty( bean, "name", configuration.getId() );
         addProperty( bean, "suffix", configuration.getSuffix() );
         
         // Add the contextEntry property by building the partial LDIF
@@ -265,7 +267,7 @@
             Element interceptorBean = list.addElement( "bean" ).addAttribute( "class", 
                 MutableInterceptorConfiguration.class.getName() );
             addProperty( interceptorBean, "name", configuration.getName() );
-            addBeanProperty( interceptorBean, "interceptor", configuration.getInterceptor().getClass() );
+            addBeanProperty( interceptorBean, "interceptor", configuration.getInterceptorClassName() );
         }
     }
 
@@ -278,16 +280,17 @@
         for ( Iterator ii = partitions.iterator(); ii.hasNext(); /**/ )
         {
             MutablePartitionConfiguration configuration = ( MutablePartitionConfiguration ) ii.next();
-            set.addElement( "ref" ).addAttribute( "bean", configuration.getName() + "PartitionConfiguration" );
+//            set.addElement( "ref" ).addAttribute( "bean", configuration.getName() + "PartitionConfiguration" );
+            set.addElement( "ref" ).addAttribute( "bean", configuration.getId() + "PartitionConfiguration" );
         }
     }
     
     
-    static void addBeanProperty( Element bean, String key, Class clazz )
+    static void addBeanProperty( Element bean, String key, String className )
     {
         Element property = bean.addElement( "property" );
         property.addAttribute( "name", key );
-        property.addElement( "bean" ).addAttribute( "class", clazz.getName() );
+        property.addElement( "bean" ).addAttribute( "class", className );
     }
 
 

Modified: directory/sandbox/djencks/triplesec-jacc2/configuration-io/src/test/java/org/safehaus/triplesec/configuration/ServerXmlUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/configuration-io/src/test/java/org/safehaus/triplesec/configuration/ServerXmlUtilsTest.java?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/configuration-io/src/test/java/org/safehaus/triplesec/configuration/ServerXmlUtilsTest.java (original)
+++ directory/sandbox/djencks/triplesec-jacc2/configuration-io/src/test/java/org/safehaus/triplesec/configuration/ServerXmlUtilsTest.java Thu Aug  9 16:40:15 2007
@@ -50,7 +50,7 @@
 import org.apache.directory.server.core.subtree.SubentryService;
 import org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler;
 import org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler;
-import org.apache.directory.server.protocol.shared.store.Krb5KdcEntryFilter;
+//import org.apache.directory.server.protocol.shared.store.Krb5KdcEntryFilter;
 import org.apache.directory.server.schema.bootstrap.CorbaSchema;
 import org.apache.directory.server.schema.bootstrap.CosineSchema;
 import org.apache.directory.server.schema.bootstrap.JavaSchema;
@@ -144,81 +144,81 @@
     public void testWriteConfiguration0() throws Exception
     {
         MutableTriplesecStartupConfiguration configuration = new MutableTriplesecStartupConfiguration();
-        configuration.setLdapPort( 10389 );
+//        configuration.setLdapPort( 10389 );
         configuration.setAccessControlEnabled( true );
         configuration.setShutdownHookEnabled( true );
         configuration.setAllowAnonymousAccess( false );
-        configuration.setEnableChangePassword( true );
-        configuration.setEnableKerberos( true );
+//        configuration.setEnableChangePassword( true );
+//        configuration.setEnableKerberos( true );
         configuration.setEnableNetworking( true );
-        configuration.setEnableLdaps( false );
-        configuration.setEnableNtp( true );
+//        configuration.setEnableLdaps( false );
+//        configuration.setEnableNtp( true );
         configuration.setExitVmOnShutdown( true );
-        configuration.setLdifDirectory( new File( "conf" ) );
+//        configuration.setLdifDirectory( new File( "conf" ) );
         configuration.setWorkingDirectory( new File( "var/partitions" ) );
         
         List filters = new ArrayList();
-        filters.add( new Krb5KdcEntryFilter() );
-        configuration.setLdifFilters( filters );
+//        filters.add( new Krb5KdcEntryFilter() );
+//        configuration.setLdifFilters( filters );
         
         List interceptors = new ArrayList();
         MutableInterceptorConfiguration interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new NormalizationService() );
+        interceptorConfiguration.setInterceptorClassName( NormalizationService.class.getName() );
         interceptorConfiguration.setName( "normalizationService" );
         interceptors.add( interceptorConfiguration );
         
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new AuthenticationService() );
+        interceptorConfiguration.setInterceptorClassName( AuthenticationService.class.getName() );
         interceptorConfiguration.setName( "authenticationService" );
         interceptors.add( interceptorConfiguration );
 
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new ReferralService() );
+        interceptorConfiguration.setInterceptorClassName( ReferralService.class.getName() );
         interceptorConfiguration.setName( "referralService" );
         interceptors.add( interceptorConfiguration );
         
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new AuthorizationService() );
+        interceptorConfiguration.setInterceptorClassName( AuthorizationService.class.getName() );
         interceptorConfiguration.setName( "authorizationService" );
         interceptors.add( interceptorConfiguration );
         
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new DefaultAuthorizationService() );
+        interceptorConfiguration.setInterceptorClassName( DefaultAuthorizationService.class.getName() );
         interceptorConfiguration.setName( "defaultAuthorizationService" ); 
         interceptors.add( interceptorConfiguration );
         
         interceptorConfiguration = new MutableInterceptorConfiguration(); 
-        interceptorConfiguration.setInterceptor( new ExceptionService() );
+        interceptorConfiguration.setInterceptorClassName( ExceptionService.class.getName() );
         interceptorConfiguration.setName( "exceptionService" );
         interceptors.add( interceptorConfiguration );
         
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new SchemaService() );
+        interceptorConfiguration.setInterceptorClassName( SchemaService.class.getName() );
         interceptorConfiguration.setName( "schemaService" ); 
         interceptors.add( interceptorConfiguration );
         
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new SubentryService() );
+        interceptorConfiguration.setInterceptorClassName( SubentryService.class.getName() );
         interceptorConfiguration.setName( "subentryService" );
         interceptors.add( interceptorConfiguration );
         
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new OperationalAttributeService() );
+        interceptorConfiguration.setInterceptorClassName( OperationalAttributeService.class.getName() );
         interceptorConfiguration.setName( "operationalAttributeService" );
         interceptors.add( interceptorConfiguration );
         
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new CollectiveAttributeService() );
+        interceptorConfiguration.setInterceptorClassName( CollectiveAttributeService.class.getName() );
         interceptorConfiguration.setName( "collectiveAttributeService" );
         interceptors.add( interceptorConfiguration );
 
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new EventService() );
+        interceptorConfiguration.setInterceptorClassName( EventService.class.getName() );
         interceptorConfiguration.setName( "eventService" );
         interceptors.add( interceptorConfiguration );
         
         interceptorConfiguration = new MutableInterceptorConfiguration();
-        interceptorConfiguration.setInterceptor( new PolicyProtectionInterceptor() );
+        interceptorConfiguration.setInterceptorClassName( PolicyProtectionInterceptor.class.getName() );
         interceptorConfiguration.setName( "policyProtectionInterceptor" );
         interceptors.add( interceptorConfiguration );
         
@@ -227,7 +227,7 @@
         List extendedHandlers = new ArrayList();
         extendedHandlers.add( new GracefulShutdownHandler() );
         extendedHandlers.add( new LaunchDiagnosticUiHandler() );
-        configuration.setExtendedOperationHandlers( extendedHandlers );
+//        configuration.setExtendedOperationHandlers( extendedHandlers );
 
         configuration.getSmsConfiguration().setSmsAccountName( "foo" );
         configuration.getSmsConfiguration().setSmsUsername( "bar" );
@@ -241,7 +241,8 @@
         
         Set partitions = new HashSet( configuration.getPartitionConfigurations() );
         MutablePartitionConfiguration partitionConfiguration = new MutablePartitionConfiguration();
-        partitionConfiguration.setName( "example" );
+//        partitionConfiguration.setName( "example" );
+        partitionConfiguration.setId( "example" );
         partitionConfiguration.setSuffix( "dc=example,dc=com" );
         Set indices = new HashSet();
         indices.add( "objectClass" );

Modified: directory/sandbox/djencks/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/MutableTriplesecStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/MutableTriplesecStartupConfiguration.java?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/MutableTriplesecStartupConfiguration.java (original)
+++ directory/sandbox/djencks/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/MutableTriplesecStartupConfiguration.java Thu Aug  9 16:40:15 2007
@@ -27,6 +27,9 @@
 
 
 /**
+ *
+ * @org.apache.xbean.XBean
+ *
  * @author <a href="mailto:akarasulu@safehaus.org">Alex Karasulu</a>
  * @version $Rev$
  */
@@ -107,72 +110,72 @@
     }
 
 
-    public void setEnableKerberos( boolean enableKerberos )
-    {
-        super.setEnableKerberos( enableKerberos );
-    }
-
-
-    public void setEnableChangePassword( boolean enableChangePassword )
-    {
-        super.setEnableChangePassword( enableChangePassword );
-    }
-
-
-    public void setEnableNtp( boolean enableNtp )
-    {
-        super.setEnableNtp( enableNtp );
-    }
-
-
-    public void setLdapPort( int ldapPort )
-    {
-        super.setLdapPort( ldapPort );
-    }
-
-
-    public void setLdapsPort( int ldapsPort )
-    {
-        super.setLdapsPort( ldapsPort );
-    }
-
-
-    public void setExtendedOperationHandlers( Collection handlers )
-    {
-        super.setExtendedOperationHandlers( handlers );
-    }
-
-
-    public void setLdifDirectory( File ldifDirectory )
-    {
-        super.setLdifDirectory( ldifDirectory );
-    }
-
-
-    public void setLdifFilters( List ldifFilters )
-    {
-        super.setLdifFilters( ldifFilters );
-    }
-
-
-    public void setEnableLdaps( boolean enableLdaps )
-    {
-        super.setEnableLdaps( enableLdaps );
-    }
-
-
-    public void setLdapsCertificateFile( File ldapsCertificateFile )
-    {
-        super.setLdapsCertificateFile( ldapsCertificateFile );
-    }
-
-
-    public void setLdapsCertificatePassword( String ldapsCertificatePassword )
-    {
-        super.setLdapsCertificatePassword( ldapsCertificatePassword );
-    }
-
-
+//    public void setEnableKerberos( boolean enableKerberos )
+//    {
+//        super.setEnableKerberos( enableKerberos );
+//    }
+//
+//
+//    public void setEnableChangePassword( boolean enableChangePassword )
+//    {
+//        super.setEnableChangePassword( enableChangePassword );
+//    }
+//
+//
+//    public void setEnableNtp( boolean enableNtp )
+//    {
+//        super.setEnableNtp( enableNtp );
+//    }
+//
+//
+//    public void setLdapPort( int ldapPort )
+//    {
+//        super.setLdapPort( ldapPort );
+//    }
+//
+//
+//    public void setLdapsPort( int ldapsPort )
+//    {
+//        super.setLdapsPort( ldapsPort );
+//    }
+//
+//
+//    public void setExtendedOperationHandlers( Collection handlers )
+//    {
+//        super.setExtendedOperationHandlers( handlers );
+//    }
+//
+//
+//    public void setLdifDirectory( File ldifDirectory )
+//    {
+//        super.setLdifDirectory( ldifDirectory );
+//    }
+//
+//
+//    public void setLdifFilters( List ldifFilters )
+//    {
+//        super.setLdifFilters( ldifFilters );
+//    }
+//
+//
+//    public void setEnableLdaps( boolean enableLdaps )
+//    {
+//        super.setEnableLdaps( enableLdaps );
+//    }
+//
+//
+//    public void setLdapsCertificateFile( File ldapsCertificateFile )
+//    {
+//        super.setLdapsCertificateFile( ldapsCertificateFile );
+//    }
+//
+//
+//    public void setLdapsCertificatePassword( String ldapsCertificatePassword )
+//    {
+//        super.setLdapsCertificatePassword( ldapsCertificatePassword );
+//    }
+//
+//
     public void setShutdownHookEnabled( boolean shutdownHookEnabled )
     {
         super.setShutdownHookEnabled( shutdownHookEnabled );

Modified: directory/sandbox/djencks/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/TriplesecStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/TriplesecStartupConfiguration.java?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/TriplesecStartupConfiguration.java (original)
+++ directory/sandbox/djencks/triplesec-jacc2/configuration/src/main/java/org/safehaus/triplesec/configuration/TriplesecStartupConfiguration.java Thu Aug  9 16:40:15 2007
@@ -24,6 +24,8 @@
 
 
 /**
+ *
+ * @org.apache.xbean.XBean
  * 
  * @author <a href="mailto:akarasulu@safehaus.org">Alex Karasulu</a>
  * @version $Rev$

Modified: directory/sandbox/djencks/triplesec-jacc2/itest-data/src/main/resources/server.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/itest-data/src/main/resources/server.xml?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/itest-data/src/main/resources/server.xml (original)
+++ directory/sandbox/djencks/triplesec-jacc2/itest-data/src/main/resources/server.xml Thu Aug  9 16:40:15 2007
@@ -4,6 +4,474 @@
   "http://www.springframework.org/dtd/spring-beans.dtd">
 
 <beans>
+    <bean id="environment" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+      <property name="properties">
+        <props>
+          <!-- JNDI security properties used to get initial contexts.         -->
+          <prop key="java.naming.security.authentication">simple</prop>
+          <prop key="java.naming.security.principal">uid=admin,ou=system</prop>
+          <prop key="java.naming.security.credentials">secret</prop>
+          <!-- Set this key to a space delimited set of attributeType descriptions
+               and their OID's if you want an attributeType to be handled as
+               binary content.
+
+               The server will use the schema to derive the set of attributeTypes
+               to treat as binary.  The union if the values you provide here
+               will be taken as the set of binaries. Note to be consistent you
+               must add both the OID and all the names an attributeType can have.
+          -->
+          <!--
+          <prop key="java.naming.ldap.attributes.binary"></prop>
+          -->
+        </props>
+      </property>
+    </bean>
+
+    <bean id="changePasswordConfiguration" class="org.apache.directory.server.changepw.ChangePasswordConfiguration">
+      <!-- Whether to enable the Change Password protocol.                    -->
+      <property name="enabled" value="false" />
+      <!-- The port to run the Change Password protocol on.                   -->
+      <property name="ipPort" value="464" />
+    </bean>
+
+    <bean id="ntpConfiguration" class="org.apache.directory.server.ntp.NtpConfiguration">
+      <!-- Whether to enable the NTP protocol.                                -->
+      <property name="enabled" value="false" />
+      <!-- The port to run the NTP protocol on.                               -->
+      <property name="ipPort" value="123" />
+    </bean>
+
+    <bean id="dnsConfiguration" class="org.apache.directory.server.dns.DnsConfiguration">
+      <!-- Whether to enable the DNS protocol.                                -->
+      <property name="enabled" value="false" />
+      <!-- The port to run the DNS protocol on.                               -->
+      <property name="ipPort" value="53" />
+    </bean>
+
+    <bean id="kdcConfiguration" class="org.apache.directory.server.kerberos.kdc.KdcConfiguration">
+      <!-- Whether to enable the Kerberos protocol.                           -->
+      <property name="enabled" value="false" />
+      <!-- The port to run the Kerberos protocol on.                          -->
+      <property name="ipPort" value="88" />
+    </bean>
+
+    <bean id="ldapsConfiguration" class="org.apache.directory.server.ldap.LdapConfiguration">
+      <!-- Whether to enable the LDAPS protocol.                               -->
+      <property name="enabled" value="false" />
+      <!-- The port to run the LDAPS protocol on.                              -->
+      <property name="ipPort" value="636" />
+
+      <property name="enableLdaps" value="true" />
+    </bean>
+
+    <bean id="ldapConfiguration" class="org.apache.directory.server.ldap.LdapConfiguration">
+      <!-- The port to run the LDAP protocol on.                              -->
+      <property name="ipPort" value="10389" />
+      <!-- Whether to allow anonymous access.                                 -->
+      <property name="allowAnonymousAccess" value="false" />
+
+      <!-- The list of supported authentication mechanisms.                   -->
+      <property name="supportedMechanisms">
+        <list>
+          <value>SIMPLE</value>
+          <value>CRAM-MD5</value>
+          <value>DIGEST-MD5</value>
+          <!--<value>GSSAPI</value>-->
+        </list>
+      </property>
+
+      <!-- The FQDN of this SASL host, validated during SASL negotiation.     -->
+      <property name="saslHost" value="ldap.example.com" />
+
+      <!-- The Kerberos principal name for this LDAP service, used by GSSAPI. -->
+      <property name="saslPrincipal" value="ldap/ldap.example.com@EXAMPLE.COM" />
+
+      <!-- The desired quality-of-protection, used by DIGEST-MD5 and GSSAPI.  -->
+      <property name="saslQop">
+        <list>
+          <value>auth</value>
+          <value>auth-int</value>
+          <value>auth-conf</value>
+        </list>
+      </property>
+
+      <!-- The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI. -->
+      <property name="saslRealms">
+        <list>
+          <value>example.com</value>
+          <value>apache.org</value>
+        </list>
+      </property>
+
+      <!-- The base DN containing users that can be SASL authenticated.       -->
+      <property name="searchBaseDn" value="ou=users,ou=system" />
+
+      <!-- SSL CONFIG CAN GO HERE-->
+
+      <!-- limits searches by non-admin users to a max time of 15000          -->
+      <!-- milliseconds and has a default value of 10000                      -->
+      <property name="maxTimeLimit" value="15000" />
+
+      <!-- limits searches to max size of 1000 entries: default value is 100  -->
+      <property name="maxSizeLimit" value="1000" />
+
+      <!-- the collection of extended operation handlers to install           -->
+      <property name="extendedOperationHandlers">
+        <list>
+          <!--<bean class="org.apache.directory.server.ldap.support.starttls.StartTlsHandler"/>-->
+          <bean class="org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler"/>
+          <bean class="org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler"/>
+          <!-- The Stored Procedure Extended Operation is not stable yet and it may cause security risks.
+          <bean class="org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler"/>
+          -->
+        </list>
+      </property>
+    </bean>
+
+    <bean id="configuration" class="org.apache.directory.server.configuration.MutableServerStartupConfiguration">
+      <property name="workingDirectory" value="example.com" />
+
+      <!-- Uncomment below to have the server load entries on startup!        -->
+      <!-- ldifDirectory property can point to a relative file, directory or  -->
+      <!-- can point to an absolute path to either using the URL path         -->
+      <!-- notation: i.e. file:///Users/jack/apacheds/ldifs                   -->
+      <!--
+      <property name="ldifDirectory">
+        <value>example.ldif</value>
+      </property>
+      -->
+
+      <!-- Entries will optionally be filtered using LdifLoadFilters in the   -->
+      <!-- order specified.                                                   -->
+      <!--
+      <property name="ldifFilters">
+        <list>
+          <bean class="com.example.MyEntryFilter"/>
+        </list>
+      </property>
+      -->
+
+      <!-- the number of milliseconds before issuing a synch (flush to disk)  -->
+      <!-- which writes out dirty pages back to disk.  To turn off synchs all -->
+      <!-- together simply set this value to <= 0.  Make sure you turn on     -->
+      <!-- synchOnWrite for all partitions if you do choose to do this or else-->
+      <!-- writes may never persist to disk.                                  -->
+      <property name="synchPeriodMillis" value="15000" />
+
+      <!-- maximum number of threads used by mina is set to 8: default is 4   -->
+      <property name="maxThreads" value="8" />
+
+      <property name="allowAnonymousAccess" value="false" />
+      <property name="accessControlEnabled" value="false" />
+
+      <!--
+         It's more efficient to keep this feature turned off but you may not like
+         having the creatorsName and modifiersName contain OIDs instead of short
+         attributeType names instead.  So if you want the creatorsName to change
+         from the normalized form which is the internal representation of
+
+              '0.9.2342.19200300.100.1.1=admin,2.5.4.11=system'
+
+         to a more human readabile form like:
+
+              'uid=admin,ou=system'
+
+         then set this property to true.
+      -->
+      <property name="denormalizeOpAttrsEnabled" value="false" />
+
+      <property name="ntpConfiguration" ref="ntpConfiguration" />
+      <property name="dnsConfiguration" ref="dnsConfiguration" />
+      <property name="changePasswordConfiguration" ref="changePasswordConfiguration" />
+      <property name="kdcConfiguration" ref="kdcConfiguration" />
+      <property name="ldapConfiguration" ref="ldapConfiguration" />
+      <property name="ldapsConfiguration" ref="ldapsConfiguration" />
+
+      <property name="systemPartitionConfiguration" ref="systemPartitionConfiguration" />
+
+      <property name="partitionConfigurations">
+        <set>
+          <ref bean="examplePartitionConfiguration"/>
+        </set>
+      </property>
+
+      <property name="interceptorConfigurations">
+        <list>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="normalizationService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.normalization.NormalizationService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="authenticationService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.authn.AuthenticationService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="referralService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.referral.ReferralService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="authorizationService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.authz.AuthorizationService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="defaultAuthorizationService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.authz.DefaultAuthorizationService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="exceptionService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.exception.ExceptionService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="operationalAttributeService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.operational.OperationalAttributeService" />
+            </property>
+          </bean>
+          <!-- bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="passwordPolicyService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.kerberos.PasswordPolicyService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="keyDerivationService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.kerberos.KeyDerivationService" />
+            </property>
+          </bean -->
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="schemaService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.schema.SchemaService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="subentryService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.subtree.SubentryService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="collectiveAttributeService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.collective.CollectiveAttributeService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="eventService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.event.EventService" />
+            </property>
+          </bean>
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="triggerService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.server.core.trigger.TriggerService" />
+            </property>
+          </bean>
+
+          <!-- Uncomment to enable replication service
+          <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+            <property name="name" value="replicationService" />
+            <property name="interceptor">
+              <bean class="org.apache.directory.mitosis.service.ReplicationService">
+                <property name="configuration">
+                  <bean class="org.apache.directory.mitosis.configuration.ReplicationConfiguration">
+                    <property name="replicaId">
+                      <bean class="org.apache.directory.mitosis.common.ReplicaId">
+                        <constructor-arg>
+                          <value>instance_a</value>
+                        </constructor-arg>
+                      </bean>
+                    </property>
+                    <property name="serverPort" value="10390" />
+                    <property name="peerReplicas" value="instance_b@localhost:10392" />
+                  </bean>
+                </property>
+              </bean>
+            </property>
+          </bean>
+          -->
+        </list>
+      </property>
+    </bean>
+
+    <!-- use the following partitionConfiguration to override defaults for  -->
+    <!-- the system partition                                               -->
+    <bean id="systemPartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
+      <property name="name" value="system" />
+      <property name="cacheSize" value="100" />
+      <property name="suffix" value="ou=system" />
+
+      <!-- the optimizer is enabled by default but may not always be what     -->
+      <!-- you want if your queries are really simple                         -->
+      <property name="optimizerEnabled" value="true" />
+
+      <!--
+        Synchronization on writes does not wait for synch operations
+        to flush dirty pages.  Writes persist immediately to disk at
+        a cost to performance with increased data integrity.  Otherwise
+        the periodic synch operation will flush dirty pages using the
+        synchPeriodMillis parameter in the main configuration.
+      -->
+      <property name="synchOnWrite" value="true" />
+      <property name="indexedAttributes">
+        <set>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5" />
+            <property name="cacheSize" value="10" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6" />
+            <property name="cacheSize" value="10" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7" />
+            <property name="cacheSize" value="10" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="ou" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="uid" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="objectClass" />
+            <property name="cacheSize" value="100" />
+          </bean>
+        </set>
+      </property>
+      <property name="contextEntry">
+        <value>
+          objectClass: top
+          objectClass: organizationalUnit
+          objectClass: extensibleObject
+          ou: system
+        </value>
+      </property>
+    </bean>
+
+
+    <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
+      <property name="name" value="example" />
+      <property name="cacheSize" value="100" />
+      <property name="suffix" value="dc=example,dc=com" />
+
+      <!-- the optimizer is enabled by default but may not always be what     -->
+      <!-- you want if your queries are really simple                         -->
+      <property name="optimizerEnabled" value="true" />
+
+      <!--
+        Synchronization on writes does not wait for synch operations
+        to flush dirty pages.  Writes persist immediately to disk at
+        a cost to performance with increased data integrity.  Otherwise
+        the periodic synch operation will flush dirty pages using the
+        synchPeriodMillis parameter in the main configuration.
+      -->
+      <property name="synchOnWrite" value="true" />
+      <property name="indexedAttributes">
+        <set>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5" />
+            <property name="cacheSize" value="10" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6" />
+            <property name="cacheSize" value="10" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7" />
+            <property name="cacheSize" value="10" />
+          </bean>
+
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="dc" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="ou" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="krb5PrincipalName" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="uid" />
+            <property name="cacheSize" value="100" />
+          </bean>
+          <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+            <property name="attributeId" value="objectClass" />
+            <property name="cacheSize" value="100" />
+          </bean>
+        </set>
+      </property>
+      <property name="contextEntry">
+        <value>
+          objectClass: top
+          objectClass: domain
+          objectClass: extensibleObject
+          dc: example
+        </value>
+      </property>
+    </bean>
+
+    <bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+      <property name="customEditors">
+        <map>
+          <entry key="javax.naming.directory.Attributes">
+            <bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
+          </entry>
+        </map>
+     </property>
+    </bean>
+<!--
   <bean id="environment" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
     <property name="properties">
       <props>
@@ -24,7 +492,6 @@
         <prop key="changepw.java.naming.security.credentials">secret</prop>
         <prop key="changepw.principal">kadmin/changepw@EXAMPLE.COM</prop>
 
-        <!-- All times are in minutes -->
         <prop key="kdc.allowable.clockskew">5</prop>
         <prop key="kdc.tgs.maximum.ticket.lifetime">1440</prop>
         <prop key="kdc.tgs.maximum.renewable.lifetime">10080</prop>
@@ -51,24 +518,24 @@
     <property name="enableNtp"><value>false</value></property>
     <property name="enableChangePassword"><value>true</value></property>
 
-    <!-- Uncomment below to have the server load entries on startup!        -->
-    <!-- ldifDirectory property can point to a relative file, directory or  -->
-    <!-- can point to an absolute path to either using the URL path         -->
-    <!-- notation: i.e. file:///Users/jack/apacheds/ldifs                   -->
-
-    <!-- Entries will optionally be filtered using LdifLoadFilters in the   -->
-    <!-- order specified.  The included Krb5KdcEntryFilter will filter      -->
-    <!-- kerberos principals creating keys for them using their             -->
-    <!-- userPassword attribute if present.                                 -->
+    <!- - Uncomment below to have the server load entries on startup!        - ->
+     ldifDirectory property can point to a relative file, directory or
+     can point to an absolute path to either using the URL path
+     notation: i.e. file:///Users/jack/apacheds/ldifs
+
+     Entries will optionally be filtered using LdifLoadFilters in the
+     order specified.  The included Krb5KdcEntryFilter will filter
+     kerberos principals creating keys for them using their
+     userPassword attribute if present.
 
-    <!-- If missing the Triplesec server will use LDIF files under the conf -->
-    <!-- directory where it has been installed.                             -->
+     If missing the Triplesec server will use LDIF files under the conf
+     directory where it has been installed.
 
-    <!--
+    <!- -
     <property name="ldifDirectory">
       <value>example.ldif</value>
     </property>
-    -->
+    - ->
     <property name="ldifFilters">
       <list>
         <bean class="org.apache.directory.server.protocol.shared.store.Krb5KdcEntryFilter"/>
@@ -95,10 +562,6 @@
     <property name="smtpConfiguration">
       <bean class="org.safehaus.triplesec.configuration.SmtpConfiguration">
         <property name="smtpAuthenticate"><value>false</value></property>
-        <!-- uncomment and set above property if authentication is required by mail server
-             <property name="smtpUsername"><value>hauskeys</value></property>
-             <property name="smtpPassword"><value>secret</value></property>
-             -->
              <property name="smtpHost"><value>localhost</value></property>
              <property name="smtpSubject"><value>Triplesec Account Activated</value></property>
              <property name="smtpFrom"><value>dev@safehaus.org</value></property>
@@ -110,7 +573,7 @@
         <ref bean="examplePartitionConfiguration"/>
       </set>
     </property>
-<!--
+<!- -
     <property name="bootstrapSchemas">
       <set>
         <bean class="org.apache.directory.server.core.schema.bootstrap.CorbaSchema"/>
@@ -125,7 +588,7 @@
         <bean class="org.safehaus.triplesec.store.schema.SafehausSchema"/>
       </set>
     </property>
--->
+- ->
 
     <property name="extendedOperationHandlers">
       <list>
@@ -249,4 +712,5 @@
       </map>
    </property>
   </bean>
+  -->
 </beans>

Modified: directory/sandbox/djencks/triplesec-jacc2/jacc/src/main/java/org/apache/directory/triplesec/jacc/TripleSecPolicyConfigurationFactory.java
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/jacc/src/main/java/org/apache/directory/triplesec/jacc/TripleSecPolicyConfigurationFactory.java?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/jacc/src/main/java/org/apache/directory/triplesec/jacc/TripleSecPolicyConfigurationFactory.java (original)
+++ directory/sandbox/djencks/triplesec-jacc2/jacc/src/main/java/org/apache/directory/triplesec/jacc/TripleSecPolicyConfigurationFactory.java Thu Aug  9 16:40:15 2007
@@ -35,10 +35,8 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.safehaus.triplesec.admin.DataAccessException;
 import org.safehaus.triplesec.admin.persistence.EntityManager;
 import org.safehaus.triplesec.admin.persistence.EntityManagerImpl;
-import org.safehaus.triplesec.admin.dao.DaoFactory;
 
 /**
  * @version $Rev$ $Date$

Modified: directory/sandbox/djencks/triplesec-jacc2/main/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/main/pom.xml?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/main/pom.xml (original)
+++ directory/sandbox/djencks/triplesec-jacc2/main/pom.xml Thu Aug  9 16:40:15 2007
@@ -74,10 +74,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-server-ssl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-core</artifactId>
     </dependency>
     <dependency>

Modified: directory/sandbox/djencks/triplesec-jacc2/main/src/main/java/org/safehaus/triplesec/Service.java
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/main/src/main/java/org/safehaus/triplesec/Service.java?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/main/src/main/java/org/safehaus/triplesec/Service.java (original)
+++ directory/sandbox/djencks/triplesec-jacc2/main/src/main/java/org/safehaus/triplesec/Service.java Thu Aug  9 16:40:15 2007
@@ -34,7 +34,9 @@
 import org.apache.directory.daemon.InstallationLayout;
 import org.apache.directory.server.core.configuration.ShutdownConfiguration;
 import org.apache.directory.server.core.configuration.SyncConfiguration;
+import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
 import org.apache.directory.server.kerberos.sam.SamSubsystem;
+import org.apache.directory.server.configuration.MutableServerStartupConfiguration;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.PropertiesUtils;
 
@@ -226,7 +228,7 @@
 
     public void init( InstallationLayout installationLayout, String[] args ) throws Exception
     {
-        MutableTriplesecStartupConfiguration cfg;
+        MutableServerStartupConfiguration cfg;
 
         log.debug( "init(InstallationLayout,String[]) called" );
         
@@ -247,7 +249,7 @@
             log.info( "server: loading settings from ", layout.getConfigurationFile() );
             ApplicationContext factory = null;
             factory = new FileSystemXmlApplicationContext( layout.getConfigurationFile().toURL().toString() );
-            cfg = ( MutableTriplesecStartupConfiguration ) factory.getBean( "configuration" );
+            cfg = (MutableServerStartupConfiguration) factory.getBean( "configuration" );
             env = ( Properties ) factory.getBean( "environment" );
         }
         else if ( args.length > 0 && new File( args[0] ).exists() ) // hack that takes server.xml file argument
@@ -255,7 +257,7 @@
             log.info( "server: loading settings from ", args[0] );
             ApplicationContext factory = null;
             factory = new FileSystemXmlApplicationContext( new File( args[0] ).toURL().toString() );
-            cfg = ( MutableTriplesecStartupConfiguration ) factory.getBean( "configuration" );
+            cfg = (MutableServerStartupConfiguration) factory.getBean( "configuration" );
             env = ( Properties ) factory.getBean( "environment" );
         }
         else
@@ -264,22 +266,22 @@
         }
 
         cfg.setShutdownHookEnabled( enableShutdownHook );
-		cfg.setEnableHttp( enableHttpService );
-        cfg.setLdifDirectory( layout.getConfigurationDirectory().getAbsoluteFile() );
+//		cfg.setEnableHttp( enableHttpService );
+//        cfg.setLdifDirectory( layout.getConfigurationDirectory().getAbsoluteFile() );
 
         if ( httpPortOverride != UNDEFINED_PORT_OVERRIDE )
         {
-            cfg.setHttpPort( httpPortOverride );
+//            cfg.setHttpPort( httpPortOverride );
         }
 
         if ( ldapPortOverride != UNDEFINED_PORT_OVERRIDE )
         {
-            cfg.setLdapPort( ldapPortOverride );
+//            cfg.setLdapPort( ldapPortOverride );
         }
 
         if ( ldapsPortOverride != UNDEFINED_PORT_OVERRIDE )
         {
-            cfg.setLdapsPort( ldapsPortOverride );
+//            cfg.setLdapsPort( ldapsPortOverride );
         }
 
         if ( layout != null )
@@ -293,21 +295,21 @@
 
         if ( krb5PortOverride != UNDEFINED_PORT_OVERRIDE )
         {
-            cfg.setEnableKerberos( true );
+//            cfg.setEnableKerberos( true );
             env.put( "kdc.ipPort", Integer.toString( krb5PortOverride ) );
             env.put( "kdc.ipPort", Integer.toString( krb5PortOverride ) );
         }
 
         if ( changepwPortOverride != UNDEFINED_PORT_OVERRIDE )
         {
-            cfg.setEnableChangePassword( true );
+//            cfg.setEnableChangePassword( true );
             env.put( "changepw.ipPort", Integer.toString( changepwPortOverride ) );
             env.put( "changepw.ipPort", Integer.toString( changepwPortOverride ) );
         }
 
         if ( ntpPortOverride != UNDEFINED_PORT_OVERRIDE )
         {
-            cfg.setEnableNtp( true );
+//            cfg.setEnableNtp( true );
             env.put( "ntp.ipPort", Integer.toString( ntpPortOverride ) );
             env.put( "ntp.ipPort", Integer.toString( ntpPortOverride ) );
         }
@@ -331,7 +333,7 @@
         }
 
         // set the user context for the sam subsystem
-        SamSubsystem.getInstance().setUserContext( userContext, "ou=users" );
+        SamSubsystem.getInstance().setUserContext( userContext, "ou=Users" );
 
         // setup demo profiles
         try
@@ -349,18 +351,18 @@
             System.exit( -7 );
         }
         
-        try
-        {
-            if ( cfg.isEnableHttp() )
-            {
-                setupHttpService( cfg.getHttpPort() );
-            }
-        }
-        catch ( Exception e )
-        {
-            e.printStackTrace();
-            System.exit( -8 );
-        }
+//        try
+//        {
+//            if ( cfg.isEnableHttp() )
+//            {
+//                setupHttpService( cfg.getHttpPort() );
+//            }
+//        }
+//        catch ( Exception e )
+//        {
+//            e.printStackTrace();
+//            System.exit( -8 );
+//        }
 
         workerThread = new Thread( worker, "SynchWorkerThread" );
 

Modified: directory/sandbox/djencks/triplesec-jacc2/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/pom.xml?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/pom.xml (original)
+++ directory/sandbox/djencks/triplesec-jacc2/pom.xml Thu Aug  9 16:40:15 2007
@@ -146,7 +146,7 @@
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-core</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
         <exclusions>
             <exclusion>
                 <groupId>org.apache.directory.server</groupId>
@@ -158,86 +158,81 @@
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-ldap</artifactId>
-        <version>0.9.6-SNAPSHOT</version>
+        <version>0.9.7-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-core-unit</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-kerberos-shared</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-protocol-kerberos</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-schema-bootstrap</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-schema-extras</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-bootstrap-extract</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-jdbm-store</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-schema-registries</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.directory.server</groupId>
-        <artifactId>apacheds-server-ssl</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-server-tools</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-core-shared</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-server-jndi</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-asn1-codec</artifactId>
-        <version>0.9.6-SNAPSHOT</version>
+        <version>0.9.7-SNAPSHOT</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.directory.daemon</groupId>
         <artifactId>daemon-bootstrappers</artifactId>
-        <version>1.1.0-SNAPSHOT</version>
+        <version>1.1.1-SNAPSHOT</version>
       </dependency>
 
       <dependency>
@@ -572,12 +567,12 @@
        <plugin>
         <groupId>org.apache.directory.daemon</groupId>
         <artifactId>daemon-plugin</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
        </plugin>
       <plugin>
         <groupId>org.apache.directory.server</groupId>
         <artifactId>apacheds-core-plugin</artifactId>
-        <version>1.5.0-SNAPSHOT</version>
+        <version>1.5.1-SNAPSHOT</version>
       </plugin>
 
       <plugin>
@@ -678,7 +673,7 @@
         <module>sms</module>
         <module>itest-data</module>
         <module>store</module>
-        <module>verifier</module>
+        <!--<module>verifier</module>-->
         <module>main</module>
         <module>integration</module>
         <module>tools</module>

Modified: directory/sandbox/djencks/triplesec-jacc2/store/src/main/java/org/safehaus/triplesec/store/interceptor/ApplicationAciManager.java
URL: http://svn.apache.org/viewvc/directory/sandbox/djencks/triplesec-jacc2/store/src/main/java/org/safehaus/triplesec/store/interceptor/ApplicationAciManager.java?view=diff&rev=564425&r1=564424&r2=564425
==============================================================================
--- directory/sandbox/djencks/triplesec-jacc2/store/src/main/java/org/safehaus/triplesec/store/interceptor/ApplicationAciManager.java (original)
+++ directory/sandbox/djencks/triplesec-jacc2/store/src/main/java/org/safehaus/triplesec/store/interceptor/ApplicationAciManager.java Thu Aug  9 16:40:15 2007
@@ -29,13 +29,21 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
+import javax.naming.directory.ModificationItem;
 
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.interceptor.context.OperationContext;
+import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.exception.LdapNameAlreadyBoundException;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
@@ -107,7 +115,7 @@
      * @param appDn the user provided DN string for the entry being added
      * @param appDn the normalized DN for the entry being added
      */
-    public void appAdded( LdapDN appDn ) throws NamingException
+    public void appAdded( OperationContext appDn ) throws NamingException
     {
         // get the current invocation object's proxy to access it's nexus proxy
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
@@ -120,7 +128,7 @@
      * Deletes the access control subentry added to the top most AAA for application access.  This
      * method should be invoked immediately after the application entry is removed.
      */
-    public void appRemoved( LdapDN appDn ) throws NamingException
+    public void appRemoved( OperationContext appDn ) throws NamingException
     {
         // get the current invocation object's proxy to access it's nexus proxy
         PartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();
@@ -164,11 +172,12 @@
 //    }
 
 
-    private void removeApplicationAdminGroup( PartitionNexusProxy proxy, LdapDN appDn ) throws NamingException
+    private void removeApplicationAdminGroup( PartitionNexusProxy proxy, OperationContext opContext ) throws NamingException
     {
+        LdapDN appDn = opContext.getDn();
         // bypass all interceptors and ask for the partition suffix for this application's entry
         // use the suffix to build the normalized DN for the administrator group for the application
-        LdapDN suffix = proxy.getSuffix( appDn, PartitionNexusProxy.BYPASS_ALL_COLLECTION );
+        LdapDN suffix = proxy.getSuffix( opContext, PartitionNexusProxy.BYPASS_ALL_COLLECTION );
         String appName = NamespaceTools.getRdnValue( appDn.get( appDn.size() - 1 ) );
         LdapDN groupDn = ( LdapDN ) suffix.clone();
         groupDn.add( "ou=groups" );
@@ -179,9 +188,11 @@
         buf.append( APPADMIN_GROUP_SUFFIX_LOWWER );
         groupDn.add( buf.toString() );
 
+        OperationContext groupContext = new DeleteOperationContext(groupDn);
+
         // blow away the group entry
         groupDn.normalize( registry.getNormalizerMapping() );
-        proxy.delete( groupDn, DEL_BYPASS );
+        proxy.delete( groupContext, DEL_BYPASS );
     }
 
 
@@ -190,22 +201,21 @@
      * from the name of the application.
      *
      * @param proxy the nexus proxy to perform an add operation if need be
-     * @param appDn the normalized name for the application
+     * @param opContext the OperationContext containing the normalized name for the application
      * @throws NamingException if add operations fail
      */
-    private void addApplicationAdminGroup( PartitionNexusProxy proxy, LdapDN appDn ) throws NamingException
+    private void addApplicationAdminGroup( PartitionNexusProxy proxy, OperationContext opContext ) throws NamingException
     {
+        LdapDN appDn = opContext.getDn();
         // bypass all interceptors and ask for the partition suffix for this application's entry
         // the suffix entry will be used as the administrative point for a ACSA starting at it
-        LdapDN suffix = proxy.getSuffix( appDn, PartitionNexusProxy.BYPASS_ALL_COLLECTION );
+        LdapDN suffix = proxy.getSuffix( opContext, PartitionNexusProxy.BYPASS_ALL_COLLECTION );
         String appUpName = NamespaceTools.getRdnValue( appDn.getRdn().getUpName() );
 
         // calculate the names of the group container and create ou=groups if we have to
         LdapDN groupDn = ( LdapDN ) suffix.clone();
         groupDn.add( "ou=groups" );
         groupDn.normalize( registry.getNormalizerMapping() );
-        createGroupsContainer( proxy, groupDn );
-
         // continue building the name for the new group entry off of ou=groups
         StringBuffer buf = new StringBuffer();
         Attribute cnAttr = new AttributeImpl( "cn" );
@@ -223,7 +233,11 @@
         group.put( cnAttr );
         // not need since admin can do anything but we need one member at least
         group.put( "uniqueMember", "uid=admin,ou=system" );
-        proxy.add( groupDn, group, ADD_BYPASS );
+
+        OperationContext groupContext = new AddOperationContext(groupDn, group);
+        createGroupsContainer( proxy, groupContext );
+
+        proxy.add( groupContext, ADD_BYPASS );
     }
 
 
@@ -231,11 +245,12 @@
      * Creates the group container ou=groups if it does not exist.
      *
      * @param proxy the nexus proxy to perform an add operation if need be
-     * @param groupDn the normalized name for ou=groups under a suffix
+     * @param opContext op context containing the normalized name for ou=groups under a suffix
      * @throws NamingException if add operations fail
      */
-    private void createGroupsContainer( PartitionNexusProxy proxy, LdapDN groupDn ) throws NamingException
+    private void createGroupsContainer( PartitionNexusProxy proxy, OperationContext opContext ) throws NamingException
     {
+        LdapDN groupDn = opContext.getDn();
         if ( groupsLut.contains( groupDn.getNormName() ) )
         {
             return;
@@ -246,9 +261,10 @@
         groups.get( "objectClass" ).add( "organizationalUnit" );
         groups.put( "ou", "Groups" );
 
+        OperationContext addContext = new AddOperationContext(groupDn, groups);
         try
         {
-            proxy.add( groupDn, groups, ADD_BYPASS );
+            proxy.add( addContext, ADD_BYPASS );
         }
         catch ( LdapNameAlreadyBoundException e )
         {
@@ -262,11 +278,12 @@
 
 
 
-    void removeApplicationSubentry( PartitionNexusProxy proxy, LdapDN appDn ) throws NamingException
+    void removeApplicationSubentry( PartitionNexusProxy proxy, OperationContext opContext ) throws NamingException
     {
+        LdapDN appDn = opContext.getDn();
         // bypass all interceptors and ask for the partition suffix for this application's entry
         // then calculate the normalized dn of the subentry to delete for this application
-        LdapDN suffix = proxy.getSuffix( appDn, PartitionNexusProxy.BYPASS_ALL_COLLECTION );
+        LdapDN suffix = proxy.getSuffix( opContext, PartitionNexusProxy.BYPASS_ALL_COLLECTION );
         String appName = NamespaceTools.getRdnValue( appDn.get( appDn.size() - 1 ) );
         StringBuffer buf = new StringBuffer();
         buf.append( "cn=" );
@@ -277,7 +294,8 @@
 
         // delete the access control subentry
         subentryDn.normalize( registry.getNormalizerMapping() );
-        proxy.delete( subentryDn, DEL_BYPASS );
+        OperationContext deleteContext = new DeleteOperationContext( subentryDn );
+        proxy.delete( deleteContext, DEL_BYPASS );
     }
 
 
@@ -286,14 +304,15 @@
      * is not the Administrative Point for the ACSA then it is promoted to one.
      *
      * @param proxy the nexus proxy to perform an add operation if need be
-     * @param appDn the normalized name for the application entry being added
+     * @param opContext the OperationContext holding the normalized name for the application entry being added
      * @throws NamingException if add operations fail
      */
-    void addApplicationSubentry( PartitionNexusProxy proxy, LdapDN appDn ) throws NamingException
+    void addApplicationSubentry( PartitionNexusProxy proxy, OperationContext opContext ) throws NamingException
     {
+        LdapDN appDn = opContext.getDn();
         // bypass all interceptors and ask for the partition suffix for this application's entry
         // the suffix entry will be used as the administrative point for a ACSA starting at it
-        LdapDN suffix = proxy.getSuffix( appDn, PartitionNexusProxy.BYPASS_ALL_COLLECTION );
+        LdapDN suffix = proxy.getSuffix( opContext, PartitionNexusProxy.BYPASS_ALL_COLLECTION );
         String appUpName = NamespaceTools.getRdnValue( appDn.getRdn().getUpName() );
         String appName = NamespaceTools.getRdnValue( appDn.get( appDn.size() - 1 ) );
         createAccessControlArea( proxy, suffix );
@@ -339,7 +358,8 @@
         LdapDN subentryDn = ( LdapDN ) suffix.clone();
         subentryDn.add( buf.toString() );
         subentryDn.normalize( registry.getNormalizerMapping() );
-        proxy.add( subentryDn, subentry, ADD_BYPASS );
+        OperationContext addContext = new AddOperationContext(subentryDn, subentry);
+        proxy.add( addContext, ADD_BYPASS );
     }
 
 
@@ -349,17 +369,18 @@
      * the entry is an ACSA AP, then the cache is updated.  If the entry is NOT an ACSA AP then
      * the entry at apDn is promoted to an ACSA.
      *
-     * @param apDn
+     * @param appDn info on where to do it
      * @throws NamingException
      */
-    private void createAccessControlArea( PartitionNexusProxy proxy, LdapDN apDn ) throws NamingException
+    private void createAccessControlArea( PartitionNexusProxy proxy, LdapDN appDn ) throws NamingException
     {
-        if ( acsaLut.contains( apDn.getNormName() ) )
+        if ( acsaLut.contains( appDn.getNormName() ) )
         {
             return;
         }
+        OperationContext lookupContext = new LookupOperationContext(appDn, RETURN_ADMINROLE);
 
-        Attributes acsa = proxy.lookup( apDn, RETURN_ADMINROLE, LOOKUP_BYPASS );
+        Attributes acsa = proxy.lookup( lookupContext, LOOKUP_BYPASS );
         Attribute administrativeRole = AttributeUtils.getAttribute( acsa, administrativeRoleType );
         if ( administrativeRole != null )
         {
@@ -368,16 +389,18 @@
                 String role = ( String ) administrativeRole.get( ii );
                 if ( role.equalsIgnoreCase( "accessControlSpecificArea" ) )
                 {
-                    acsaLut.add( apDn.toString() );
+                    acsaLut.add( appDn.toString() );
                     return;
                 }
             }
         }
 
-        Attributes mods = new AttributesImpl();
-        mods.put( "administrativeRole", "accessControlSpecificArea" );
-        proxy.modify( apDn, DirContext.ADD_ATTRIBUTE, mods );
-        acsaLut.add( apDn.getNormName() );
+//        Attributes mods = new AttributesImpl();
+//        mods.put( "administrativeRole", "accessControlSpecificArea" );
+        ModificationItemImpl[] mods = new ModificationItemImpl[] { new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, new AttributeImpl( "administrativeRole", "accessControlSpecificArea" )) };
+        OperationContext modContext = new ModifyOperationContext(appDn, mods);
+        proxy.modify( modContext );
+        acsaLut.add( appDn.getNormName() );
     }
 
 



Mime
View raw message