You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Joerg Schaible (JIRA)" <ji...@apache.org> on 2010/03/26 08:08:27 UTC

[jira] Created: (DIRSERVER-1488) Accessing schema over JNDI delivers wrong values for mandatory/available attributes

Accessing schema over JNDI delivers wrong values for mandatory/available attributes
-----------------------------------------------------------------------------------

                 Key: DIRSERVER-1488
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1488
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: schema
    Affects Versions: 1.5.6
            Reporter: Joerg Schaible
            Priority: Critical


When I enumerate the mandatory attributes of a class I'd expected to get an 
Attribute with an enumeration for the individual attributes:

{code:Java}
Set<String> mandatory = new HashSet<String>();
Attributes attributes = schemaCtx.getAttributes("ClassDefinition/person");
Attribute attribute = attributes.get("must");
if (attribute != null) {
    NamingEnumeration<String> enumeration = 
        (NamingEnumeration<String>) attribute.getAll();
    for (NamingEnumeration<String> values = enumeration; values.hasMore();) 
{
        mandatory.add(values.next());
    }
    JndiUtils.closeLogged(enumeration, LOG);
}
{code}

However, the result is a single entry with the value "'sn' 'cn'". According Stefan Seelmann the LDAP classes are no longer defined correctly

In ApacheDS 1.5.5 the person object class description in cn=schema looks
like this:
( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST
( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description
) X-SCHEMA 'core' )

In ApacheDS 1.5.6 it looks like this:
( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP 'top' STRUCTURAL
MUST ( 'sn' 'cn' ) MAY ( 'userPassword' 'telephoneNumber' 'seeAlso'
'description' ) X-SCHEMA 'core' )

This is not correct according to RFC4512 and JNDI doesn't seem to be
flexible enough to parse this syntax.


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


[jira] Closed: (DIRSERVER-1488) Accessing schema over JNDI delivers wrong values for mandatory/available attributes

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

Emmanuel Lecharny closed DIRSERVER-1488.
----------------------------------------


> Accessing schema over JNDI delivers wrong values for mandatory/available attributes
> -----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1488
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1488
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: schema
>    Affects Versions: 1.5.6
>            Reporter: Joerg Schaible
>            Assignee: Emmanuel Lecharny
>            Priority: Critical
>             Fix For: 1.5.7
>
>
> When I enumerate the mandatory attributes of a class I'd expected to get an 
> Attribute with an enumeration for the individual attributes:
> {code:Java}
> Set<String> mandatory = new HashSet<String>();
> Attributes attributes = schemaCtx.getAttributes("ClassDefinition/person");
> Attribute attribute = attributes.get("must");
> if (attribute != null) {
>     NamingEnumeration<String> enumeration = 
>         (NamingEnumeration<String>) attribute.getAll();
>     for (NamingEnumeration<String> values = enumeration; values.hasMore();) 
> {
>         mandatory.add(values.next());
>     }
>     JndiUtils.closeLogged(enumeration, LOG);
> }
> {code}
> However, the result is a single entry with the value "'sn' 'cn'". According Stefan Seelmann the LDAP classes are no longer defined correctly
> In ApacheDS 1.5.5 the person object class description in cn=schema looks
> like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST
> ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description
> ) X-SCHEMA 'core' )
> In ApacheDS 1.5.6 it looks like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP 'top' STRUCTURAL
> MUST ( 'sn' 'cn' ) MAY ( 'userPassword' 'telephoneNumber' 'seeAlso'
> 'description' ) X-SCHEMA 'core' )
> This is not correct according to RFC4512 and JNDI doesn't seem to be
> flexible enough to parse this syntax.

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


[jira] Resolved: (DIRSERVER-1488) Accessing schema over JNDI delivers wrong values for mandatory/available attributes

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

Emmanuel Lecharny resolved DIRSERVER-1488.
------------------------------------------

    Resolution: Fixed

Fixed with : http://svn.apache.org/viewvc?rev=927974&view=rev


> Accessing schema over JNDI delivers wrong values for mandatory/available attributes
> -----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1488
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1488
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: schema
>    Affects Versions: 1.5.6
>            Reporter: Joerg Schaible
>            Assignee: Emmanuel Lecharny
>            Priority: Critical
>             Fix For: 1.5.7
>
>
> When I enumerate the mandatory attributes of a class I'd expected to get an 
> Attribute with an enumeration for the individual attributes:
> {code:Java}
> Set<String> mandatory = new HashSet<String>();
> Attributes attributes = schemaCtx.getAttributes("ClassDefinition/person");
> Attribute attribute = attributes.get("must");
> if (attribute != null) {
>     NamingEnumeration<String> enumeration = 
>         (NamingEnumeration<String>) attribute.getAll();
>     for (NamingEnumeration<String> values = enumeration; values.hasMore();) 
> {
>         mandatory.add(values.next());
>     }
>     JndiUtils.closeLogged(enumeration, LOG);
> }
> {code}
> However, the result is a single entry with the value "'sn' 'cn'". According Stefan Seelmann the LDAP classes are no longer defined correctly
> In ApacheDS 1.5.5 the person object class description in cn=schema looks
> like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST
> ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description
> ) X-SCHEMA 'core' )
> In ApacheDS 1.5.6 it looks like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP 'top' STRUCTURAL
> MUST ( 'sn' 'cn' ) MAY ( 'userPassword' 'telephoneNumber' 'seeAlso'
> 'description' ) X-SCHEMA 'core' )
> This is not correct according to RFC4512 and JNDI doesn't seem to be
> flexible enough to parse this syntax.

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


[jira] Commented: (DIRSERVER-1488) Accessing schema over JNDI delivers wrong values for mandatory/available attributes

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

Emmanuel Lecharny commented on DIRSERVER-1488:
----------------------------------------------

This was already the case in 1.5.5 :/ 

The schema refactoring didn't affected this feature, it was already dorked ...

> Accessing schema over JNDI delivers wrong values for mandatory/available attributes
> -----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1488
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1488
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: schema
>    Affects Versions: 1.5.6
>            Reporter: Joerg Schaible
>            Priority: Critical
>             Fix For: 1.5.7
>
>
> When I enumerate the mandatory attributes of a class I'd expected to get an 
> Attribute with an enumeration for the individual attributes:
> {code:Java}
> Set<String> mandatory = new HashSet<String>();
> Attributes attributes = schemaCtx.getAttributes("ClassDefinition/person");
> Attribute attribute = attributes.get("must");
> if (attribute != null) {
>     NamingEnumeration<String> enumeration = 
>         (NamingEnumeration<String>) attribute.getAll();
>     for (NamingEnumeration<String> values = enumeration; values.hasMore();) 
> {
>         mandatory.add(values.next());
>     }
>     JndiUtils.closeLogged(enumeration, LOG);
> }
> {code}
> However, the result is a single entry with the value "'sn' 'cn'". According Stefan Seelmann the LDAP classes are no longer defined correctly
> In ApacheDS 1.5.5 the person object class description in cn=schema looks
> like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST
> ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description
> ) X-SCHEMA 'core' )
> In ApacheDS 1.5.6 it looks like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP 'top' STRUCTURAL
> MUST ( 'sn' 'cn' ) MAY ( 'userPassword' 'telephoneNumber' 'seeAlso'
> 'description' ) X-SCHEMA 'core' )
> This is not correct according to RFC4512 and JNDI doesn't seem to be
> flexible enough to parse this syntax.

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


[jira] Assigned: (DIRSERVER-1488) Accessing schema over JNDI delivers wrong values for mandatory/available attributes

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

Emmanuel Lecharny reassigned DIRSERVER-1488:
--------------------------------------------

    Assignee: Emmanuel Lecharny

> Accessing schema over JNDI delivers wrong values for mandatory/available attributes
> -----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1488
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1488
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: schema
>    Affects Versions: 1.5.6
>            Reporter: Joerg Schaible
>            Assignee: Emmanuel Lecharny
>            Priority: Critical
>             Fix For: 1.5.7
>
>
> When I enumerate the mandatory attributes of a class I'd expected to get an 
> Attribute with an enumeration for the individual attributes:
> {code:Java}
> Set<String> mandatory = new HashSet<String>();
> Attributes attributes = schemaCtx.getAttributes("ClassDefinition/person");
> Attribute attribute = attributes.get("must");
> if (attribute != null) {
>     NamingEnumeration<String> enumeration = 
>         (NamingEnumeration<String>) attribute.getAll();
>     for (NamingEnumeration<String> values = enumeration; values.hasMore();) 
> {
>         mandatory.add(values.next());
>     }
>     JndiUtils.closeLogged(enumeration, LOG);
> }
> {code}
> However, the result is a single entry with the value "'sn' 'cn'". According Stefan Seelmann the LDAP classes are no longer defined correctly
> In ApacheDS 1.5.5 the person object class description in cn=schema looks
> like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST
> ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description
> ) X-SCHEMA 'core' )
> In ApacheDS 1.5.6 it looks like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP 'top' STRUCTURAL
> MUST ( 'sn' 'cn' ) MAY ( 'userPassword' 'telephoneNumber' 'seeAlso'
> 'description' ) X-SCHEMA 'core' )
> This is not correct according to RFC4512 and JNDI doesn't seem to be
> flexible enough to parse this syntax.

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


[jira] Updated: (DIRSERVER-1488) Accessing schema over JNDI delivers wrong values for mandatory/available attributes

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

Emmanuel Lecharny updated DIRSERVER-1488:
-----------------------------------------

    Fix Version/s: 1.5.7

> Accessing schema over JNDI delivers wrong values for mandatory/available attributes
> -----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1488
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1488
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: schema
>    Affects Versions: 1.5.6
>            Reporter: Joerg Schaible
>            Priority: Critical
>             Fix For: 1.5.7
>
>
> When I enumerate the mandatory attributes of a class I'd expected to get an 
> Attribute with an enumeration for the individual attributes:
> {code:Java}
> Set<String> mandatory = new HashSet<String>();
> Attributes attributes = schemaCtx.getAttributes("ClassDefinition/person");
> Attribute attribute = attributes.get("must");
> if (attribute != null) {
>     NamingEnumeration<String> enumeration = 
>         (NamingEnumeration<String>) attribute.getAll();
>     for (NamingEnumeration<String> values = enumeration; values.hasMore();) 
> {
>         mandatory.add(values.next());
>     }
>     JndiUtils.closeLogged(enumeration, LOG);
> }
> {code}
> However, the result is a single entry with the value "'sn' 'cn'". According Stefan Seelmann the LDAP classes are no longer defined correctly
> In ApacheDS 1.5.5 the person object class description in cn=schema looks
> like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST
> ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description
> ) X-SCHEMA 'core' )
> In ApacheDS 1.5.6 it looks like this:
> ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP 'top' STRUCTURAL
> MUST ( 'sn' 'cn' ) MAY ( 'userPassword' 'telephoneNumber' 'seeAlso'
> 'description' ) X-SCHEMA 'core' )
> This is not correct according to RFC4512 and JNDI doesn't seem to be
> flexible enough to parse this syntax.

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