Wednesday, April 9, 2014

DirXML-Associations nameSpace wildcard magic number

When constructing a query for the DirXML-Associations attribute, I wanted to find a specific entitlement value.  In order to construct the query, I need all 3 parts of the structured attribute, which are nameSpace, volume, and path.  Volume is the DN of the entitlement object.  Path is the XML value of the entitlement.  nameSpace is the status of the entitlement as it it relates to the user.  The nameSpace attribute will NOT allow you to use a simple "*" wildcard.  Turns out, there is a "Magic Number" that is used in place of the wildcard.  That magic number is 4278190086.  Took quite a bit of Googling to find this.

Now, I tried the same thing on the nrfEntitlementRef attribute for nrfResource objects and it does NOT work - the error returned looks like:
<status level="error">Code(-9053) One or more errors occurred while
processing a query: Code(-8009) Error processing &lt;search-attr>:
java.lang.NumberFormatException: For input string: "4278190086".</status>
To work around, I simply did two queries and stuffed their values in the same nodeset (in DirXML - I've been told the magic number works for LDAP calls).  It seems the only values it gets for nameSpace are 0 and 1.  When setting my local variable nodeset - I simply included the same query with both values.  If I find a different value, I'll be sure to update this blog post.

No comments:

Post a Comment