directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mbah tenjoh-okwen (JIRA)" <>
Subject [jira] Created: (DIRSERVER-758) schema checking
Date Sat, 07 Oct 2006 18:26:19 GMT
schema checking

                 Key: DIRSERVER-758
             Project: Directory ApacheDS
          Issue Type: Bug
         Environment: windows xp 
            Reporter: mbah tenjoh-okwen
            Priority: Minor


 I understand that "LDAP directories use the concept of object classes to
 define which attributes are allowed for objects of any given type"
consequently , I would like to know if the following behavior is normal:

 in ApacheDS I am able to make use of any attribute without having added
 the object classes which provide these attributes.


say I have  an entry uid=kevin, ou=users,ou=sample
 kevin has the following attributes  cn=kevin spacey, dc=ke, objectclass=top

 Is it normal for apacheDS to allow me add cn and dc attributes even
 though I havent added the object classes Person and domain ?

Please start a new thread when you change the topic.

Schema checking should prevent this if it is enabled and by default it
is in ApacheDS.  If it's not doing that then we have a bug.

here is the code

public class CreateSubcontext {

     * @param args
    public static void main(String[] args)
            //use properties file to set connection
            InputStream inputStream = new FileInputStream( "");
            Properties properties = new Properties();
            //create context
            DirContext ctx=new InitialDirContext(properties);
            //mould entry
            Attributes attrs=new BasicAttributes(true);
            Attribute obj=new BasicAttribute("ObjectClass", "top");
            Attribute ob = new BasicAttribute("cn", "kevin Spacey");
            Attribute ob1 = new BasicAttribute("dc", "ke");
            String rdns="uid=kevin";
            //create subcontext
            DirContext result=ctx.createSubcontext(rdns, attrs);
        }catch(Exception e)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message