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

Re: Binary Syntax and the binary Attribute Type option



At 03:25 PM 1/19/01 +0000, Damian Power wrote:
>I have a question somewhat related to the "AttributeTypeValue and binary"
>thread currently on the ELSE and LDAPBIS lists, but different enough that I
>don't want to pollute that thread.

I trimmed LDAPext off the cc list.

>Simply put, my question is this: given that an Attribute Type is defined as
>having Binary syntax (1.3.6.1.4.1.1466.115.121.1.5), is the ;binary option
>required when referring to that attribute in protocol?

No.  (some might argue that it's allowed, I argue that it's not
allowed [see previous thread], but I think we agree that it
is not required).

>For example,
>attribute type "foo" has Binary syntax. If I request this attribute in a
>search, do I refer to it as "foo" or "foo;binary"?

It should be transferred as "foo".

>I don't believe the RFCs make a clear statement either way,

I would agree that the RFCs need clarification.  But, I think if
you carefully read RFC 2251, 4.1.5.1:
   If the "binary" option is present in an AttributeDescription, it
   overrides any string-based encoding representation defined for that 
   attribute in [5]. Instead the attribute is to be transferred as a
   binary value encoded using the Basic Encoding Rules [11].  The syntax
   of the binary value is an ASN.1 data type definition which is
   referenced by the "SYNTAX" part of the attribute type definition.

you'll find you cannot use ";binary" transfer with a value of
binary syntax without contradicting the last sentence.

That is, you can only ";binary" transfer a value who's SYNTAX
is references an ASN.1 data type definition.   The "binary" syntax
does not reference an ASN.1 data type definition and hence (IMO)
cannot be transferred using ";binary".

There is a subtle difference between ";binary" and the "binary"
syntax.

";binary" transfer is meant to be used to transfer a value with a
syntax described by ASN.1 data type definition and BER encoded
per this definition.  Here, as there is specific ASN.1
data type definition, a server may verify the value not only
can be decoded but conforms to definition.

The "binary" syntax allows the BER encoding of some ASN.1
data definition type.  A server may only verify the value can be
decoded.  It cannot verify it conforms to any specific ASN.1
data type definition as there is none.

I believe RFC 2252 obscures this difference by attempting to
detail both in one section.  As RFC 2251 already details ";binary",
RFC 2252 should only detail the "binary" syntax.  And, if there
is consensus that binary transfer of the binary value makes no
sense, an appropriate clarification should as be made.

Kurt