My team and I need to get notified of any security events that occur, is there a way to do this in Octopus Deploy?
How can I configure Octopus Deploy to send an alert to MS Teams/Slack etc for a specific security event?
Within Octopus Deploy you can configure Subscriptions. These can subscribe to certain Events that occur within Octopus.
Let’s take an example of a User Role being amended.
First, we’ll create a Subscription that will fire when any change occurs on the User or User Role documents:
Go to the
Configurationmenu then select
Event Group -
Document Types -
Scoped User Role
- Event Group -
At this point, you can select whether you’d like to be notified by email and/or send a Webhook. For this example I’ll be using a Webhook.
There are a huge number of ways that the Webhook can be consumed to then notify onwards to trigger further events. A few cloud offering examples are:
- AWS Lambda
- Azure Function
- Microsoft Flow
- Google Cloud Functions
One of the quickest and simplest ways to automate a notification is to use Zapier, and that’s the example I’m going to look at here.
Create a new Zap and choose
Then take the URL supplied in the next step and save it to enter into the Octopus
Save the Subscription in Octopus and in Zapier click
Test and Continue.
I am going to configure the notification to go to Slack, so the next step is to choose that in Zapier.
Details of to configure this for your Slack can be found here: https://zapier.com/apps/slack/help
Now, in order to test this I can go into Octopus and create a new test
User Roleand have that message come through to Slack!
And that’s it! You can transform the Webhook payload to format the message you wish to notify people with and you could add multiple actions that should occur however in order to get the notification in its simplest form these straight forward steps should help get you moving!