Discussion:
[jira] Created: (DIRSERVER-791) Some issues regarding attribute modification
Stefan Seelmann (JIRA)
2006-12-03 18:18:21 UTC
Permalink
Some issues regarding attribute modification
--------------------------------------------

Key: DIRSERVER-791
URL: http://issues.apache.org/jira/browse/DIRSERVER-791
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0
Environment: LDIF tested with ELBE import and ldapmodify command line tool.
Reporter: Stefan Seelmann


There are some issues regarding attribute modification:

This entry is used to start:
#
dn: cn=test,dc=example,dc=com
changetype: add
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: test
cn: aaa
sn: test
#


1.)
Removal of a value from RDN attribute which is not part of the RDN is not possible
#
dn: cn=test,dc=example,dc=com
changetype: modify
delete: cn
cn: aaa
-
#

However replacing works:
#
dn: cn=test,dc=example,dc=com
changetype: modify
replace: cn
cn: test
-
#

2.)
It is possible to add an value to objectclass, which isn't a valid objectclass. The server returns an error, but nevertheless the invalid value is stored. I think this should be rejected from server.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: objectclass
objectclass: test
-
#

3.)
It is possible to add an attribute to the entry that is not allowed according the objectclasses. The server should reject this.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: bootParameter
bootParameter: test
-
#
--
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
Ersin Er (JIRA)
2006-12-03 19:57:22 UTC
Permalink
[ http://issues.apache.org/jira/browse/DIRSERVER-791?page=comments#action_12455199 ]

Ersin Er commented on DIRSERVER-791:
------------------------------------

A test case for demostrating the bug(s) and even a patch are welcome ;-)
Post by Stefan Seelmann (JIRA)
Some issues regarding attribute modification
--------------------------------------------
Key: DIRSERVER-791
URL: http://issues.apache.org/jira/browse/DIRSERVER-791
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0
Environment: LDIF tested with ELBE import and ldapmodify command line tool.
Reporter: Stefan Seelmann
#
dn: cn=test,dc=example,dc=com
changetype: add
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: test
cn: aaa
sn: test
#
1.)
Removal of a value from RDN attribute which is not part of the RDN is not possible
#
dn: cn=test,dc=example,dc=com
changetype: modify
delete: cn
cn: aaa
-
#
#
dn: cn=test,dc=example,dc=com
changetype: modify
replace: cn
cn: test
-
#
2.)
It is possible to add an value to objectclass, which isn't a valid objectclass. The server returns an error, but nevertheless the invalid value is stored. I think this should be rejected from server.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: objectclass
objectclass: test
-
#
3.)
It is possible to add an attribute to the entry that is not allowed according the objectclasses. The server should reject this.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: bootParameter
bootParameter: test
-
#
--
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
Stefan Zoerner (JIRA)
2006-12-03 20:01:22 UTC
Permalink
[ http://issues.apache.org/jira/browse/DIRSERVER-791?page=comments#action_12455201 ]

Stefan Zoerner commented on DIRSERVER-791:
------------------------------------------

I volunteer for the test case.
Post by Stefan Seelmann (JIRA)
Some issues regarding attribute modification
--------------------------------------------
Key: DIRSERVER-791
URL: http://issues.apache.org/jira/browse/DIRSERVER-791
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0
Environment: LDIF tested with ELBE import and ldapmodify command line tool.
Reporter: Stefan Seelmann
#
dn: cn=test,dc=example,dc=com
changetype: add
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: test
cn: aaa
sn: test
#
1.)
Removal of a value from RDN attribute which is not part of the RDN is not possible
#
dn: cn=test,dc=example,dc=com
changetype: modify
delete: cn
cn: aaa
-
#
#
dn: cn=test,dc=example,dc=com
changetype: modify
replace: cn
cn: test
-
#
2.)
It is possible to add an value to objectclass, which isn't a valid objectclass. The server returns an error, but nevertheless the invalid value is stored. I think this should be rejected from server.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: objectclass
objectclass: test
-
#
3.)
It is possible to add an attribute to the entry that is not allowed according the objectclasses. The server should reject this.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: bootParameter
bootParameter: test
-
#
--
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
Anonymous (JIRA)
2006-12-03 21:07:22 UTC
Permalink
[ http://issues.apache.org/jira/browse/DIRSERVER-791?page=all ]


Attachment: DIRSERVER791.java
Post by Stefan Seelmann (JIRA)
Some issues regarding attribute modification
--------------------------------------------
Key: DIRSERVER-791
URL: http://issues.apache.org/jira/browse/DIRSERVER-791
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0
Environment: LDIF tested with ELBE import and ldapmodify command line tool.
Reporter: Stefan Seelmann
#
dn: cn=test,dc=example,dc=com
changetype: add
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: test
cn: aaa
sn: test
#
1.)
Removal of a value from RDN attribute which is not part of the RDN is not possible
#
dn: cn=test,dc=example,dc=com
changetype: modify
delete: cn
cn: aaa
-
#
#
dn: cn=test,dc=example,dc=com
changetype: modify
replace: cn
cn: test
-
#
2.)
It is possible to add an value to objectclass, which isn't a valid objectclass. The server returns an error, but nevertheless the invalid value is stored. I think this should be rejected from server.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: objectclass
objectclass: test
-
#
3.)
It is possible to add an attribute to the entry that is not allowed according the objectclasses. The server should reject this.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: bootParameter
bootParameter: test
-
#
--
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
Stefan Zoerner (JIRA)
2006-12-03 21:07:25 UTC
Permalink
[ http://issues.apache.org/jira/browse/DIRSERVER-791?page=all ]

Stefan Zoerner updated DIRSERVER-791:
-------------------------------------

Attachment: (was: DIRSERVER791.java)
Post by Stefan Seelmann (JIRA)
Some issues regarding attribute modification
--------------------------------------------
Key: DIRSERVER-791
URL: http://issues.apache.org/jira/browse/DIRSERVER-791
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0
Environment: LDIF tested with ELBE import and ldapmodify command line tool.
Reporter: Stefan Seelmann
#
dn: cn=test,dc=example,dc=com
changetype: add
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: test
cn: aaa
sn: test
#
1.)
Removal of a value from RDN attribute which is not part of the RDN is not possible
#
dn: cn=test,dc=example,dc=com
changetype: modify
delete: cn
cn: aaa
-
#
#
dn: cn=test,dc=example,dc=com
changetype: modify
replace: cn
cn: test
-
#
2.)
It is possible to add an value to objectclass, which isn't a valid objectclass. The server returns an error, but nevertheless the invalid value is stored. I think this should be rejected from server.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: objectclass
objectclass: test
-
#
3.)
It is possible to add an attribute to the entry that is not allowed according the objectclasses. The server should reject this.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: bootParameter
bootParameter: test
-
#
--
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
Stefan Zoerner (JIRA)
2006-12-03 21:09:23 UTC
Permalink
[ http://issues.apache.org/jira/browse/DIRSERVER-791?page=all ]

Stefan Zoerner updated DIRSERVER-791:
-------------------------------------

Attachment: DIRSERVER791.java

Here is a JUnit test to demonstrate all the things the reporter (Stefan) describes, and he is totally right. I have created 4 method within the class -- 3 fail (2 errors, 1 failure).

The test passes completely with the following servers (all of them on Solaris9 SPARC):
- Sun Java System Directory Server 5.2
- IBM Tivoli Directory Server 6.0
- OpenLDAP 2.3
Post by Stefan Seelmann (JIRA)
Some issues regarding attribute modification
--------------------------------------------
Key: DIRSERVER-791
URL: http://issues.apache.org/jira/browse/DIRSERVER-791
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0
Environment: LDIF tested with ELBE import and ldapmodify command line tool.
Reporter: Stefan Seelmann
Attachments: DIRSERVER791.java
#
dn: cn=test,dc=example,dc=com
changetype: add
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: test
cn: aaa
sn: test
#
1.)
Removal of a value from RDN attribute which is not part of the RDN is not possible
#
dn: cn=test,dc=example,dc=com
changetype: modify
delete: cn
cn: aaa
-
#
#
dn: cn=test,dc=example,dc=com
changetype: modify
replace: cn
cn: test
-
#
2.)
It is possible to add an value to objectclass, which isn't a valid objectclass. The server returns an error, but nevertheless the invalid value is stored. I think this should be rejected from server.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: objectclass
objectclass: test
-
#
3.)
It is possible to add an attribute to the entry that is not allowed according the objectclasses. The server should reject this.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: bootParameter
bootParameter: test
-
#
--
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
Emmanuel Lecharny (JIRA)
2007-01-05 11:06:27 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRSERVER-791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462460 ]

Emmanuel Lecharny commented on DIRSERVER-791:
---------------------------------------------

I have ported the test case into apacheds-core-unit, and I get two errors ( a NPE for testDefect1A and a non existant AttributeType test for testDefect2).

The second error does not seems to be an error to me : we don't have a 'test' attributeType in any schema so far.

I need to investigate those test a little bit further.

btw : we need to define a way to write valid unit tests : we can't assume a server is up and running when we launch the tests. We have two ways to do tests :
- in apacheds-core-unit, where we don't pass through the encoding/decoding layer (so it's much faster)
- in apacheds-server-unit where we go through the whole stuff, using an embeded ADS.

Unit tests must be using one of those two methods, but I think we must favor the second one.
Post by Stefan Seelmann (JIRA)
Some issues regarding attribute modification
--------------------------------------------
Key: DIRSERVER-791
URL: https://issues.apache.org/jira/browse/DIRSERVER-791
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0
Environment: LDIF tested with ELBE import and ldapmodify command line tool.
Reporter: Stefan Seelmann
Attachments: DIRSERVER791.java
#
dn: cn=test,dc=example,dc=com
changetype: add
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: test
cn: aaa
sn: test
#
1.)
Removal of a value from RDN attribute which is not part of the RDN is not possible
#
dn: cn=test,dc=example,dc=com
changetype: modify
delete: cn
cn: aaa
-
#
#
dn: cn=test,dc=example,dc=com
changetype: modify
replace: cn
cn: test
-
#
2.)
It is possible to add an value to objectclass, which isn't a valid objectclass. The server returns an error, but nevertheless the invalid value is stored. I think this should be rejected from server.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: objectclass
objectclass: test
-
#
3.)
It is possible to add an attribute to the entry that is not allowed according the objectclasses. The server should reject this.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: bootParameter
bootParameter: test
-
#
--
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
Emmanuel Lecharny (JIRA)
2007-01-05 13:54:27 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRSERVER-791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRSERVER-791.
-----------------------------------------

Resolution: Fixed

There was a nasty bug in the way modify requests were handled deep into the server : attribute was removed entirely, instead of just removing the values.

It has been fixed. Another problem was fixed : we now are working with the OID of attributes, instead of their names (or alias). Otherwise, we can have some NPE if we tried to compare OID with a name.

The testDefect2 was wrong : the server thrown a NamingExcepion which was not handled, this we got a failing test. Fixed.
Post by Stefan Seelmann (JIRA)
Some issues regarding attribute modification
--------------------------------------------
Key: DIRSERVER-791
URL: https://issues.apache.org/jira/browse/DIRSERVER-791
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0
Environment: LDIF tested with ELBE import and ldapmodify command line tool.
Reporter: Stefan Seelmann
Attachments: DIRSERVER791.java
#
dn: cn=test,dc=example,dc=com
changetype: add
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: test
cn: aaa
sn: test
#
1.)
Removal of a value from RDN attribute which is not part of the RDN is not possible
#
dn: cn=test,dc=example,dc=com
changetype: modify
delete: cn
cn: aaa
-
#
#
dn: cn=test,dc=example,dc=com
changetype: modify
replace: cn
cn: test
-
#
2.)
It is possible to add an value to objectclass, which isn't a valid objectclass. The server returns an error, but nevertheless the invalid value is stored. I think this should be rejected from server.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: objectclass
objectclass: test
-
#
3.)
It is possible to add an attribute to the entry that is not allowed according the objectclasses. The server should reject this.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: bootParameter
bootParameter: test
-
#
--
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
Emmanuel Lecharny (JIRA)
2007-01-05 15:26:27 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRSERVER-791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRSERVER-791.
---------------------------------------


Ok, fixed :
1.0 :
http://svn.apache.org/viewvc?view=rev&rev=493037 & http://svn.apache.org/viewvc?view=rev&rev=493038

1.5 :
http://svn.apache.org/viewvc?view=rev&rev=493046 & http://svn.apache.org/viewvc?view=rev&rev=493047
Post by Stefan Seelmann (JIRA)
Some issues regarding attribute modification
--------------------------------------------
Key: DIRSERVER-791
URL: https://issues.apache.org/jira/browse/DIRSERVER-791
Project: Directory ApacheDS
Issue Type: Bug
Affects Versions: 1.0
Environment: LDIF tested with ELBE import and ldapmodify command line tool.
Reporter: Stefan Seelmann
Attachments: DIRSERVER791.java
#
dn: cn=test,dc=example,dc=com
changetype: add
objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
cn: test
cn: aaa
sn: test
#
1.)
Removal of a value from RDN attribute which is not part of the RDN is not possible
#
dn: cn=test,dc=example,dc=com
changetype: modify
delete: cn
cn: aaa
-
#
#
dn: cn=test,dc=example,dc=com
changetype: modify
replace: cn
cn: test
-
#
2.)
It is possible to add an value to objectclass, which isn't a valid objectclass. The server returns an error, but nevertheless the invalid value is stored. I think this should be rejected from server.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: objectclass
objectclass: test
-
#
3.)
It is possible to add an attribute to the entry that is not allowed according the objectclasses. The server should reject this.
#
dn: cn=test,dc=example,dc=com
changetype: modify
add: bootParameter
bootParameter: test
-
#
--
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
Loading...