diff --git a/examples/Admin/policies.py b/examples/Admin/policies.py index 031720f..fd3262a 100755 --- a/examples/Admin/policies.py +++ b/examples/Admin/policies.py @@ -82,15 +82,22 @@ def update_policy_with_device_health_app(policy_key, print_response=False): """ Update a given policy to include Duo Device Health App policy settings. Requires Access or Beyond editions. + NOTE: this function is deprecated, please use update_policy_with_duo_desktop + """ + return update_policy_with_duo_desktop(policy_key, print_response) + +def update_policy_with_duo_desktop(policy_key, print_response=False): + """ + Update a given policy to include Duo Desktop policy + settings. Requires Access or Beyond editions. """ json_request = { "sections": { - "device_health_app": { + "duo_desktop": { "enforce_encryption": ["windows"], "enforce_firewall": ["windows"], - "prompt_to_install": ["windows"], - "requires_DHA": ["windows"], + "requires_duo_desktop": ["windows"], "windows_endpoint_security_list": ["cisco-amp"], "windows_remediation_note": "Please install Windows agent", }, @@ -139,8 +146,8 @@ def main(): policy_key_a = create_empty_policy("Test New Policy - a") policy_key_b = create_empty_policy("Test New Policy - b") - # Update policy with Duo Device Health App settings. - update_policy_with_device_health_app(policy_key_b) + # Update policy with Duo Desktop settings. + update_policy_with_duo_desktop(policy_key_b) # Create an empty policy and delete it. policy_key_c = create_empty_policy("Test New Policy - c") diff --git a/examples/Admin/policies_advanced.py b/examples/Admin/policies_advanced.py index 82bb30d..7117de0 100755 --- a/examples/Admin/policies_advanced.py +++ b/examples/Admin/policies_advanced.py @@ -85,20 +85,26 @@ def bulk_delete_section(policy_keys, print_response=False): pretty = json.dumps(response, indent=4, sort_keys=True, default=str) print(pretty) - def update_policy_with_device_health_app(policy_key, print_response=False): """ Update a given policy to include Duo Device Health App policy settings. Requires Access or Beyond editions. + NOTE: this function is deprecated, please use update_policy_with_duo_desktop + """ + return update_policy_with_duo_desktop(policy_key, print_response) + +def update_policy_with_duo_desktop(policy_key, print_response=False): + """ + Update a given policy to include Duo Desktop policy + settings. Requires Access or Beyond editions. """ json_request = { "sections": { - "device_health_app": { + "duo_desktop": { "enforce_encryption": ["windows"], "enforce_firewall": ["windows"], - "prompt_to_install": ["windows"], - "requires_DHA": ["windows"], + "requires_duo_desktop": ["windows"], "windows_endpoint_security_list": ["cisco-amp"], "windows_remediation_note": "Please install Windows agent", }, @@ -148,8 +154,8 @@ def main(): policy_key_a = create_empty_policy("Test New Policy - a") policy_key_b = create_empty_policy("Test New Policy - b") - # Update policy with Duo Device Health App settings. - update_policy_with_device_health_app(policy_key_b) + # Update policy with Duo Desktop settings. + update_policy_with_duo_desktop(policy_key_b) # Create an empty policy and delete it. policy_key_c = create_empty_policy("Test New Policy - c")