Application Delivery Management
Application Modernization & Connectivity
CyberRes
IT Operations Management
<rule>
<description>Set initial password using generate password token</description>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-operation mode="case" op="equal">add</if-operation>
<if-password op="not-available"/>
</and>
</conditions>
<actions>
<do-set-local-variable name="pwdPolicyDN" scope="policy">
<arg-string>
<token-text xml:space="preserve">Security\Initial Pwd Policy</token-text>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="pwd" scope="policy">
<arg-string>
<token-generate-password policy-dn="$pwdPolicyDN$"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="excludeList" scope="policy">
<arg-node-set>
<token-base64-decode charset="UTF-8">
<token-dest-attr name="nspmExcludeList">
<arg-dn>
<token-local-variable name="pwdPolicyDN"/>
</arg-dn>
</token-dest-attr>
</token-base64-decode>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="join" scope="policy">
<arg-string>
<token-replace-all regex="\n" replace-with="">
<token-local-variable name="excludeList"/>
</token-replace-all>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="pwd" scope="policy">
<arg-string>
<token-xpath expression="translate($pwd, $join, '')"/>
</arg-string>
</do-set-local-variable>
<do-set-dest-password>
<arg-string>
<token-local-variable name="pwd"/>
</arg-string>
</do-set-dest-password>
<do-set-src-password>
<arg-string>
<token-local-variable name="pwd"/>
</arg-string>
</do-set-src-password>
</actions>
</rule>
<do-set-local-variable name="pwdPolicyDN" scope="policy">
<arg-string>
<token-text xml:space="preserve">Security\Initial Pwd Policy</token-text>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="pwd" scope="policy">
<arg-string>
<token-generate-password policy-dn="$pwdPolicyDN$"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="excludeList" scope="policy">
<arg-node-set>
<token-base64-decode charset="UTF-8">
<token-dest-attr name="nspmExcludeList">
<arg-dn>
<token-local-variable name="pwdPolicyDN"/>
</arg-dn>
</token-dest-attr>
</token-base64-decode>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="join" scope="policy">
<arg-string>
<token-replace-all regex="\n" replace-with="">
<token-local-variable name="excludeList"/>
</token-replace-all>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="pwd" scope="policy">
<arg-string>
<token-xpath expression="translate($pwd, $join, '')"/>
</arg-string>
</do-set-local-variable>
<do-set-dest-password>
<arg-string>
<token-local-variable name="pwd"/>
</arg-string>
</do-set-dest-password>
<do-set-src-password>
<arg-string>
<token-local-variable name="pwd"/>
</arg-string>
</do-set-src-password>