Setup Notifications

Notification are a great way to keep track of what's happening with your Border0 organization. Using notifications you'll be able to subscribe to all client login events, as well as API audit events.

This guide will explain how to set up Border0 to send notifications. Border0 supports two notification types.

  1. Email
  2. Webhooks (for example, to notify Slack).

Email

With the email notification type, Border0 will send an email for each of the configured event types. A single notification can be configured with up to ten email recipients. This type is helpful for notifying humans.

Webhook

The webhook notification type can be used to let Border0 communicate with other API services. A webhook takes a URL as a parameter that will be used to send an HTTP POST request that contains the event information. For example, this type can be used to set up an integration with Slack.

1284

Slack notification message

Event types

Notifications are triggered by events. The following event types are supported:

  1. New sessions, this event will trigger on any successful client login.
  2. Failed sessions, this event will be triggered on a client login failure.
  3. Audit events, any audit event in the organization will trigger this event.

Create a notification rule

A notification can be created using the portal, CLI, or our API. Only users with the admin role can manage notifications.

Portal

In the portal, click on Organization Settings on the left menu and then select the Notifications tab.
Now you can use the New Notification button to add a new notification.

1454

A new email notification example.

CLI

Usage:

$ border0 organization notification
manage organization notifications

Usage:
  border0 organization notification [command]

Available Commands:
  add            Add organization notification
  list           list organization notifications
  remove         Remove organization notification
  show           Show organization notification
  update         Update organization notification

Flags:
  -h, --help   help for notification

Use "border0 organization notification [command] --help" for more information about a command.

Adding a new notification of type webhook using the CLI:

$ border0 organization notification add slack-webhook --type webhook --webhook-url https://hooks.slack.com/services/XYZ/ABC/xxx --event login-success --event login-failure --event audit-events
┌─────────────┬──────────────────────────────────────────────┐
│ Name        │ slack-webhook                                │
│ Type        │ webhook                                      │
│ Enabled     │ ✔                                            │
│ Webhook URL │ https://hooks.slack.com/services/XYZ/ABC/xxx │
│ Events      │ login-success                                │
│             │ login-failure                                │
│             │ audit-events                                 │
└─────────────┴──────────────────────────────────────────────┘

Slack integration

To set up a slack integration with Border0 using notifications, you first need to set up an application in slack that can be used for notifications. See https://api.slack.com/messaging/webhooks for more information about creating a webhook app in slack.

Below is an example of how to set up a new App in Slack.

  1. Create app and select From scratch
518

Create a new App in Slack

  1. Provide a name for the App and select the workspace you want to use.
507

Configure app

  1. Once the app is created you can enable Webhooks, select Incoming Webhooks
1180
  1. Activate Incoming Webhooks and select Add new Webhook to Workspace
1222
  1. Select the channel you want to use for notifications
719
  1. copy the webhook URL using the copy button
1073

Now that the slack app has been set up, we can use the copied webhook URL to configure a notification by adding a Webhook notification here.

1711

Configure the slack webhook

In the URL field, you can paste the copied URL from slack and select the events you want to receive in the slack channel. After creating the notifications, the slack integration is activated. 🎉

Now you have Slack integration working! The screenshot below is an example of Slack notifying the team of a Failed client login attempt. It shows the details of the login attempt and why it failed.
Below that, we see what a subsequent successful login looks like.

1534