Idira Identity: How can I change the Application Challenge Rules to script?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Workforce Identity Articles
1 min read
L2 Linker
No ratings

Question

I am struggling with the app policies. I want to switch to use the Policy script but I do not know how to do it. I have enabled ”Use script to specify authentication rules (configured rules are ignored)”. What is the next?

Here is one of my examples. 

ka32J000000LQYaQAO__eid=ka32J000000LQYa&feoid=00N2J000009R3kr&refid=0EM2J000002xV9r.png

Answer

You have to understand what rules you currently have. From the example, you have set 2 policies that only allow access from the internal network. In this case, checking blocked roles is not required at all. Instead, you can define the script as below.

if(!context.onPrem){
   policy.Locked = true;
}


Note: This script is to block access from the external network. Access from the internet network is allowed. 

The above script does exactly the same what rules can. There is no difference. If you have difficulties using the script, we suggest using the Application Challenge Rules rather than the script. The script is a bit advanced that requires knowledge of scripting and syntax.

To learn more about Application Challenge Rules, please feel free to refer to the below page.
https://docs.cyberark.com/Product-Doc/OnlineHelp/idaptive/Latest/en/Content/Applications/AppsCSH/appref-cs-app-Policy.htm
To understand how to configure the app access script, please refer to the following page for more examples. 
https://docs.cyberark.com/Product-Doc/OnlineHelp/Idaptive/Latest/en/Content/Applications/AppsScriptRef/UseSamplePolScript.htm
 
Rate this article: