In addition, to the regions, they also based some of the deployment based on some classification of users.
Our desire was to create a methodology where they could expand their scope without requiring a lot of code changes.
We cam up with this idea that seems to work pretty well.
As these compares are performed with XPATH, the values are case sensitive. We insist the Global Configuration Variables values be lower case when entered; but we do not enforce it.
We force the values from the user to lowercase before we compare.
<definition critical-change="true" display-name="Roles In Scope" item-separator="|" name="idv.dit.data.inscope.roles" type="list"> <description>Only willekeRoleValues with the listed values are considered in scope. WARNING - Case Sensitive. Must be lower case here!</description> <value> <item>dentist</item> <item>dentistaa</item> <item>gfr</item> <item>contractordentist</item> </value> </definition>
<definition critical-change="true" display-name="Current In-Scope Regions" item-separator="|" name="idv.dit.data.inscope.regions" type="list"> <description>Only the regions which are shown are In Scope. These must be listed as the names are utilized within the IDV. WARNING - Must be lower case here!</description> <value> <item>virginia beach</item> </value> </definition>
<rule> <description>Update willekeRoleValue when Available</description> <comment xml:space="preserve">if the lv-roleValue is not empty set the willekeRoleValue in IDV. Check and see if the lv-roleValue is gfr, dentistAA or Contractordentist and if true - set the willekeTargetIDMUser=True - break - Nothing more to do on this entry in this policy. Check the willekeRegionCode to determine if the user is within he current target OU. If Yes - set the willekeTargetIDMUser=True - break - Nothing more to do on this entry in this policy. else - set the willekeTargetIDMUser=False </comment> <comment name="author" xml:space="preserve">jim@willeke.com</comment> <comment name="version" xml:space="preserve">17</comment> <comment name="lastchanged" xml:space="preserve">2009-12-21</comment> <conditions> <and> <if-local-variable name="lv-roleValue" op="available"/> <if-local-variable mode="nocase" name="lv-roleValue" op="not-equal"/> </and> </conditions>
<actions> <do-set-local-variable name="lv-istargetuser" scope="policy"> <arg-string> <token-text xml:space="preserve">FALSE</token-text> </arg-string> </do-set-local-variable> <do-set-dest-attr-value name="willekeRoleValue"> <arg-value> <token-local-variable name="lv-roleValue"/> </arg-value> </do-set-dest-attr-value> <do-if> <arg-conditions> <and> <if-xpath op="true">$lv-roleValue=$idv.dit.data.inscope.roles</if-xpath> </and> </arg-conditions> <arg-actions> <do-trace-message color="brblue"> <arg-string> <token-text xml:space="preserve">Target Role</token-text> <token-text xml:space="preserve"> : </token-text> <token-local-variable name="lv-roleValue"/> <token-text xml:space="preserve"> Matched!</token-text> </arg-string> </do-trace-message> <do-set-local-variable name="lv-istargetuser" scope="policy"> <arg-string> <token-text xml:space="preserve">TRUE</token-text> </arg-string> </do-set-local-variable> <do-if> <arg-conditions> <or> <if-local-variable mode="nocase" name="lv-roleValue" op="equal">gfr</if-local-variable> <if-local-variable mode="nocase" name="lv-roleValue" op="equal">contractordentist</if-local-variable> </or> </arg-conditions> <arg-actions> <do-set-dest-attr-value name="willekeTargetIDMUser"> <arg-value> <token-local-variable name="lv-istargetuser"/> </arg-value> </do-set-dest-attr-value> <do-break/> </arg-actions> <arg-actions/> </do-if> </arg-actions> <arg-actions> <do-trace-message color="brblue"> <arg-string> <token-text xml:space="preserve">Target Role</token-text> <token-text xml:space="preserve"> : </token-text> <token-local-variable name="lv-roleValue"/> <token-text xml:space="preserve"> FAILED!!!!!!!!!!!!</token-text> </arg-string> </do-trace-message> <do-set-local-variable name="lv-istargetuser" scope="policy"> <arg-string> <token-text xml:space="preserve">FALSE</token-text> </arg-string> </do-set-local-variable> <do-set-dest-attr-value name="willekeTargetIDMUser"> <arg-value> <token-text xml:space="preserve">FALSE</token-text> </arg-value> </do-set-dest-attr-value> <do-break/> </arg-actions>
</do-if> <do-set-local-variable name="lv-regionvalueonthisone" scope="policy"> <arg-string> <token-lower-case> <token-attr name="willekeRegionCode"/> </token-lower-case> </arg-string> </do-set-local-variable> <do-if> <arg-conditions> <and> <if-xpath op="true">$lv-regionvalueonthisone=$idv.dit.data.inscope.regions</if-xpath> </and> </arg-conditions> <arg-actions> <do-trace-message color="brblue"> <arg-string> <token-text xml:space="preserve">Target Region</token-text> <token-text xml:space="preserve"> : </token-text> <token-local-variable name="lv-regionvalueonthisone"/> <token-text xml:space="preserve"> Matched!</token-text> </arg-string> </do-trace-message> <do-set-local-variable name="lv-istargetuser" scope="policy"> <arg-string> <token-text xml:space="preserve">TRUE</token-text> </arg-string> </do-set-local-variable> </arg-actions> <arg-actions> <do-trace-message color="brblue"> <arg-string> <token-text xml:space="preserve">Target Region</token-text> <token-text xml:space="preserve"> : </token-text> <token-local-variable name="lv-regionvalueonthisone"/> <token-text xml:space="preserve"> FAILED!!!!!!!!!!!!</token-text> </arg-string> </do-trace-message> <do-set-local-variable name="lv-istargetuser" scope="policy"> <arg-string> <token-text xml:space="preserve">FALSE</token-text> </arg-string> </do-set-local-variable> </arg-actions> </do-if> <do-set-dest-attr-value name="willekeTargetIDMUser"> <arg-value> <token-local-variable name="lv-istargetuser"/> </arg-value> </do-set-dest-attr-value> </actions> </rule>