Issue Details (XML | Word | Printable)

Key: DIRSERVER-232
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ersin Er
Reporter: Alex Karasulu
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

[ACIITemParser] Position of terms in optional ASN.1 elements should not matter

Created: 19/Oct/05 10:44 AM   Updated: 02/Oct/06 02:00 PM
Return to search
Component/s: ldap
Affects Version/s: pre-1.0
Fix Version/s: pre-1.0

Time Tracking:
Not Specified

Resolution Date: 25/Oct/05 08:50 PM


 Description  « Hide
The position of optional elements is relavent within the ACIItemParser. For example for ProtectedItems the position of optional elements are relevant so for example the following ACI whould bomb out:

                "{ " +
                "identificationTag \"searchAci\", " +
                "precedence 14, " +
                "authenticationLevel none, " +
                "itemOrUserFirst userFirst: { " +
                "userClasses { allUsers }, " +
                "userPermissions { { " +
                "protectedItems {allUserAttributeTypesAndValues, entry }, " +
                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }"

This however would succeed:

                "{ " +
                "identificationTag \"searchAci\", " +
                "precedence 14, " +
                "authenticationLevel none, " +
                "itemOrUserFirst userFirst: { " +
                "userClasses { allUsers }, " +
                "userPermissions { { " +
                "protectedItems {entry, allUserAttributeTypesAndValues }, " +
                "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }"

The same holds for other constructs where a sequence of optional elements are expected. However this is a big problem. The user specifying the ACI must know what comes first, what comes second and so on in the ASN.1 description. This is just too strict of a constraint to place on users and will degrade the ease of use.

Really because we have names for each field order does not need to matter anymore.

I marked this as an improvement as opposed to a bug because the ASN.1 to ABNF translation was correct. It just is not the best thing to do.
 

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alex Karasulu added a comment - 19/Oct/05 10:46 AM
Perhaps Ersin you can provide an assessment of how much an effort it would be to not have position factor into the terms of the ACI. Or perhaps it might not be a good idea to do this so let me know WYT. Thanks.

Alex Karasulu made changes - 19/Oct/05 10:46 AM
Field Original Value New Value
Assignee Ersin Er [ ersiner ]
Emmanuel Lecharny added a comment - 19/Oct/05 11:04 AM
being able to enter those names in any order is not a big deal. Further more, it will simplify the grammar.

The only tricky thing to control is that a name is used only once. Again, not a big deal, has we can use a HashMap to store each name already used.

In the antlr grammar, we have 12 rules than can be concatenated in only two rules.

So let's do it !

Ersin Er added a comment - 19/Oct/05 03:51 PM
It's really better to provide a more flexible grammar for the end user. As Emmanuel said, this will also simplify the grammar for this case. For grammar parts that are composed of optional elements, we'll need to check that each element is used only once and for the parts that are composed of non-optional elements, we'll need to check that each element is exactly used once. So what I think now is that it's not that hard to implement. I'll do it.

Ersin Er added a comment - 25/Oct/05 08:47 PM
It's a fully flexible grammar now and ready for the release.

Ersin Er made changes - 25/Oct/05 08:50 PM
Fix Version/s 0.9.3 [ 12310221 ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Alex Karasulu made changes - 07/Feb/06 02:41 PM
Type Improvement [ 4 ] Bug [ 1 ]
Key DIRLDAP-62 DIRSERVER-232
Fix Version/s pre-1.0 [ 12310782 ]
Project Directory LDAP [ 10514 ] ApacheDS [ 12310260 ]
Component/s Common [ 11085 ]
Fix Version/s 0.9.3 [ 12310221 ]
Component/s ldap [ 12310715 ]
Affects Version/s pre-1.0 [ 12310782 ]
Alex Karasulu added a comment - 02/Oct/06 02:00 PM
fixed and confirmed

Alex Karasulu made changes - 02/Oct/06 02:00 PM
Status Resolved [ 5 ] Closed [ 6 ]