Q: Get sizing information from schema

I got interesting business case when I have to validate and "chop" data according to the size of the attribute defined in the schema.

For example, Custom attribute defined as "Case Ignore String", [0-9].

Source system doesn't have a strict size definition on own end and we got situations when "long" string supposed to go to attribute with size definition [0-3].

I did a "temporary" solution by storing this info in the mapping table, but it required extra manual maintenance of this info.

We already have this info in the schema definition (book of record).

I would like to get information about the attribute "size" from schema directly from the policy.

One of the ways, that I can see: read schema thru LDAP and parse it.

May somebody already did a similar task and have "ready-to-use" code? 

Parents
  • Hey,

    i have not "ready-use" code, but i would prefer to create a ldap-connector with basedn cn=schmea, which queries for attribute-type attribute. With this information you could fill up a mapping table dynamicly.

    Parsing the attribute-type attribute gives us the whole stuff like X-NDS_UPPER_BOUND which is your limitation:

     

    ( 2.5.4.12 NAME 'title' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64} X-NDS_NAME 'Title' X-NDS_LOWER_BOUND '1' X-NDS_UPPER_BOUND '64' X-NDS_NONREMOVABLE '1' )

     

    i had this problem also in the past, but it just reflected to a small set of attributes where i was able to handle it manualy.

  • Yes, this is a way to go, if no other options available.

Reply Children
No Data