Access hook scripts

This feature lets you automate tasks by executing custom scripts whenever a user's Access status changes. Guardicore Platform Agent executes these scripts with the end-user’s privileges.

Set up your Access hook scripts

This guide helps you create custom scripts that run automatically when a user's Access status changes (authenticated or unauthenticated). These hooks provide automation capabilities for managing system actions based on user access.

macOS

  1. Write your script(s) using Bash syntax and save them with .sh extensions:
  • on_login.sh: Executes when Access status becomes authenticated.
  • on_logout.sh: Executes when Access status becomes unauthenticated.
  1. Move the script(s) to the default scripts directory: /Library/Application Support/AZTClient/hooks/.
  2. Set read-only permissions for non-admin users. Run these commands from your administrator account:
    chmod 755 /Library/Application Support/AZTClient/hooks/on_login.sh
    chmod 755 /Library/Application Support/AZTClient/hooks/on_logout.sh

Your Access hook scripts are now configured. They will automatically execute whenever a user's Access authentication status changes.

Windows

  1. Write your script(s) and save them with one of the following extensions:
    • .bat, .cmd (Batch scripts)
    • .ps1 (PowerShell scripts)
    • .exe (Executable files)
  • on_login.<extension>: Executes when Access status becomes authenticated.
  • on_logout.<extension>: Executes when Access status becomes unauthenticated.
  1. Move the script(s) to the default scripts directory: C:\Program Files\AZTClient\hooks
  2. Set read-only permissions for non-admin users.
    1. Right-click each script file and select Properties.
    2. Go to the Security tab.
    3. Modify permissions so that non-admin users have read-only access.

Your Access hook scripts are now configured. They will automatically execute whenever a user's Access authentication status changes.