Thanks for taking interest, Emmanuel.

Lets try to keep this as a small self-contained topics to help others find solutions to their own problems.

I have attached the log for directory startup and the associated server.xml. You will see allowAnonymousAccess="true", although it is logged as false. Also accessControlEnabled="true" but it is not logged at all.

A) I presume this logging occurs when the properties are processed during initialisation and so does not depend on the contents of my directory.

B) Because the documentation was not helpful (a week ago), I had to use my judgement to change the sample server.xml to get my own directory root created (o=pingtoo.com). The directory runs fine, so I assume I got it mostly right, but it is possible (not likely) that I broke the properties in question.

C) How can I discover the state of the accessControlEnabled property on my running directory? Why is it not logged during initialisation?

D) You are probably running the 1.5.4 candidate, so can you tell me if these two properties are being logged correctly on your own system?

Regards,

Brian

[08:24:42] INFO [org.apache.directory.server.Service] - server: loading 
settings from 
[08:24:42] INFO 
[org.apache.xbean.spring.context.FileSystemXmlApplicationContext] - Refreshing 
[EMAIL PROTECTED]: display name [EMAIL PROTECTED]; startup date [Tue Sep 02 
08:24:42 BST 2008]; root of context hierarchy
[08:24:43] INFO 
[org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader] - Loading XML 
bean definitions from URL [file:/var/lib/apacheds-1.5.3/default/conf/server.xml]
[08:24:44] INFO 
[org.apache.xbean.spring.context.FileSystemXmlApplicationContext] - Bean 
factory for application context [EMAIL PROTECTED]: [EMAIL PROTECTED]
[08:24:45] INFO [org.apache.directory.server.configuration.ApacheDS] - Starting 
the Apache Directory Server
[08:24:45] INFO [org.apache.directory.server.configuration.ApacheDS] - Set the 
allowAnonymousAccess flag to false
[08:24:45] INFO [org.apache.directory.server.configuration.ApacheDS] - Set the 
synchPeriodMillis to 15000
[08:24:45] INFO [org.apache.directory.server.core.DefaultDirectoryService] - 
ApacheDS shutdown hook has been registered with the runtime.
[08:24:52] INFO [org.apache.directory.server.configuration.ApacheDS] - LDIF 
load directory not specified.  No LDIF files will be loaded.
[08:24:52] INFO [org.apache.directory.server.ldap.LdapServer] - Added Extended 
Request Handler: 1.3.6.1.4.1.1466.20037
[08:24:52] INFO [org.apache.directory.server.ldap.LdapServer] - Added Extended 
Request Handler: 1.3.6.1.4.1.18060.0.1.3
[08:24:52] INFO [org.apache.directory.server.ldap.LdapServer] - Added Extended 
Request Handler: 1.3.6.1.4.1.18060.0.1.1
[08:24:52] INFO [org.apache.directory.server.ldap.LdapServer] - Successful bind 
of an LDAP Service (10389) is complete.
[08:24:52] INFO [org.apache.directory.server.ldap.LdapServer] - Successful bind 
of an LDAP Service (10636) is complete.
[08:24:52] INFO [org.apache.directory.server.Service] - server: started in 
10177 milliseconds
<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
-->


<spring:beans xmlns:spring="http://xbean.apache.org/schemas/spring/1.0"; 
			  xmlns:s="http://www.springframework.org/schema/beans";
			  xmlns="http://apacheds.org/config/1.0";>

  <defaultDirectoryService id="directoryService" instanceId="default"
                           workingDirectory="pingtoo.com"
                           allowAnonymousAccess="true"
                           accessControlEnabled="true"
                           denormalizeOpAttrsEnabled="false">
    <systemPartition>
      <!-- use the following partitionConfiguration to override defaults for -->
      <!-- the system partition                                              -->
      <jdbmPartition id="system" cacheSize="100" suffix="ou=system" optimizerEnabled="true" syncOnWrite="true">
        <indexedAttributes>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
          <jdbmIndex attributeId="ou" cacheSize="100"/>
          <jdbmIndex attributeId="uid" cacheSize="100"/>
          <jdbmIndex attributeId="objectClass" cacheSize="100"/>
        </indexedAttributes>
        <contextEntry>#systemContextEntry</contextEntry>
        <!-- contextEntry>
          <s:value>
            objectClass: top
            objectClass: organizationalUnit
            objectClass: extensibleObject
            ou: system
          </s:value>
        </contextEntry -->
      </jdbmPartition>
    </systemPartition>

    <partitions>
      <!-- NOTE: when specifying new partitions you need not include those   -->
      <!-- attributes below with OID's which are the system indices, if left -->
      <!-- out they will be automatically configured for you with defaults.  -->
      <jdbmPartition id="pingtoo" cacheSize="100" suffix="o=PingToo.com" optimizerEnabled="true"
                     syncOnWrite="true">
        <indexedAttributes>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.1" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.2" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.3" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.4" cacheSize="100"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.5" cacheSize="10"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.6" cacheSize="10"/>
          <jdbmIndex attributeId="1.3.6.1.4.1.18060.0.4.1.2.7" cacheSize="10"/>
          <jdbmIndex attributeId="dc" cacheSize="100"/>
          <jdbmIndex attributeId="ou" cacheSize="100"/>
          <jdbmIndex attributeId="krb5PrincipalName" cacheSize="100"/>
          <jdbmIndex attributeId="uid" cacheSize="100"/>
          <jdbmIndex attributeId="objectClass" cacheSize="100"/>
        </indexedAttributes>
        <contextEntry>#pingtooContextEntry</contextEntry>
        <!-- contextEntry>
          <s:value>
            objectClass: top
            objectClass: organization
            objectClass: extensibleObject
            o: PingToo.com
          </s:value>
        </contextEntry -->
      </jdbmPartition>
    </partitions>

    <interceptors>
      <normalizationInterceptor/>
      <authenticationInterceptor/>
      <referralInterceptor/>
      <aciAuthorizationInterceptor/>
      <defaultAuthorizationInterceptor/>
      <exceptionInterceptor/>
      <operationalAttributeInterceptor/>

      <!-- Uncomment to enable the password policy interceptor
      <passwordPolicyInterceptor/>
      <keyDerivationInterceptor/>
      -->

      <schemaInterceptor/>
      <subentryInterceptor/>
      <collectiveAttributeInterceptor/>
      <eventInterceptor/>
      <triggerInterceptor/>

      <!-- Uncomment to enable replication interceptor
      <replicationInterceptor>
        <configuration>
          <replicationConfiguration serverPort="10390" peerReplicas="[EMAIL PROTECTED]:10392">
            <replicaId>
              <replicaId id="instance_a"/>
            </replicaId>
          </replicationConfiguration>
        </configuration>
      </replicationInterceptor>
      -->
    </interceptors>
  </defaultDirectoryService>

  <standardThreadPool id="standardThreadPool" maxThreads="8"/>
  <datagramAcceptor id="datagramAcceptor" logicExecutor="#standardThreadPool"/>
  <socketAcceptor id="socketAcceptor" logicExecutor="#standardThreadPool"/>

<!--  missing  atou=users,dc=example,dc=com
  <changePasswordServer ipPort="60464">
    <directoryService>#directoryService</directoryService>
    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
    <socketAcceptor>#socketAcceptor</socketAcceptor>
  </changePasswordServer>
-->
<!--  missing atou=users,dc=example,dc=com
  <kdcServer ipPort="60088">
    <directoryService>#directoryService</directoryService>
    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
    <socketAcceptor>#socketAcceptor</socketAcceptor>
  </kdcServer>
-->
  <ntpServer ipPort="60123">
    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
    <socketAcceptor>#socketAcceptor</socketAcceptor>
  </ntpServer>
<!--  missing atou=users,dc=example,dc=com
  <dnsServer ipPort="8053">
    <directoryService>#directoryService</directoryService>
    <datagramAcceptor>#datagramAcceptor</datagramAcceptor>
    <socketAcceptor>#socketAcceptor</socketAcceptor>
  </dnsServer>
-->

  <ldapServer id="ldapsServer"
              enabled="true"
              ipPort="10636"
              enableLdaps="true">
    <directoryService>#directoryService</directoryService>
    <socketAcceptor>#socketAcceptor</socketAcceptor>
  </ldapServer>


  <ldapServer id="ldapServer"
              ipPort="10389"
              allowAnonymousAccess="false"
              saslHost="ldap.pingtoo.com"
              saslPrincipal="ldap/[EMAIL PROTECTED]"
              searchBaseDn="ou=users,ou=system"
              maxTimeLimit="15000"
              maxSizeLimit="1000">

    <directoryService>#directoryService</directoryService>
    <socketAcceptor>#socketAcceptor</socketAcceptor>

    <!-- The list of supported authentication mechanisms.                   -->
    <saslMechanismHandlers>
      <simpleMechanismHandler mech-name="SIMPLE"/>
      <cramMd5MechanismHandler mech-name="CRAM-MD5" directoryService="#directoryService"/>
      <digestMd5MechanismHandler mech-name="DIGEST-MD5" directoryService="#directoryService"/>
      <gssapiMechanismHandler mech-name="GSSAPI" directoryService="#directoryService"/>
      <ntlmMechanismHandler mech-name="NTLM" ntlmProviderFqcn="com.foo.Bar"/>
      <ntlmMechanismHandler mech-name="GSS-SPNEGO" ntlmProviderFqcn="com.foo.Bar"/>
    </saslMechanismHandlers>

    <!-- The desired quality-of-protection, used by DIGEST-MD5 and GSSAPI.  -->
    <saslQop>
      <s:value>auth</s:value>
      <s:value>auth-int</s:value>
      <s:value>auth-conf</s:value>
    </saslQop>

    <!-- The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI. -->
    <saslRealms>
      <s:value>pingtoo.com</s:value>
      <s:value>apache.org</s:value>
    </saslRealms>

    <!-- the collection of extended operation handlers to install           -->
    <extendedOperationHandlers>
      <startTlsHandler/>
      <gracefulShutdownHandler/>
      <launchDiagnosticUiHandler/>
      <!-- The Stored Procedure Extended Operation is not stable yet and it may cause security risks.-->
      <!--storedProcedureExtendedOperationHandler/-->
    </extendedOperationHandlers>
  </ldapServer>


  <apacheDS id="apacheDS"
            synchPeriodMillis="15000"
            allowAnonymousAccess="false">

    <directoryService>#directoryService</directoryService>
    <ldapServer>#ldapServer</ldapServer>
    <ldapsServer>#ldapsServer</ldapsServer>
  </apacheDS>

  <spring:bean id="systemContextEntry" 
	class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
    <spring:property name="targetObject"><spring:ref local='directoryService'/></spring:property>
    <spring:property name="targetMethod"><spring:value>newEntry</spring:value></spring:property>
    <spring:property name="arguments">
      <spring:list>
        <spring:value xmlns="http://www.springframework.org/schema/beans";>
          objectClass: top
          objectClass: organizationalUnit
          objectClass: extensibleObject
          ou: system
        </spring:value>
        <spring:value>ou=system</spring:value>
      </spring:list>
    </spring:property>
  </spring:bean>
  
  <spring:bean id="pingtooContextEntry" 
	class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
    <spring:property name="targetObject"><spring:ref local='directoryService'/></spring:property>
    <spring:property name="targetMethod"><spring:value>newEntry</spring:value></spring:property>
    <spring:property name="arguments">
      <spring:list>
        <spring:value xmlns="http://www.springframework.org/schema/beans";>
          objectClass: top
          objectClass: organization
          objectClass: extensibleObject
          o: PingToo.com
        </spring:value>
        <spring:value>o=PingToo.com</spring:value>
      </spring:list>
    </spring:property>
  </spring:bean>

  <!-- another bean I didn't convert -->
  <spring:bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
    <spring:property name="customEditors">
      <spring:map>
        <spring:entry key="javax.naming.directory.Attributes">
          <spring:bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
        </spring:entry>
      </spring:map>
    </spring:property>
  </spring:bean>
</spring:beans>

Reply via email to