[midPoint] intent filter/expression?

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Tue Dec 5 12:00:25 CET 2017


Hello!

Is there an ability to set the "intent" in a metarole using filter or expression? Or it must be defined statically?

I'm building an "universal" metarole that is assigning an entitlement (group membership).
It must work with any instance of specified type of resource and any account intent. I'm trying to prevent the role explosion syndrome. :)

Everything is working fine, except that the metarole works only for accounts with intent marked as "default" (or defined explicitly).
Would be great to resolve "intent" using filter/expression, analogously to "resourceRef".

Below is the metarole:

<role>
   <name>UNIVERSAL ENTITLEMENT METAROLE: GROUP AAAAA</name>
   <inducement id="1">
      <construction>
         <strength>weak</strength>
         <resourceRef>
            <filter>
               <q:inOid>
                  <expression>
                     <script>
                        <code>
                            return basic.getPropertyValue(immediateRole, "extension/resourceRef");
                        </code>
                     </script>
                  </expression>
               </q:inOid>
            </filter>
            <resolutionTime>run</resolutionTime>
         </resourceRef>
         <kind>account</kind>
	 <intent> *THIS IS THE PLACE I HAVE TO RESOLVE INTENT FROM PARENT ROLE "extension/intentRef"* </intent>
         <association>
            <c:ref>ri:groups</c:ref>
            <outbound>
               <strength>strong</strength>
               <expression>
                  <associationTargetSearch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                           xsi:type="c:SearchObjectExpressionEvaluatorType">
                     <filter>
                        <q:equal>
                           <q:path>attributes/icfs:name</q:path>
                           <q:value>GROUP AAAAA</q:value>
                        </q:equal>
                     </filter>
                  </associationTargetSearch>
               </expression>
            </outbound>
         </association>
      </construction>
      <order>2</order>
   </inducement>
</role>

I tried to make filters / expressions but got nothing but errors...

Thanks for any help.
WS



More information about the midPoint mailing list