<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>We are just rolling out the Google connector, and I noticed an
odd behavior in my testing that the removal of the final member of
a group returns success, but does not actually remove that final
member from the group in Google. It appears in tracing
com.google.api, that on this final member removal, the Google API
is never called. Other membership additions and removals seem to
be working fine.<br>
</p>
<p>I think I may have figured out why this happens in my
installation, which is the latest 1.4.2.20-SNAPSHOT connector
running on midPoint 4.0.2.</p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt"><span style="font-size:11.5pt;
font-family:Arial; color:#000000">When the last member is
removed, the connector is invoked by ConnId as follows:</span></p>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt"><span style="font-size:11.5pt;
font-family:Consolas,sans-serif; color:#000000">update(ObjectClass:
__GROUP__, Attribute: {Name=__UID__, Value=[030j0zll2pgui3t],
NameHint=Attribute: {Name=__NAME__,
Value=[<a class="moz-txt-link-abbreviated" href="mailto:test-midpoint-role3@test.unc.edu">test-midpoint-role3@test.unc.edu</a>]}}, [Attribute:
{Name=__MEMBERS__, Value=null}], OperationOptions: {})</span></p>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt"><span style="font-size:11.5pt;
font-family:Arial; color:#000000">So MEMBERS is set to null,
rather than and empty String. In the connector code, on update
to the GROUP objectClass, there is a check:</span></p>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt"><span style="font-size:11.5pt;
font-family:Consolas,sans-serif; color:#000000">if (null !=
members && null != members.getValue()) {</span></p>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt"><span style="font-size:11.5pt;
font-family:Arial; color:#000000">And if that check isn't
passed, it falls all the way through its update code, and calls:</span></p>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt"><span style="font-size:11.5pt;
font-family:Consolas,sans-serif; color:#000000">objectsCache.markGroupAsUpdatedNow(uidAfterUpdate.getUidValue())</span><span style="font-size:11.5pt; font-family:Arial; color:#000000"> </span></p>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt"><span style="font-size:11.5pt;
font-family:Arial; color:#000000">and returns. Thus telling
ConnId that the update was successful, and logging nothing at
all.</span></p>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt"><span style="font-size:11.5pt;
font-family:Arial; color:#000000">I imagine the fix would be to
modify the connector behavior to treat the null as "", or maybe
you could work around this with a dummy member like we do for
openldap. I'd like to hear other folks input and any danger in
treating null as "", or if there is something that should be
done so that ConnId isn't invoked as null in the first place.</span></p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt">Curious of other people have observed the same
behavior, and if not any suggestions for configuration that might
be related. I'd also welcome thoughts on whether the suggested
change to the connector seems reasonable, or in any way risky.</p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt"><br>
</p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt">Thanks,</p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:3pt">Ethan<br>
<span style="font-size:11.5pt; font-family:Arial; color:#000000"></span><span style="font-size:10pt; font-family:Arial; color:#000000"></span></p>
</body>
</html>