MDM File Generator Utility

Utility script to generate MDM configuration files for inTunes / Kandiji

pty_policy_generator.py generates MDM policy configuration files for deploying the Protegrity Browser Protector extension on Mac and Windows. It currently supports both Chrome and Edge browser.

Output

Mac — 4 files written to output-mac/

FilePurpose
{extension_id}-chrome-install.mobileconfigDeploys extension to Chrome via policy
{extension_id}-chrome-settings.mobileconfigApplies extension settings in Chrome
{extension_id}-edge-install.mobileconfigDeploys extension to Edge via policy
{extension_id}-edge-settings.mobileconfigApplies extension settings in Edge

Windows — 4 files written to output-windows/

FilePurpose
{extension_id}-chrome-ProtegrityBrowserProtector.admxAdministrative template (ADMX) for Chrome
{extension_id}-chrome-ProtegrityBrowserProtector.admlAdministrative template language strings (ADML) for Chrome
{extension_id}-edge-ProtegrityBrowserProtector.admxAdministrative template (ADMX) for Edge
{extension_id}-edge-ProtegrityBrowserProtector.admlAdministrative template language strings (ADML) for Edge

Inputs

ParameterDescription
--platformmac or windows
--extension-idExtension ID
--update-urlExtension update URL
--runtime-blocked-hostsComma separated blocked hosts (default: http://*, https://*)
--runtime-allowed-hostsComma separated allowed hosts
--configuration-filePath to the JSON configuration file for extension settings

Usage

The script accepts input in three ways.

CLI arguments

python3 pty_policy_generator.py \
  --platform mac \
  --extension-id glktrkejbpmhpaeekkmfinokdlbhcolr \
  --update-url "https://example.com/update" \
  --runtime-blocked-hosts "http://*, https://*" \
  --runtime-allowed-hosts "https://allowed1.com, https://allowed2.com" \
  --configuration-file config.json

JSON input

Pass all parameters as a single JSON string using --json-input.

python3 pty_policy_generator.py --json-input \
  '{"extension_id":"glktrkejbpmhpaeekkmfinokdlbhcolr","update_url":"https://example.com/update.xml","runtime_blocked_hosts":"http://*, https://*","runtime_allowed_hosts":"https://allowed1.com, https://allowed2.com","configuration_file":"config.json","platform":"windows"}'

Interactive prompts

Run with no arguments. The script will prompt for each value individually.

python3 pty_policy_generator.py
extension-id: glktrkejbpmhpaeekkmfinokdlbhcolr
update_url: https://example.com/update.xml
runtime_blocked_hosts (comma-separated, Enter for default http/https): http://*, https://*
runtime_allowed_hosts (comma-separated): https://allowed1.com, https://allowed2.com
configuration file path: config.json
platform (mac or windows): mac

Requirements

  • Python 3.10 or later
  • Standard library only (no third party packages required)

Last modified : March 27, 2026