[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: InvalidAttributeSyntax(21) and Constraint violation(19)



-----Original Message-----
From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
Sent: Wednesday, May 31, 2000 12:01 PM
To: Kristianne Leclair
Cc: Vithalprasad Gaitonde; ietf-ldapext@netscape.com
Subject: RE: InvalidAttributeSyntax(21) and Constraint violation(19)


At 11:22 AM 5/31/00 -0400, Kristianne Leclair wrote:
>>Unfortunately, as Kurt points out, it is a little ambiguous whether a size
>>violation here would result in an error of constraintViolation or
>>invalidAttributeSyntax.

>Err... I actually don't think it's all that ambiguous.  The
>directoryString syntax as a minimum length requirement.  If
>violated, it should cause invalidAttributeSyntax.  If an
>attribute type is defined with a maximun size, then a
>server may return constraintViolation.  I say may, not
>should, as maximum in LDAP are just hints.

>I offer a less confusing example to demonstrate the
>difference meanings of these resultCodes:  If the directoryString
>value provided contains octets which are form an invalid
>UTF-8 encoding, an invalidAttributeTypeSyntax would be
>an appropriate error to return.  If two syntaxically valid
>values were provided but the attribute type was defined
>as SINGLE-VALUE, then constraintViolation would be returned.

These are perfect examples of the difference between constraintViolation and
invalidAttributeSyntax. In most cases the difference is very clear, in fact,
I think size constraints would be the only place where the difference
between the two errors is at all ambiguous. Since the size constraints are
defined as part of the syntax definition for an attribute then I think it
makes sense that a violation of the size constraints would result in an
error of invalidAttributeSyntax, however, X.511 specifically provides 'a
value exceeding the maximum size allowed' as an example for
constraintViolation. Is this intentional, a slip of the pen, or is this
meant to read 'exceeding the maximum number of values for the attribute'?