Skip to main content

Xshield Utility installation guide for Windows

Download the Utility Package

  1. Open/Run powershell in administrator mode

  2. Navigate to your workspace directory (For example: C:\Users\muqeed.abdul)

  3. Execute below command to download the latest xshield_utility release version

    Please replace <artifacts-url> in the command with the appropriate URL of your domain:

    • For ng.colortokens.com and bom.colortokens.com, use artifacts.<domain url> eg: artifacts.ng.colortokens.com
    • For all other domains, use artifacts-<domain url> eg: artifacts-syd.colortokens.com, artifacts-fra.colortokens.com

    Ensure that you substitute <domain> with your specific domain name to form the correct URL for downloading the package.

      Invoke-WebRequest -Uri https://<artifacts-url>/ct-xshield-util/latest/packages/xshield_utility.tar.gz
  4. After successful download of the file, Untar the downloaded tar file

      mkdir -p xshield_utility
    tar -xvzf xshield_utility.tar.gz -C xshield_utility

Download the Python Package

  1. Download python as Windows installer (64-bit) for version 3.10 or higher on the workspace machine

    Python installer download

  2. Follow the instructions to install python

    1. Run the installer executable file as administrator installer file run
    2. Check the "Add Python to PATH" and "User admin privileges" boxes option and Click Custom installation python installer - 1
    3. Select all optional features and click Next
    4. Under Advanced Options, select "Install Python for all users" and "Add Python to environment variables"
    5. Browse the Installation location to "C:\Program Files\Python3" or keep the default path already provided python installer - 2
    6. Click Install python installer -3

Create and activate python virtual environment

  1. Create virtual environment for python under xshield_utility/util directory
      cd xshield_utility/util
    python -m venv .venv
  2. Set permissions for execution of further commands
      Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -Force
  3. Activate python virtual env
      .\venv\Scripts\Activate.ps1
  4. Install the dependencies using
      pip install -r requirements.txt
  5. If you are using an IDE such as VS Code or Pycharm, open the xshield_utility directory in the editor as a project
  6. Add the python interpreter with existing virtual environment from util directory
  7. Once the virtual env is activated, open the terminal from IDE window and validate the virtual env is activated with (.venv) at the start of the path

Update the config file

  1. Change the directory to config for updating the config file with the one downloaded from the tenant (make sure the API private key path is also provided and is accessible)
      cd ../config
  2. To validate the configuration against the Xshield tenant, change the directory to util directory and execute
      cd ../util
    python xshield_util.py --help
  3. Please check the administration guide for steps to launch the xshield utility tool and perform command executions Deployment of Xshield Utility tool