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

Re: Pls help: attribute format ?



At 10:26 PM 9/2/99 +0800, S.T. Wong wrote:
>Is it possible to have control on the content (format/size) of attributes ?

Depends upon what you mean by control.  Every attribute type has
a syntax and may have a size constraint.  You can create new
attribute types and assign whatever syntax/constraints you desire
(within limits of your software).  So, depending on exactly what
you want, you may or may not get the control you desire.

OpenLDAP 1.x, for example, supports only a few basic LDAPv2 syntaxes
and has no mechanism to specify a size constraint.  Many commercial
vendors offer a far wider range of syntaxes (include those for
LDAPv3) and various constraints.

>e.g. how to prevent users to store characters in phonenumber,

Though telephone numbers should conform to E.123, many syntaxes
which contain telephone numbers also contain descriptive or optional
information.  What's allowed and not depends upon the specific
syntax.

OpenLDAP assumes the client provides appropriate information as a
printable string and does not attempt to decode the string to
determine if it has a valid syntax.

>or to store a binary file in the cn field ?

IIRC, cn is defined as a DirectoryString with any size constraint.
It can contain anything including unprintable characters.  Whether
the string is read from a file or not (presumedly by the client)
is irrelevant (to LDAP).

Kurt