{"id":76,"date":"2007-09-10T10:39:40","date_gmt":"2007-09-10T10:39:40","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=76"},"modified":"2023-01-16T09:11:10","modified_gmt":"2023-01-16T09:11:10","slug":"disappearance-from-the-cs-should-not-be-a-justification-for-object-deletion","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/disappearance-from-the-cs-should-not-be-a-justification-for-object-deletion","title":{"rendered":"Disappearance from the CS should not be a justification for object deletion!"},"content":{"rendered":"<p>I&#8217;ve found myself repeating this on <a href=\"http:\/\/tech.groups.yahoo.com\/group\/MMSUG\/\" target=\"_blank\" rel=\"noopener noreferrer\">MMSUG<\/a>\u00a0a couple of times recently, so a post is probably in order. Don&#8217;t go deleting everything just because a CS object disappears!<\/p>\n<p>There&#8217;s a dangerous little form in the Metaverse Design section of Identity Manager which allows you to set your Object Deletion Rule. By the simple expedient of clicking a radio button you can delete Metaverse objects just because the object (ie &#8220;connector&#8221;) disappeared from a nominated Connector Space.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wapshere.com\/images\/miis_objectdeletionCSdisconnect.GIF\" alt=\"\" \/><\/p>\n<p>If you&#8217;ve also set your Management Agents to delete based on disappearance of the MV object, this deletion will then be replicated in all your connected directories.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wapshere.com\/images\/ma_deprovisioning.GIF\" alt=\"\" \/><\/p>\n<p>So why am I so worried about this? Let&#8217;s say, for example, that you are supplied with a daily text file from HR listing all current users. If a user is no longer on the list then what&#8217;s the problem with removing all their accounts?<\/p>\n<p>Take it from me (who accidentally disabled hundreds of user accounts using such a system) you need something more concrete when you&#8217;re going to start taking things away from people!<\/p>\n<p>The fact of the matter is, glitches occur. That text file generation could have been interrupted part-way through. Even if you&#8217;re going closer to the source, eg straight from a SQL table, you can run into problems with SQL replication and DTS packages. And lets not forget the sheer scope posed by human error! I&#8217;m also wondering if an incomplete Import step into MIIS could lead to CS objects temporarily going missing &#8230; I think not, but in Good Design we don&#8217;t take the chance.<\/p>\n<p>My proposal is that you figure out a way to get an extra <strong>Status<\/strong> field into your input data. This field should be used for tags such as &#8220;Active&#8221; and &#8220;Inactive&#8221;, as well as any other special-purpose flags you may see fit to introduce.<\/p>\n<p>Here&#8217;s what you need to do:<\/p>\n<p>1. Change that Metaverse Deletion Rule. You may need to write extension code (the third option), but I&#8217;ve only ever used the first option:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"width: 481px; height: 286px;\" src=\"https:\/\/www.wapshere.com\/images\/miis_objectdeletion.GIF\" alt=\"\" width=\"481\" height=\"286\" \/><\/p>\n<p>2. It should be fine to leave the MA Deprovisioning rules set as shown above as you won&#8217;t be deleting the Meteverse object until all CS objects are gone.<\/p>\n<p>3. Create a Metaverse attribute and import flow rule for the Status field, so that it is flowed in along with other object data.<\/p>\n<p>4. You can now do a simple test, in your MVExtension code, before you proceed to anything destructive:<\/p>\n<blockquote><p>If mventry(&#8220;Status&#8221;).Value = &#8220;Inactive&#8221; Then<br \/>\n<em>\u00a0account disable\/delete instructions<\/em><br \/>\nEnd If<\/p><\/blockquote>\n<p>5. If you wanted to, you could now use the disappearance theory as a way to clear out objects later on &#8211; just check first that a previous import has set the expected Status:<\/p>\n<blockquote><p>If csobject Is Nothing\u00c2\u00a0AndAlso mventry(&#8220;Status&#8221;).Value = &#8220;Inactive&#8221; Then<br \/>\n<em>\u00a0connector deletions<\/em><br \/>\nEnd If<\/p><\/blockquote>\n<p>So, using this method, what happens if a few objects do go missing (accidentally or otherwise) from your input data?<\/p>\n<ul>\n<li>MIIS will remove the CSobject from your source MA, correctly reflecting the input data it has been fed;<\/li>\n<li>The metaverse (and hence other connector space) objects will be unaffected &#8211; all that&#8217;s happened is a connector has been lost;<\/li>\n<li>When the object reappears in the inital connector space it should just rejoin to the existing metaverse object. And if it doesn&#8217;t, CHECK your join rules!<\/li>\n<\/ul>\n<p>If you&#8217;re worried about orphaned objects you can do the odd <a href=\"https:\/\/www.wapshere.com\/missmiis\/?p=36\">MIIS DB query<\/a>\u00a0to list the metaverse objects without a connector in the source CS, and then follow those up. After doing that a few times you will probably be well on your way to training your data handlers to NEVER just delete a record without putting it through an &#8220;Inactive&#8221; phase first!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve found myself repeating this on MMSUG\u00a0a couple of times recently, so a post is probably in order. Don&#8217;t go deleting everything just because a CS object disappears! There&#8217;s a dangerous little form in the Metaverse Design section of Identity Manager which allows you to set your Object Deletion Rule. By the simple expedient of&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[34,28,3],"tags":[],"class_list":["post-76","post","type-post","status-publish","format-standard","hentry","category-ilm2007","category-miis2003","category-philosophising"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-1e","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/76","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":5,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/76\/revisions"}],"predecessor-version":[{"id":3381,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/76\/revisions\/3381"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}