Alert Channels
Alert Channels
Portal menu label: Alerts.
You can define an alert channel with one or more alert actions:
-
Email
-
Email Role (Emails all users with a Mamori role)
-
HTTP operation. Methods:
-
GET
-
POST
-
PUT
-
DELETE
-
-
Mamori notification (Alert Mamori Mobile App)
-
Event
Alert channels are used in connection policies, statement policies and access on-demand policies.
To create an alert channel
Click Server Settings > AlertsClick Add
Next, enter the details
Field Description Alert Name reference for alert channel Alert Type the type of alert Alert details enter details for alert type Click to add another alert in the channel
Click Create to save the channel
Parameters
To use parameters place the parameter inside brackets {{parameter}}.
Parameters for tcp events
-
username
-
source (client IP address)
-
device (user's device name)
Parameters for connection and session events
-
username
-
source (client IP address)
-
target (target datasource)
-
context (client information)
parameters for on-demand events
-
applicant
-
applicant_message
-
agent
-
agent_message
-
procedure (the policy name)
-
request_key
-
status
Email Alert
Next, enter the details
| Field | Description |
|---|---|
| Email Addresses | comma separated list of emails or parameter {{applicant_email}} |
| Subject | email subject |
| Body | email content |
Email Role
Next, enter the details
| Field | Description |
|---|---|
| Role | A role name or parameter {{endorsing_role}} |
| Subject | email subject |
| Body | email content |
Example Email Body
DB access alert
username: {{username}}
accessing datasource {{target}}
client ip: {{source}}
context: {{context}}
contextjson: {{contextjson}}
Mamori Notification Alert
Sends a notification to the Mamori mobile application.
Next, enter the details
| Field | Description |
|---|---|
| Recipient Name | Mamori user name or parameter for example, {{applicant}} |
| Notification Type | Message (Message Web Authenticator)PushMessage (Message Mamori Mobile App) |
| Body | content |
Messages content is a JSON object
title
message (HTML string content with parameters)
navigate-status (optional navigation)
"endorsed" "declined"navigate-to (optional navigation)
"0" Policies page "1" Requests page "2' Request history page "3" Pending Approvals "4" Approval History "5" Active Permissions "6" Active Session "7" Approved Requests
Example Endorsement Alert
{
"title":"Endorsed Notification",
"navigate-status":"endorsed",
"message":"<p style='text-align:left'>
<br>
<strong>policy: {{procedure}}</strong><br>
applicant: {{applicant}}<br>
message: {{applicant_message}}<br>
agent: {{agent}}<br>
reason: {{agent_message}}<br>
</p>"
}
HTTP Alert - Slack
Sends a notification to slack
Select HTTP as the alert type and enter the details
| Field | Description |
|---|---|
| HTTP Operation | POST |
| Header | |
| Url | your slack message hook |
| Body | content (JSON object) |
| Content Type | application/json |
Endorsement alert example
{"attachments": [
{ "color": "#2eb886",
"pretext": "A policy has been endorsed",
"author_name": "Mamori",
"title": "Policy Request for {{applicant}} endorsed by {{agent}}",
"text": "A policy request with the following parameters has been issued.",
"fallback": "Request Details",
"fields": {{contextjson}},
"footer": "This is a Mamori Policy Notification",
}
]
}
Intrusion alert example
{
"attachments": [
{ "color": "#f93836",
"pretext": "A wireguard peer has been blocked",
"author_name": "Mamori",
"title": "Wireguard peer blocked - {{device}}",
"text": "User: {{username}} - client ip: {{source}}",
"footer": "This is a Mamori Peer Notification",
}
]
}
HTTP Alert - Line
Sends a notification to Line
Select HTTP as the alert type and enter the details
| Field | Description |
|---|---|
| HTTP Operation | POST |
| Header | Authorization: Bearer YOURLINEGROUPKEY |
| Url | https://notify-api.line.me/api/notify |
| Content Type | application/x-www-form-urlencoded |
| Body | content |
Message content is a URL-encoded string
Example Endorsement Alert
message=A%20policy%20has%20been%20endorsed.%0D%0APolicy%20Request%20for%20{{applicant}}%20endorsed%20by%20{{agent}}%0D%0ARequest%20key:%20{{request_key}}%0APolicy%20name:%20{{procedure}}%0AApplicant%20message:%20{{applicant_message}}%0AReason:%20{{agent_message}}%0AStatus:%20{{status}}&notificationDisabled=false
Event
| Field | Description |
|---|---|
| Event Handler | Select the event handler to invoke for this alert |