From dev-return-14148-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Tue Nov 07 10:22:14 2006 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 99212 invoked from network); 7 Nov 2006 10:22:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2006 10:22:14 -0000 Received: (qmail 23229 invoked by uid 500); 7 Nov 2006 10:22:25 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 23017 invoked by uid 500); 7 Nov 2006 10:22:24 -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 23005 invoked by uid 99); 7 Nov 2006 10:22:24 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 02:22:24 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of tenjohokwen@googlemail.com designates 64.233.162.198 as permitted sender) Received: from [64.233.162.198] (HELO nz-out-0102.google.com) (64.233.162.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 02:22:09 -0800 Received: by nz-out-0102.google.com with SMTP id z3so1084019nzf for ; Tue, 07 Nov 2006 02:21:49 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=cN5NW4bW9KXB7mmaGuR+oLc/ZydcL6ydQsMvulspfHCdDZpWDiYRFirepffWgmsrzrhcYwIglyeXRxArSD65tz5X3LDUMVlpWMhgdliXoRBd3Mnd38NZQdaGY1/vnCEvyKDS79Sl/bEj109xg3ja/nsqq6PiwGjedTxf2Rv/s3c= Received: by 10.65.38.7 with SMTP id q7mr7423888qbj.1162894908673; Tue, 07 Nov 2006 02:21:48 -0800 (PST) Received: by 10.65.240.12 with HTTP; Tue, 7 Nov 2006 02:21:48 -0800 (PST) Message-ID: <82ffc5450611070221rd988c22k930a2ff62b569d1c@mail.gmail.com> Date: Tue, 7 Nov 2006 11:21:48 +0100 From: "Mbah Tenjoh-Okwen" To: "Apache Directory Developers List" Subject: Re: [jira] Commented: (DIRSERVER-758) schema checking In-Reply-To: <8179468.1162856318374.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1855_23257523.1162894908616" References: <8798001.1160245579869.JavaMail.root@brutus> <8179468.1162856318374.JavaMail.jira@brutus> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_1855_23257523.1162894908616 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline hi Im using the 1.0 version (the most recent one) thanks On 11/7/06, Emmanuel Lecharny (JIRA) 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 > > > ------=_Part_1855_23257523.1162894908616 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline hi

Im using the 1.0 version (the most recent one)

thanks







On 11/7/06, Emmanuel Lecharny (JIRA) < jira@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



------=_Part_1855_23257523.1162894908616--