Issue Details (XML | Word | Printable)

Key: DIRSERVER-360
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alex Karasulu
Reporter: Stefan Zoerner
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

If anonymous access is disabled, reading the Root DSE is forbidden by the server

Created: 24/Oct/05 03:49 AM   Updated: 02/Oct/06 01:10 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 28/Oct/05 08:38 AM


 Description  « Hide
If anonymous access is disabled, i.e. configuration is
 <property name="allowAnonymousAccess"><value>false</value></property>
a client which binds anonymously is not allowed to fetch any Root DSE data.

$ ldapsearch -b "" -s base -p 10389 "(objectclass=*)"
ldap_simple_bind: Insufficient access

It is expected that a client is at least able to read the attribute supportedSASLMechanisms if connected anonymously. This is because s/he can then decide which mechanism fits his/her needs best, before authentication. Here is what RFC 2829 says:

5. Anonymous authentication
   ...
   LDAP implementations MUST support anonymous authentication, as
   defined in section 5.1.
   ...
   While there MAY be access control restrictions to prevent access to
   directory entries, an LDAP server SHOULD allow an anonymously-bound
   client to retrieve the supportedSASLMechanisms attribute of the root
   DSE.
   ...

It is quite normal, that LDAP servers present the other information advertised in the Root DSE to anonymously connected clients as well (e.g. supportedLDAPVersion, namingContexts), even if anonymous binds are not allowed (e.g. default configuration of Active Directory).

But it seems to be up to us, which information we give anonymously bind users (except supportedSASLMechanisms), this is what RFC 2251 says:

3.4. Server-specific Data Requirements

   An LDAP server MUST provide information about itself and other
   information that is specific to each server. This is represented as
   a group of attributes located in the root DSE (DSA-Specific Entry),
   which is named with the zero-length LDAPDN. These attributes are
   retrievable if a client performs a base object search of the root
   with filter "(objectClass=*)", however they are subject to access
   control restrictions.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #328138 Mon Oct 24 19:20:33 UTC 2005 akarasulu changes ...

 o fixes DIREVE-283
 o made search handler use a special getLdapContext method when the search
   operation is on the root DSE with (objectClass=*), scope = base, and
   base = ""
 o allowed bind operation as anonymous even when anonymous binds are disabled
   in the configuration ... delayed checks for anonymous user operations until
   other operations are performed.
 o added test case to make sure anonymous access is still disabled for binds
   to anything other than root dse
Files Changed
MODIFY /directory/apacheds/trunk/main/src/test/org/apache/ldap/server/MiscTest.java
MODIFY /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/BindHandler.java
MODIFY /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/SessionRegistry.java
MODIFY /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/SearchHandler.java

Repository Revision Date User Message
ASF #328742 Wed Oct 26 21:29:07 UTC 2005 szoerner Added a new test method testAnonymousBindsEnabledBaseSearch in order to cover a problem which is described in DIREVE-283.
It is commented out because it currently fails.
Files Changed
MODIFY /directory/apacheds/trunk/main/src/test/org/apache/ldap/server/MiscTest.java

Repository Revision Date User Message
ASF #328979 Thu Oct 27 23:37:40 UTC 2005 akarasulu changes ...

 o Fixed DIREVE-283 hopefully once and for all
 o Uncommented test case added by szoerner to test for DIREVE-283 case which
   now passes
Files Changed
MODIFY /directory/apacheds/trunk/main/src/test/org/apache/ldap/server/MiscTest.java
MODIFY /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/SessionRegistry.java