Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 57356 invoked from network); 18 Aug 2007 08:02:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Aug 2007 08:02:50 -0000 Received: (qmail 63569 invoked by uid 500); 18 Aug 2007 08:02:47 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 63523 invoked by uid 500); 18 Aug 2007 08:02:47 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 63512 invoked by uid 99); 18 Aug 2007 08:02:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Aug 2007 01:02:47 -0700 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=SPF_PASS,URIBL_RHS_DOB X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [69.147.95.64] (HELO smtp101.plus.mail.sp1.yahoo.com) (69.147.95.64) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 18 Aug 2007 08:03:06 +0000 Received: (qmail 22071 invoked from network); 18 Aug 2007 08:02:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=FAP0HSHWsv/RpgUG7eRfvP6F/AurC/A9nBdEf22pDO2c5I/1hiPVWwqm6rThqiH1lSsiJwiGPN8WivjPddLOry40nr+oAV8Ihy3+TjTnxRj8Ppnq9tS9B9Nwr1ukwW9/AD10oLOwQapP9rX4Fe1RdMNV4eeb0nWXePoBHqZcACY= ; Received: from unknown (HELO ?192.168.1.106?) (david_jencks@67.102.173.8 with plain) by smtp101.plus.mail.sp1.yahoo.com with SMTP; 18 Aug 2007 08:02:18 -0000 X-YMail-OSG: eb.p5_MVM1kBXTwwCtcQ8QKaPdxtYu7MtQX.UmDck85R90wEAXIv6t0wSbgacOtTizW5WT6Hv0w_OxQmUwJKtYj.cfFzDSmNFbzdCwUM.HDGfQMbRg-- Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <6C128B54-7781-425A-A06E-E1A3B1E83634@yahoo.com> Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: Simplified server configuration with xbean-spring Date: Sat, 18 Aug 2007 01:02:27 -0700 To: "Apache Directory Developers List" X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org So its been a while and IIUC the config-in-ldap solutions aren't quite done for 1.5.1. There have been some changes to e.g. interceptor configs that make this patch as it stands not quite work but if there's any interest in getting this into 1.5.1 I'm happy to update the patch so it works again and apply it. Please take a look at the server.xml below and see what you think. Even if everyone would prefer to stick with shipping the generic server.xml what about applying the rest of the patch, adding javadoc "annotations" and running the maven-xbean plugin on the code to make it possible to use server.xml of the form below? thanks david jencks On Jun 28, 2007, at 4:17 PM, David Jencks wrote: > A while back there was some discussion of whether server.xml could > be made to be more semantically meaningful with less generic cruft, > and I suggested looking into xbean-spring. So, I spent a bit of > time on it and implemented this. See https://issues.apache.org/ > jira/browse/DIRSERVER-984 > > This was pretty easy to do, after fixing some problems in xbean. > Basically all I did was add some javadoc "annotations" to tell > xbean which classes to look at and what type collections contain, > and change to the xbean application context from the plain spring one. > > xbean generates a schema for the configurable objects so you can > consult the schema to see what can be configured. As you can see, > you can mix regular spring configuration and the xbean style in the > same server.xml. > > There's a lot more customization possible, I basically did the > minimum possible to get it to work. Pretty much anything can have > a different name. The main ugliness I see is the handling of > properties that are lists (or sets) of strings. > > So, at the risk of posting too large a message, here's the shiny > new server.xml (I removed some commented out bits) : > > > > "http://www.springframework.org/dtd/spring-beans.dtd"> > > > > class="org.springframework.beans.factory.config.PropertiesFactoryBean" > > > > > > simple > key="java.naming.security.principal">uid=admin,ou=system > secret > > > > > > xmlns="http://apacheds.org/config/1.0" > workingDirectory="example.com" > synchPeriodMillis="5000" > maxThreads="8" > allowAnonymousAccess="false" > accessControlEnabled="false" > denormalizeOpAttrsEnabled="false" > > > > enabled="false" > ipPort="123"> > > > > > enabled="false" > ipPort="53"> > > > > > enabled="false" > ipPort="464"> > > > > > enabled="false" > ipPort="88"> > > > > > ipPort="10389" > allowAnonymousAccess="false" > saslHost="ldap.example.com" > saslPrincipal="ldap/ldap.example.com@EXAMPLE.COM" > searchBaseDn="ou=users,ou=system" > maxTimeLimit="15000" > maxSizeLimit="1000"> > > > > SIMPLE > CRAM-MD5 > DIGEST-MD5 > > > > > > auth > auth-int > auth-conf > > > > > example.com > apache.org > > > > > > > > > > > > enabled="false" > ipPort="636" > enableLdaps="true"> > > > > > > > id="systemPartitionConfiguration" > name="system" > cacheSize="100" > suffix="ou=system" > optimizerEnabled="true" > synchOnWrite="true"> > > attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" > cacheSize="100"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" > cacheSize="100"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" > cacheSize="100"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" > cacheSize="100"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" > cacheSize="10"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" > cacheSize="10"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" > cacheSize="10"/> > attributeId="ou" > cacheSize="100"/> > attributeId="uid" > cacheSize="100"/> > attributeId="objectClass" > cacheSize="100"/> > > > > objectClass: top > objectClass: organizationalUnit > objectClass: extensibleObject > ou: system > > > > > > > id="examplePartitionConfiguration" > name="example" > cacheSize="100" > suffix="dc=example,dc=com" > optimizerEnabled="true" > synchOnWrite="true"> > > attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" > cacheSize="100"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" > cacheSize="100"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" > cacheSize="100"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" > cacheSize="100"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" > cacheSize="10"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" > cacheSize="10"/> > attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" > cacheSize="10"/> > attributeId="dc" > cacheSize="100"/> > attributeId="ou" > cacheSize="100"/> > attributeId="krb5PrincipalName" > cacheSize="100"/> > attributeId="uid" > cacheSize="100"/> > attributeId="objectClass" > cacheSize="100"/> > > > > objectClass: top > objectClass: domain > objectClass: extensibleObject > dc: example > > > > > > > name="normalizationService"> > > > > > name="authenticationService"> > > > > > name="referralService"> > > > > > name="authorizationService"> > > > > > name="defaultAuthorizationService"> > > > > > name="exceptionService"> > > > > > name="operationalAttributeService"> > > > > > name="schemaService"> > > > > > name="subentryService"> > > > > > name="collectiveAttributeService"> > > > > > name="eventService"> > > > > > name="triggerService"> > > > > > > > > > > > class="org.springframework.beans.factory.config.CustomEditorConfigurer > "> > > > > class="org.apache.directory.server.core.configuration.AttributesProper > tyEditor"/> > > > > > > > > Comments? > > thanks > david jencks > >