You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "mbah tenjoh-okwen (JIRA)" <ji...@apache.org> on 2006/10/07 20:26:19 UTC

[jira] Created: (DIRSERVER-758) schema checking

schema checking
---------------

                 Key: DIRSERVER-758
                 URL: http://issues.apache.org/jira/browse/DIRSERVER-758
             Project: Directory ApacheDS
          Issue Type: Bug
         Environment: windows xp 
            Reporter: mbah tenjoh-okwen
            Priority: Minor


Hi,

 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.

Illustration

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)
    {
        try
        {
            //use properties file to set connection
            InputStream inputStream = new FileInputStream( "apacheds.properties");
            Properties properties = new Properties();
            properties.load(inputStream);
            
           
            //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");
            attrs.put(obj);
            attrs.put(ob);
            attrs.put(ob1);
            String rdns="uid=kevin";
           
            //create subcontext
            DirContext result=ctx.createSubcontext(rdns, attrs);
            result.close();
        }catch(Exception e)
        {
            System.out.println(e);
        }
}



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (DIRSERVER-758) schema checking

Posted by Mbah Tenjoh-Okwen <te...@googlemail.com>.
hi

Im using the 1.0 version (the most recent one)

thanks







On 11/7/06, Emmanuel Lecharny (JIRA) <ji...@apache.org> wrote:
>
>     [
> http://issues.apache.org/jira/browse/DIRSERVER-758?page=comments#action_12447588]
>
> Emmanuel Lecharny commented on DIRSERVER-758:
> ---------------------------------------------
>
> Hi,
>
> sorry for the delay, we were very busy delivering 1.0...
>
> Which version o ADS are you using? Is the described behavior reproductible
> in 1.0?
>
> Thanks !
>
> > schema checking
> > ---------------
> >
> >                 Key: DIRSERVER-758
> >                 URL: http://issues.apache.org/jira/browse/DIRSERVER-758
> >             Project: Directory ApacheDS
> >          Issue Type: Bug
> >         Environment: windows xp
> >            Reporter: mbah tenjoh-okwen
> >            Priority: Minor
> >
> > Hi,
> >  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.
> > Illustration
> > 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)
> >     {
> >         try
> >         {
> >             //use properties file to set connection
> >             InputStream inputStream = new FileInputStream( "
> apacheds.properties");
> >             Properties properties = new Properties();
> >             properties.load(inputStream);
> >
> >
> >             //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");
> >             attrs.put(obj);
> >             attrs.put(ob);
> >             attrs.put(ob1);
> >             String rdns="uid=kevin";
> >
> >             //create subcontext
> >             DirContext result=ctx.createSubcontext(rdns, attrs);
> >             result.close();
> >         }catch(Exception e)
> >         {
> >             System.out.println(e);
> >         }
> > }
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

[jira] Closed: (DIRSERVER-758) schema checking

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRSERVER-758.
---------------------------------------

    Resolution: Fixed

Version 1.0.1 and 1.5.0 has been fixed.

> schema checking
> ---------------
>
>                 Key: DIRSERVER-758
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-758
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: windows xp 
>            Reporter: mbah tenjoh-okwen
>         Assigned To: Emmanuel Lecharny
>            Priority: Blocker
>             Fix For: 1.0.1, 1.5.0
>
>
> Hi,
>  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.
> Illustration
> 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)
>     {
>         try
>         {
>             //use properties file to set connection
>             InputStream inputStream = new FileInputStream( "apacheds.properties");
>             Properties properties = new Properties();
>             properties.load(inputStream);
>             
>            
>             //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");
>             attrs.put(obj);
>             attrs.put(ob);
>             attrs.put(ob1);
>             String rdns="uid=kevin";
>            
>             //create subcontext
>             DirContext result=ctx.createSubcontext(rdns, attrs);
>             result.close();
>         }catch(Exception e)
>         {
>             System.out.println(e);
>         }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DIRSERVER-758) schema checking

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny reassigned DIRSERVER-758:
-------------------------------------------

    Assignee: Emmanuel Lecharny

> schema checking
> ---------------
>
>                 Key: DIRSERVER-758
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-758
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: windows xp 
>            Reporter: mbah tenjoh-okwen
>         Assigned To: Emmanuel Lecharny
>            Priority: Minor
>
> Hi,
>  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.
> Illustration
> 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)
>     {
>         try
>         {
>             //use properties file to set connection
>             InputStream inputStream = new FileInputStream( "apacheds.properties");
>             Properties properties = new Properties();
>             properties.load(inputStream);
>             
>            
>             //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");
>             attrs.put(obj);
>             attrs.put(ob);
>             attrs.put(ob1);
>             String rdns="uid=kevin";
>            
>             //create subcontext
>             DirContext result=ctx.createSubcontext(rdns, attrs);
>             result.close();
>         }catch(Exception e)
>         {
>             System.out.println(e);
>         }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-758) schema checking

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465808 ] 

Emmanuel Lecharny commented on DIRSERVER-758:
---------------------------------------------

I confirm that there is no such control in ADS. You can define any attribute you want without any limitation. 

Oh, btw, seems to be a bug :(

> schema checking
> ---------------
>
>                 Key: DIRSERVER-758
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-758
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: windows xp 
>            Reporter: mbah tenjoh-okwen
>            Priority: Minor
>
> Hi,
>  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.
> Illustration
> 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)
>     {
>         try
>         {
>             //use properties file to set connection
>             InputStream inputStream = new FileInputStream( "apacheds.properties");
>             Properties properties = new Properties();
>             properties.load(inputStream);
>             
>            
>             //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");
>             attrs.put(obj);
>             attrs.put(ob);
>             attrs.put(ob1);
>             String rdns="uid=kevin";
>            
>             //create subcontext
>             DirContext result=ctx.createSubcontext(rdns, attrs);
>             result.close();
>         }catch(Exception e)
>         {
>             System.out.println(e);
>         }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DIRSERVER-758) schema checking

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-758?page=comments#action_12447588 ] 
            
Emmanuel Lecharny commented on DIRSERVER-758:
---------------------------------------------

Hi,

sorry for the delay, we were very busy delivering 1.0...

Which version o ADS are you using? Is the described behavior reproductible in 1.0?

Thanks !

> schema checking
> ---------------
>
>                 Key: DIRSERVER-758
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-758
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: windows xp 
>            Reporter: mbah tenjoh-okwen
>            Priority: Minor
>
> Hi,
>  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.
> Illustration
> 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)
>     {
>         try
>         {
>             //use properties file to set connection
>             InputStream inputStream = new FileInputStream( "apacheds.properties");
>             Properties properties = new Properties();
>             properties.load(inputStream);
>             
>            
>             //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");
>             attrs.put(obj);
>             attrs.put(ob);
>             attrs.put(ob1);
>             String rdns="uid=kevin";
>            
>             //create subcontext
>             DirContext result=ctx.createSubcontext(rdns, attrs);
>             result.close();
>         }catch(Exception e)
>         {
>             System.out.println(e);
>         }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DIRSERVER-758) schema checking

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-758:
----------------------------------------

    Fix Version/s: 1.5.0
                   1.0.1
         Priority: Blocker  (was: Minor)

> schema checking
> ---------------
>
>                 Key: DIRSERVER-758
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-758
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: windows xp 
>            Reporter: mbah tenjoh-okwen
>         Assigned To: Emmanuel Lecharny
>            Priority: Blocker
>             Fix For: 1.0.1, 1.5.0
>
>
> Hi,
>  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.
> Illustration
> 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)
>     {
>         try
>         {
>             //use properties file to set connection
>             InputStream inputStream = new FileInputStream( "apacheds.properties");
>             Properties properties = new Properties();
>             properties.load(inputStream);
>             
>            
>             //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");
>             attrs.put(obj);
>             attrs.put(ob);
>             attrs.put(ob1);
>             String rdns="uid=kevin";
>            
>             //create subcontext
>             DirContext result=ctx.createSubcontext(rdns, attrs);
>             result.close();
>         }catch(Exception e)
>         {
>             System.out.println(e);
>         }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-758) schema checking

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466716 ] 

Emmanuel Lecharny commented on DIRSERVER-758:
---------------------------------------------

This issue has been fixed in 1.0-trunks, and the patches are being back ported to 1.5 atm

> schema checking
> ---------------
>
>                 Key: DIRSERVER-758
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-758
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: windows xp 
>            Reporter: mbah tenjoh-okwen
>         Assigned To: Emmanuel Lecharny
>            Priority: Blocker
>             Fix For: 1.0.1, 1.5.0
>
>
> Hi,
>  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.
> Illustration
> 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)
>     {
>         try
>         {
>             //use properties file to set connection
>             InputStream inputStream = new FileInputStream( "apacheds.properties");
>             Properties properties = new Properties();
>             properties.load(inputStream);
>             
>            
>             //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");
>             attrs.put(obj);
>             attrs.put(ob);
>             attrs.put(ob1);
>             String rdns="uid=kevin";
>            
>             //create subcontext
>             DirContext result=ctx.createSubcontext(rdns, attrs);
>             result.close();
>         }catch(Exception e)
>         {
>             System.out.println(e);
>         }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.