Hudu Expirations Monitor

 
Limited disclosure, restricted to participants’ organizations. Sources may use TLP:AMBER when information requires support to be effectively acted upon, yet carries risks to privacy, reputation, or operations if shared outside of the organizations involved. Recipients may only share TLP:AMBER information with members of their own organization, and with clients or customers who need to know the information to protect themselves or prevent further harm. 
 
 

Process Overview: 

The following process outlines the steps to create a webhook based expirations monitor for Hudu
 

Process Steps: 

 Hudu Configuration

  1. Navigate to Admin -> Alerts in Hudu and create a new alert
  2. Title the webhook Rewst Expirations, and select the Expiration List alert type
  3. Set the trigger alert, and select the option to alert on all expirations
  4. Check the "Optional: Configured Webhook" checkbox and paste in the Webhook URL from the Rewst Workflow trigger
  5. Enter the following webook payload:
    {
        "count": "$EXPIRATIONS_COUNT",
        "expirations": "$EXPIRATIONS_HUDU_URL"
    }

Rewst Workflow - Expirations Master Workflow

Trigger: Core - Webhook. Accept POST. Integration override for Hudu and PSA

Workflow Variables: Expiration Threshold

  1. BEGIN:
    1. Noop to initialize workflow and set logs variable
  2. ListExpirations
    1. Lists all expirations for the account
    2. In transition, filter down list to only expirations with a date in the next number of days set by the Expiration Threshold variable
    3. Log success/error to the logs variable
  3. For each expiration in the filtered list, send to the Create Hudu Expiration Alert subworkflow
    1. Asset ID is mapped in the output of this API call as expirationable_id, not id 
    2. Log success/error to the logs variable
  4. END
    1. End workflow and report logged errors. Errors in alert creation will be handled by the subworkflow(s)

Rewst Workflow - Create Hudu Expiration Alert

Input Variables:

  • companyId
  • date
  • id
  1. BEGIN
    1. Noop to initialize workflow and set logs variable
  2. Get Asset
    1. Using input variables for company ID and asset ID, lookup the details of the expiration
    2. Save the details as data aliases
    3. Log success/error to the logs variable
  3. Check for service ticket
    1. List service tickets from PSA to check for existing alert
      1. Ticket title will be in the format of "Upcoming expiration for {{Name}}"
    2. If existing alert is present matching the title, path to end
    3. Log success/error to logs variable
  4. Create new service ticket
    1. Create a new service ticket with the following format
      1. Title: Upcoming expiration for {{Name}}
      2. Initial Description: An asset of the type {{Expiration Type}} titled {{Name}} is set to expire on {{Date}}. View the details here {{AssetLink}}
    2. Log success/error to logs variable
  5. END
    1. End workflow and report logged errors