PreviousNext

Attribute Encoding

Attribute encoding defines the legal encoding for instances of the attribute type. The encoding controls the format of the attribute instance values, such as whether the attribute value is an integer, string, a UUID, or a vector of UUIDs that define an attribute set.

Attribute encodings are specified in the sec_attr_encoding_t data type (fully described in the OSF DCE Application Development Reference).

The possible encodings for attribute types are

· any

The attribute instance value can be of any legal encoding type.

· void

The attribute instance has no value. It is simply a marker that is either present or absent.

· printstring

The attribute value is a printable IDL character string from the DCE Portable Character Set (PCS).

· printstring_array

The attribute value is an array of print strings.

· integer

The attribute value is a signed 32-bit integer.

· bytes

The attribute value is a string of bytes. The byte string is assumed to be a pickle or is otherwise a self-describing type.

· confidential_bytes

The attribute value is a string of encrypted bytes. This encrypted data can be passed over the network and is available to user-developed applications.

· internationalization_data

An internationalized string of bytes with a tag identifying the OSF registered codeset used to encode the data.

· uuid

A DCE UUID.

· attr_set

The value is an attribute set, a vector of attribute type UUIDs used to associate multiple related attribute instances (members of the set). The vector contains the UUIDs of each member of the set. Attribute sets provide a flexible way to group related attributes on an object for easier search and retrieval.

The attribute type UUIDs referenced in an attribute set instance must correspond to existing attribute schema entries. Although the members specified in a set are generally expected to be attached to the object to which the set instance is attached, no checking is done to confirm that they are. Thus, it is possible to create an attribute set instance on an object before creating member attribute instances on that object. A query on such an attribute set returns all instances of member attributes that exist on the object along with a warning that some attribute types were missing.

Note that attribute sets cannot be nested; a member UUID of an attribute set cannot itself identify an attribute set.

A query on an attribute set expands to a query per the set's members. In other words, an attribute lookup operation on an attribute set returns all attribute instances that are members of the set, not the set instance itself. (Certain operations, such as sec_rgy_attr_set_lookup_by_id( ) and sec_rgy_attr_lookup_by_name( ), can retrieve attribute set instances.)

Updates to an attribute set (sec_rgy_attr_update( )) do not expand the update to its members but apply only to the attribute set. Since the value carried by a set instance is a vector containing the UUIDs of the member attribute types, an update makes changes only to the set's members, not the values carried by those member attributes. Deletions of attribute sets delete only the set instance, not the member instances.

Since the attributes that are set members exist independently of the attribute set, they can be manipulated directly like any other attribute.

· binding

The attribute value is a sec_attr_binding_info_t type containing authentication, authorization, and binding information suitable for communicating with a DCE server.