On Wed, 23 May 2012 14:06:01 +0000, bscully wrote:

> I'm running the Google Apps 1.0.0 on IdM 4.0.1.1 and I'm coming across
> an interesting crash where if a preferredName attribute (maps to GA's
> NickNames) comes across with an empty value, the driver crashes (much
> more detail at the bottom).


I'd consider the crash to be a bug in the driver. You might check to see
if there's a newer shim version available.


>
> <modify-attr attr-name="NickNames">
> <remove-value>
> <value timestamp="1333633122#7"
> type="string">contactinfo</value>
> </remove-value>
> <add-value>
> <value

timestamp="1337741280#8"
type="string"/>
> </add-value>
> </modify-attr>


What produced this document? Generally, adding an empty value like that
is something that eDirectory and IDM try to avoid, though it can still
happen.


> I was wondering how to go about tackling this.


Perin's "remove empty attributes from the document" rule:

<rule>
<description>Strip attributes with empty value tags</description>
<conditions>
<and/>
</conditions>
<actions>
<do-strip-xpath expression=".//value[.='']"/>
<do-strip-xpath expression=".//modify-attr/add-value[not(*)]"/>
<do-strip-xpath expression=".//modify-attr/remove-value[not(*)]"/>
<do-strip-xpath expression=".//modify-attr[not(*)]"/>
<do-strip-xpath expression=".//add-attr[not(*)]"/>
<do-strip-xpath expression=".//attr[not(*)]"/>
</actions>
</rule>

seems to work for this case (it removes the empty <add-value>). I use
this a lot on the Input Transform of DelimText drivers to prevent empty
fields from showing up. In this case, you're probably on the Subscriber
channel, so a policy on the Subscriber Command Transform should take care
of it.

I don't know if there are other side effects of removing the preferredName
(NickName) attribute. Does that work in Google? (I think it does, but
don't have a way to check right now.)


--
--------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.novell.com

Please post questions in the forums. No support provided via email.