Skip to content

Push Security Webhooks (v1)

Overview

Configure webhooks for the Push Security platform and receive real-time updates when events occur.

Each webhook event has the following:

  • Versioning
  • Idempotency key
  • Metadata
  • New and old objects to show exactly what has changed
  • A signature for verifying sender authenticity

Creating webhooks

To create or manage your webhooks, go to the Settings page in the Push admin console.

Acknowledging an event

Your endpoint has 5 seconds to respond with a 200 OK (or any other 2xx response). Otherwise, retry behavior will be triggered.

Retry behavior

Each event will be sent a maximum of 4 times at the following time intervals:

  • Immediately
  • After 1 minute
  • After 5 minutes
  • After 15 minutes

If the event is acknowledged within a 5-second window, no more retries will be attempted.

Each retry of the event will have a newly generated X-Signature, but the event id will be the same for all retries.

Handling duplicate events

The payload body is JSON-encoded and contains an idempotency key named id. If you want to ensure that you handle an event exactly once, please store this value and compare it against incoming events. This can be used to discard duplicate events that have been delivered more than once.

Verifying signatures

Each event has a header X-Signature which contains 2 parts:

  • A UNIX timestamp value t (in seconds)
  • An HMAC-SHA-256 value v1 which contains the payload signature to check using your webhook secret obtained at the time you created it

Here is an example of how it is formatted:

X-Signature: t=1698349494,v1=0E01666E58BC2E6C64E9A5DA66C28CF9D88C3E342CCFC029D56B749A4B4282CE

To calculate and verify the signature, perform the following steps:

  1. Parse the X-Signature header by splitting it first by , and then by = to obtain key-value pairs.
  2. Store the t (timestamp) and v1 (signature) values in variables.
  3. Concatenate the value of t (as a string) with a . and the JSON request body (in its raw format).
  4. Use the HMAC-SHA256 algorithm to compute the hash of the concatenated string.
  5. Compare the computed HMAC with the v1 value from the header to verify the signature.
  6. Additionally, check the timestamp (t) and compare it to the current time. If the difference is bigger than 35 mins (or your preferable threshold) you should discard the event to avoid replay attacks.

Example in Python:

import json
import hmac
import hashlib
import time

# Your secret key for the webhook
SECRET_KEY = b'psws_ad9d0bba8260baf774c3821acaff1b7d'

# Example header and request body (you would normally get these from the incoming HTTP request)
example_header = 't=1698349494,v1=0E01666E58BC2E6C64E9A5DA66C28CF9D88C3E342CCFC029D56B749A4B4282CE'
example_request_body = json.dumps({"key": "value"})

# Step 1: Parse the header
elements = example_header.split(',')
parsed_header = {}
for element in elements:
    key, value = element.split('=')
    parsed_header[key] = value

# Step 2: Store 't' and 'v1' values in variables
received_t = parsed_header.get('t')
received_v1 = parsed_header.get('v1')

# Step 3: Concatenate 't' value with '.' and the JSON request body
payload = f"{received_t}.{example_request_body}"

# Step 4: Compute the HMAC using SHA256
computed_hmac = hmac.new(SECRET_KEY, payload.encode(), hashlib.sha256).hexdigest().upper()

# Step 5: Compare the signature
is_valid = hmac.compare_digest(received_v1, computed_hmac)

# Step 6: Check the timestamp
current_time = int(time.time())
time_difference = current_time - int(received_t)
if time_difference > 2100:  # 35 minutes
    is_valid = False
    message = "Timestamp is too old."
else:
    message = "Signature verified" if is_valid else "Signature mismatch"

print(f"Is the signature valid? {is_valid}. Message: {message}")

Example in Node.js:

const crypto = require('crypto');

// Your secret key for the webhook
const SECRET_KEY = 'psws_ad9d0bba8260baf774c3821acaff1b7d';

// Example header and request body (you'd normally get these from the incoming HTTP request)
const exampleHeader = 't=1698349494,v1=0E01666E58BC2E6C64E9A5DA66C28CF9D88C3E342CCFC029D56B749A4B4282CE';
const exampleRequestBody = JSON.stringify({ key: 'value' });

// Step 1: Parse the header
const elements = exampleHeader.split(',');
const parsedHeader = {};
elements.forEach((element) => {
  const [key, value] = element.split('=');
  parsedHeader[key] = value;
});

// Step 2: Store 't' and 'v1' values in variables
const receivedT = parsedHeader['t'];
const receivedV1 = parsedHeader['v1'];

// Step 3: Concatenate 't' value with '.' and the JSON request body
const payload = `${receivedT}.${exampleRequestBody}`;

// Step 4: Compute the HMAC using SHA256
const computedHmac = crypto.createHmac('sha256', SECRET_KEY).update(payload).digest('hex');

// Step 5: Compare the signature
const isValid = crypto.timingSafeEqual(Buffer.from(receivedV1, 'hex'), Buffer.from(computedHmac, 'hex'));

// Step 6: Check the timestamp
const currentTime = Math.floor(Date.now() / 1000);
const timeDifference = currentTime - parseInt(receivedT, 10);
let message;

if (timeDifference > 2100) {  // 35 minutes
  isValid = false;
  message = 'Timestamp is too old.';
} else {
  message = isValid ? 'Signature verified' : 'Signature mismatch';
}

console.log(`Is the signature valid? ${isValid}. Message: ${message}`);

Versioning

The payload body is JSON-encoded and contains a value named version. You're currently working with version 1 of the Push Security webhooks. Should there be any breaking changes in the future, we'll bump up this version number. If you have any webhooks configured, we'll send you notifications over email about the deprecation date for the older version.

Custom headers

Some SIEMs or other external systems where you may wish to send Push webhook events require a custom HTTP header for authorization. You can configure a custom header for webhooks in the Push admin console.

Go to Settings > Webhooks and add a new webhook. You will see a dropdown option for Custom headers.

Then enter a header key and value. Note that once your header key and value are entered, you will not be able to view them again, as they may contain secrets.

Filtering events

You may wish to send only specific types (or categories) of Push webhook events to your receiver. You can configure this when creating a new webhook in the Push admin console.

Go to Settings > Webhooks and add a new webhook. You will see a dropdown option for Select events.

Then you can select the specific events, or categories of events, to enable. If you select a category, any new events that are added to that category later (as part of new features released) will also be sent.

Download OpenAPI description
Servers
https://api.pushsecurity.com/

Activity

Events representing employee activity.

Webhooks

Audit

Audit log events.

Webhooks

Controls

Events related to any of the control features.

Webhooks

App bannerWebhook

Request

Security
X-Signature
Headers
X-Signaturestringrequired
Example: X-Signature: t=1492774577,v1=5257a869...
Bodyapplication/json

An app banner event was detected.

versionstring

The version of the event.

Example: "1"
idstring(uuid)

The unique identifier for the event. This can be used as an idempotency key.

Example: "c478966c-f927-411c-b919-179832d3d50c"
timestampinteger

When the event occurred, formatted as a UNIX timestamp (in seconds).

Example: 1698604061
categorystring

The category of the event.

Value"CONTROL"
descriptionstring

The description of the event. Note: this is subject to change and should not be used to match on this object.

Example: "user@example.com saw a banner on Google Workspace"
objectstring

The object that was created.

Value"APP_BANNER"
friendlyNamestring

The friendly name of this object. Note: this is subject to change and should not be used to match on this object.

Example: "App banner"
newobject(App banner)

This object represents an app banner event, indicating an employee has interacted with an app banner.

new.​employeeobject(Employee)

This object represents an employee in your organization.

new.​employee.​idstring

Unique identifier for the employee

Example: "2a2197de-ad2c-47e4-8dcb-fb0f04cf83e0"
new.​employee.​emailstring(email)

Primary email address of the employee

Example: "john.hill@example.com"
new.​employee.​firstNamestring

First name of the employee

Example: "John"
new.​employee.​lastNamestring

Last name of the employee

Example: "Hill"
new.​employee.​departmentstring

Department - as provided by connected API integrations

Example: "Security Engineering"
new.​employee.​locationstring

Location - as provided by connected API integrations

Example: "New York"
new.​employee.​licensedboolean

Whether the employee is licensed on the Push platform

Example: true
new.​employee.​creationTimestampinteger

When this employee was created, formatted as a UNIX timestamp (in seconds)

Example: 1698669223
new.​employee.​chatopsEnabledbooleanDeprecated

Whether the employee has ChatOps enabled

Deprecation notice: this value no longer does anything unless you still have access to the legacy Employee chat topics functionality on your account. It will be removed in the next API version.

Example: true
new.​urlstring or null

The URL that the banner was shown on. This is null if an app rule was used.

Example: "https://openai.com"
new.​appTypestring or null

The app that the banner was configured on. This is null if a URL pattern rule was used.

Example: "OPENAI"
new.​appBannerobject(App Banner)

This object represents an app banner.

new.​appBanner.​titlestring

Title of the app banner.

Example: "This is a title"
new.​appBanner.​subtextstring

Subtext of the app banner.

Example: "This is the subtext that supports limited [markdown](https://markdown.org)"
new.​appBanner.​modestring(AppBannerModeType)

All possible ENUM values for app banner modes

Enum"INFORM""ACKNOWLEDGE""REASON""BLOCK"
new.​appBanner.​buttonTextstring or null

Button text of the app banner. Only applicable when the app banner is in ACKNOWLEDGE or REASON mode, or is in BLOCK mode with allowReasonSubmission set to true.

Example: "Proceed anyway"
new.​appBanner.​allowReasonSubmissionboolean or null

Whether the user is allowed to submit a request to access a blocked page. Only applicable when the app banner is in BLOCK mode.

Example: false
new.​appBanner.​displayFrequencystring or null(AppBannerDisplayFrequencyType)

All possible ENUM values for how frequently the app banner is displayed.

Enum"ONCE_PER_TAB""ONCE_PER_BROWSER"
new.​actionstring(AppBannerActionType)

All possible ENUM values for app banner actions

Enum"ACKNOWLEDGED""DISPLAYED""SUBMITTED_REASON"
new.​reasonstring or null

Reason provided by the employee for bypassing or requesting access to the app. Applicable when the action is SUBMITTED_REASON.

Example: "I need to access this app for my work."
new.​sourceIpAddressstring

The IP address of the user interacting with the app banner.

Example: "8.158.25.38"
new.​browserany(BrowserType)

The browser used by the employee

Enum"CHROME""FIREFOX""EDGE""SAFARI""OPERA""BRAVE""ARC""ISLAND""PRISMA_ACCESS""UNKNOWN"
new.​osany(OSType)

The OS used by the employee

Enum"MACOS""WINDOWS""LINUX""CHROME_OS""IOS""ANDROID""UNKNOWN"
new.​userAgentstring

The user agent string reported by the browser

Example: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299"

Responses

Return any 2XX status to indicate that the data was received successfully

Blocked URL visitedWebhook

Request

Security
X-Signature
Headers
X-Signaturestringrequired
Example: X-Signature: t=1492774577,v1=5257a869...
Bodyapplication/json

A blocked URL was visited.

versionstring

The version of the event.

Example: "1"
idstring(uuid)

The unique identifier for the event. This can be used as an idempotency key.

Example: "c478966c-f927-411c-b919-179832d3d50c"
timestampinteger

When the event occurred, formatted as a UNIX timestamp (in seconds).

Example: 1698604061
categorystring

The category of the event.

Value"CONTROL"
descriptionstring

The description of the event. Note: this is subject to change and should not be used to match on this object.

Example: "user@example.com attempted to visit https://blocked.com"
objectstring

The object that was created.

Value"BLOCKED_URL_VISITED"
friendlyNamestring

The friendly name of this object. Note: this is subject to change and should not be used to match on this object.

Example: "Blocked URL visited"
newobject(Blocked URL Visited)

This object represents a blocked URL visited event, indicating an employee tried to visit a URL that has been blocked.

new.​employeeobject(Employee)

This object represents an employee in your organization.

new.​employee.​idstring

Unique identifier for the employee

Example: "2a2197de-ad2c-47e4-8dcb-fb0f04cf83e0"
new.​employee.​emailstring(email)

Primary email address of the employee

Example: "john.hill@example.com"
new.​employee.​firstNamestring

First name of the employee

Example: "John"
new.​employee.​lastNamestring

Last name of the employee

Example: "Hill"
new.​employee.​departmentstring

Department - as provided by connected API integrations

Example: "Security Engineering"
new.​employee.​locationstring

Location - as provided by connected API integrations

Example: "New York"
new.​employee.​licensedboolean

Whether the employee is licensed on the Push platform

Example: true
new.​employee.​creationTimestampinteger

When this employee was created, formatted as a UNIX timestamp (in seconds)

Example: 1698669223
new.​employee.​chatopsEnabledbooleanDeprecated

Whether the employee has ChatOps enabled

Deprecation notice: this value no longer does anything unless you still have access to the legacy Employee chat topics functionality on your account. It will be removed in the next API version.

Example: true
new.​urlstring

The blocked URL.

Example: "https://example.com/login"
new.​referrerUrlstring or null

The URL the user was on before navigating to the blocked URL.

Example: "https://statics.teams.cdn.office.net/"
new.​sourceIpAddressstring

The IP address of the user.

Example: "8.158.25.38"
new.​browserany(BrowserType)

The browser used by the employee

Enum"CHROME""FIREFOX""EDGE""SAFARI""OPERA""BRAVE""ARC""ISLAND""PRISMA_ACCESS""UNKNOWN"
new.​osany(OSType)

The OS used by the employee

Enum"MACOS""WINDOWS""LINUX""CHROME_OS""IOS""ANDROID""UNKNOWN"
new.​userAgentstring

The user agent string reported by the browser.

Example: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299"
new.​urlSchemaObfuscationBlockboolean

Whether the URL was blocked because of schema obfuscation or not

Responses

Return any 2XX status to indicate that the data was received successfully

Browser extension blocked or enabledWebhook

Request

Security
X-Signature
Headers
X-Signaturestringrequired
Example: X-Signature: t=1492774577,v1=5257a869...
Bodyapplication/json

A browser extension was blocked or force enabled for an employee.

versionstring

The version of the event.

Example: "1"
idstring(uuid)

The unique identifier for the event. This can be used as an idempotency key.

Example: "c478966c-f927-411c-b919-179832d3d50c"
timestampinteger

When the event occurred, formatted as a UNIX timestamp (in seconds).

Example: 1698604061
categorystring

The category of the event.

Value"CONTROL"
descriptionstring

The description of the event. Note: this is subject to change and should not be used to match on this object.

Example: "user@example.com attempted to use Example Extension (dljjddkmmcminffjbcmeccgfbjlhmhlm), but was blocked"
objectstring

The object that was created.

Enum"BROWSER_EXTENSION_BLOCKED""BROWSER_EXTENSION_ENABLED"
friendlyNamestring

The friendly name of this object. Note: this is subject to change and should not be used to match on this object.

Example: "Browser extension blocked"
newobject(Browser extension state enforcement)

This object represents a browser extension state enforcement event, indicating an employee had a browser extension blocked or force enabled.

new.​employeeobject(Employee)

This object represents an employee in your organization.

new.​employee.​idstring

Unique identifier for the employee

Example: "2a2197de-ad2c-47e4-8dcb-fb0f04cf83e0"
new.​employee.​emailstring(email)

Primary email address of the employee

Example: "john.hill@example.com"
new.​employee.​firstNamestring

First name of the employee

Example: "John"
new.​employee.​lastNamestring

Last name of the employee

Example: "Hill"
new.​employee.​departmentstring

Department - as provided by connected API integrations

Example: "Security Engineering"
new.​employee.​locationstring

Location - as provided by connected API integrations

Example: "New York"
new.​employee.​licensedboolean

Whether the employee is licensed on the Push platform

Example: true
new.​employee.​creationTimestampinteger

When this employee was created, formatted as a UNIX timestamp (in seconds)

Example: 1698669223
new.​employee.​chatopsEnabledbooleanDeprecated

Whether the employee has ChatOps enabled

Deprecation notice: this value no longer does anything unless you still have access to the legacy Employee chat topics functionality on your account. It will be removed in the next API version.

Example: true
new.​extensionIdstring

ID of the browser extension that was blocked/enabled

Example: "dljjddkmmcminffjbcmeccgfbjlhmhlm"
new.​extensionNamestring or null

Name of the browser extension that was blocked/enabled (only populated if the browser extension has been previously observed)

Example: "Example Extension"
new.​browserExtensionBlockedobject or null

Details about the browser extension block (only present for block events)

new.​browserExtensionBlocked.​titlestring

The title of the browser extension disabled banner

Example: "Extension Blocked"
new.​browserExtensionBlocked.​subtextstring

The subtext of the browser extension disabled banner

Example: "This extension has been blocked by your administrator"
new.​triggerstring or null

Enum describing the trigger for the block action (only present for block events)

Enum"DISABLED_ON_INSTALL""DISABLED_ON_USER_ENABLE""BLOCKED_ON_STORE_VISIT"
Example: "DISABLED_ON_INSTALL"
new.​sourceIpAddressstring

The IP address of the user

Example: "8.158.25.38"
new.​browserany(BrowserType)

The browser used by the employee

Enum"CHROME""FIREFOX""EDGE""SAFARI""OPERA""BRAVE""ARC""ISLAND""PRISMA_ACCESS""UNKNOWN"
new.​osany(OSType)

The OS used by the employee

Enum"MACOS""WINDOWS""LINUX""CHROME_OS""IOS""ANDROID""UNKNOWN"
new.​userAgentstring

The user agent string reported by the browser

Example: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299"

Responses

Return any 2XX status to indicate that the data was received successfully

Detections

Webhooks

Entities

Events representing CRUD operations on entities.

Webhooks