Configure Application Control for a policy

Configure the Application Control module to define its behavior for a policy. Generally, use the following steps to configure the module:

  1. Create an ApplicationControlPolicyExtension object and add the Ruleset IDs to use. Also configure the running state (on or off).
  2. Create an PolicySettings object to configure runtime settings of the module.
  3. Create a Policy object and add the ApplicationControlPolicyExtension and PolicySettings objects.
  4. Use a PoliciesApi object to add or update the policy on Deep Security Manager.

For more information about Deep Security application control, see Deep Security Help Center.

The following example creates an ApplicationControlPolicyExtension object and turns on application control. The object is added to a Policy object which is used to modify a policy on Deep Security Manager.

Python

source

# Get the policy
policies_api = api.PoliciesApi(api.ApiClient(configuration))
# Turn on Application Control
application_control_policy_extension = api.ApplicationControlPolicyExtension()
application_control_policy_extension.state = "on"
# Update the policy
update_policy = api.Policy()
update_policy.application_control = application_control_policy_extension
try:
    # Modify the policy on Deep Security Manager
    app_control_policy = policies_api.modify_policy(policy_id, update_policy, api_version, overrides=False)
    return app_control_policy
except api_exception as e:
    return "Exception: " + str(e)
JavaScript

source

//Turn on application control
appControlPolicyExtension.state =
  api.ApplicationControlPolicyExtension.StateEnum.on;policy.applicationControl = appControlPolicyExtension;policiesApi.modifyPolicy(policyID, policy, apiVersion, { overrides: false })
  .then(data => {
    resolve(data);
  })
  .catch(function (error) {
    reject(error);
  });
Java

source

= new ApplicationControlPolicyExtension();
		appControlPolicyExtension.setState(ApplicationControlPolicyExtension.StateEnum.ON);= new Policy();
		updatePolicy.setApplicationControl(appControlPolicyExtension);
		PoliciesApi policiesApi = new PoliciesApi();
		updatePolicy = policiesApi.modifyPolicy(policyId, updatePolicy, Boolean.FALSE, apiVersion);
Also see the Modify a Policy operation in the API Reference. For information about authenticating API calls, see Authenticate with Deep Security Manager.