Add a Webhook in the Juniper Mist Portal
-
In the Juniper Mist™ portal, navigate to the organization or site settings:
-
For organization-level webhooks, select Organization > Settings.
-
For site-level webhooks, select Organization > Site Configuration, and then select the site.
Note:The following example demonstrates configuring site-level webhooks. When configuring organization-level webhooks, the options that display will be different, such as the list of available webhook topics to choose from.
-
-
Scroll down to the Webhooks section, and click Add Webhook.
-
Enter the information:
-
Name—Enter a name to identify this Webhook.
-
Webhook Type—Select HTTP Post, OAuth2, or Splunk. For OAuth2, the Mist cloud will act as the client for the selected type and authenticate against an authorization server to get a token, which it then appends to the Webhook Authorization Headers.
-
URL—Enter the URL of destination you want Mist to send the Webhooks to.
-
Grant Types—(OAuth2 only) There are two ways of requesting access tokens from the customer system:
-
Password-based, which requires the user name and password of the resource owner.
-
Client Credentials-based, which requires the Client ID and Client Secret provided by the OAuth IDP.
-
-
Topics—Select the topics you want to receive Webhooks for. You must select at least one.
-
-
(Optional) Click Advanced Settings for additional options.
-
Verify Certificate—This option is enabled by default. If you do not want Mist to verify that the certificate of the webhook receiver is valid, click No. Although this method is not secure, it does provide some flexibility if your webhook receiver does not have a valid signed certificate. We do not recommend this method, for security reasons.
-
Secret (HTTP-POST only)—Using a secret allows you to specify a secret (like a password) used to calculate a pair of HTTP headers. A secret enables you to verify that the message is coming from Juniper Mist and has not been modified.
-
Custom Headers—The Custom Headers configuration enables you to specify any custom headers needed for your webhook receiver. Some receivers (or their proxies) require a token-based authentication method, user-based authentication, or a method to present custom headers to indicate the type of data being sent.
Note:Keep these cautions in mind when considering whether to use a secret or custom headers:
- When a secret is provided, two HTTP headers will be added:
- X-Mist-Signature: HMAC_SHA1 (secret, body)
- X-Mist-Signature-v2: HMAC_SHA256 (secret, body)
- If the headers format is invalid, “X-Mist-Error”: “headers format invalid” will be sent.
- If the total bytes of the headers exceed 1000, “X-Mist-Error”: “headers too big” will be sent.
- If any header value is not a string, “X-Mist-Error”: “header[%s] not a string” will be sent.
-
- Click Add.