Table of Contents | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Introduction
Microsoft Azure, often referred to as Azure is a cloud computing platform run by Microsoft. It offers access, management, and the development of applications and services through global data centers. It also provides a range of capabilities, including software as a service (SaaS), platform as a service (PaaS), and infrastructure as a service (IaaS).
...
This setup guide will cover the basic required setup for the SNARE - Azure cloud log collection to work. Security related setup, charges you may incur, and other intricacies related to Microsoft Azure will not be covered in detail in this guide.
Overview
All applications, whether on-premises or in the cloud, must include logging since it aids in security implementation and debugging. Azure provides services in order to collect cloud platform logs to ensure optimal application performance.
Snare Central can be configured to collect activity and resource or diagnostic logs from Azure using Log Analytics API.
...
Snare Central needs to request authentication keys from Microsoft Entra ID in order to connect to the Log Analytics API. Once authentication is accepted and the required API permission(s) were , required API permissions are granted, and access control is setup, Snare Central will be able to query the target activity and diagnostic logs using the same API.
About Azure platform logs
Below are the types of logs that can be collected from Azure (Snare Central supports the collection some log types, see details here for the supported log types).
...
Resource logs provide an insight into operations that were performed within an Azure resource, known as the data plane. Examples include getting a secret from a key vault or making a request to a database.
Log contents vary according to the Azure service and resource type.
Logs aren't collected until they're routed to a destination, to be enabled and configured via Diagnostic settings. While some Azure resource may have some special type of logs (e.g. Azure NSG - Flow logs)
Snare Central and Log Analytics API communication
In order for the Snare Central to properly communicate to and collect Azure logs using from the Log Analytics API, these things the following steps need to be created and setup first on completed in Azure environment:
Register Snare Central in Microsoft Entra ID.
Setting up application Access control Create Log Analytics workspace
Set up the workspace Access Control (IAM)
Create Log Analytics workspace.
Export activity and diagnostic logs towards to a Log Analytics workspace.
Register Snare Central in Microsoft Entra ID
To allow Snare Central to access the Log Analytics API, Snare Central must be registered in Microsoft Entra ID formerly known as Azure Active Directory (AD). This allows the Snare Central to establish an identity and specify the needed permission levels for the API access.
...
Expand | ||
---|---|---|
| ||
Step 1: App registration
Step 2: Key or client secret generation
Step 3: Setting up APIs permissions
|
Setting up application Access control (IAM)
To access resources under your subscription, you must assign a role to the application (previously created during App registration). Since Snare Central was associated with the said application, the role assigned to the application will be the basis of Snare Central’s access control towards the Azure subscription.
Without this step, Snare Central will not be able to proceed with its connection and collection towards Azure and you may encounter error: The provided credentials have insufficient access to perform the requested operation if not properly done.
Expand | ||
---|---|---|
| ||
Setting up application’s Access Control
|
Create Log Analytics workspace
When Azure collects logs and data, the information is stored in a workspace. A workspace has a unique workspace ID and resource ID. After you've created a workspace, you can configure the Azure resource(s) to send the activity logs and diagnostic logs to the created workspace.
Snare Central can query and collect logs from the created workspace using the Log Analytics API.
Expand | ||
---|---|---|
| ||
Creating a workspace
|
Export activity and diagnostic logs towards Log Analytics workspace.
...
title | Export activity and diagnostic logs. |
---|
...
Create Log Analytics workspace
When Azure collects logs and data, the information is stored in a workspace. A workspace has a unique workspace ID and resource ID. After you've created a workspace, you can configure the Azure resource(s) to send the activity logs and diagnostic logs to the created workspace.
Snare Central can query and collect logs from the created workspace using the Log Analytics API.
Expand | ||
---|---|---|
| ||
Creating a workspace
|
Set up the workspace Access Control (IAM)
Expand | ||
---|---|---|
| ||
Setting up Access Control (IAM)
|
Export activity and diagnostic logs to a Log Analytics workspace.
Expand | ||
---|---|---|
| ||
Export activity logs to a Log Analytics workspace
Export diagnostic logs towards to the Log Analytics workspace
|
Setting Up Snare Central - Azure Cloud Log Collection
Starting from Snare Central v8.6.0, Azure Cloud Log Collection functionality will be is available as long as you have the proper license for it.
...
Expand | ||
---|---|---|
| ||
Step 1. Go to Snare Central and navigate to System > Administrative Tools > Cloud Log Collection Configuration. Step 2. Select Azure Cloud and Click ADD CLOUD COLLECTION button. Step 3. Input all the necessary Azure Cloud Collection Configuration Information and click Test Connection Button to check if the configuration is correct and can properly connect to the Log Analytics API.
Step 4. Click ADD button, then you should be able to see the added Azure Cloud Log Collector under the Azure Cloud Collection List. |
Updating/Deleting - Azure Cloud Log Collection Configuration
If you want to update or delete an existing Azure Cloud - Log Collector that were previously configured, you can simply use the Snare Central’s Cloud Log Collection Configuration Web UI and follow the simple steps below.
Expand | ||
---|---|---|
| ||
Step 1. Go to Snare Central and navigate to System > Administrative Tools > Cloud Log Collection Configuration. Step 2. Select Azure Cloud and Click the Azure Cloud Log Collector that you want to update. Step 3. In the Edit screen, you can update the configuration and optionally do a Test Connection to check if the updated configuration can successfully connect to the Log Analytics API, then simply click the SAVE button to save the updated configuration. |
Expand | ||
---|---|---|
| ||
Step 1.
Step 4. Click ADD button, then you should be able to see the added Azure Cloud Log Collector under the Azure Cloud Collection List. |
Updating/Deleting - Azure Cloud Log Collection Configuration
If you want to update or delete an existing Azure Cloud - Log Collector that were previously configured, you can simply use the Snare Central’s Cloud Log Collection Configuration Web UI and follow the simple steps below.
Expand | ||
---|---|---|
| ||
Step 1. Go to Snare Central and navigate to System > Administrative Tools > Cloud Log Collection Configuration. Step 2. Select Azure Cloud and Click the Azure Cloud Log Collector that you want to update. Step 3. In the Edit screen, you can update the configuration and optionally do a Test Connection to check if the updated configuration can successfully connect to the Log Analytics API, then simply click the SAVE button to save the updated configuration. |
Expand | ||
---|---|---|
| ||
Step 1. Go to Snare Central and navigate to System > Administrative Tools > Cloud Log Collection Configuration. Step 2. Select Azure Cloud and Click the Azure Cloud Collector that you want to delete.
|
Troubleshooting Guide
This guide will be your resource for resolving common issues and challenges that you may encounter with Azure - Cloud Log Collection.
Azure Cloud icon is gray in System > Administrative Tools > Cloud Log Collection Configuration Web UI.
Expand | ||
---|---|---|
| ||
When Azure Cloud icon in Cloud Log Providers list is gray, it is possible that Snare Central does not have IA_CLOUD or IA_CLOUD_O365 license.
You can check it via navigating to Status > Snare Health Checker or simply click the heart icon in the lower left corner of Snare Central and scroll down to Snare Central License and select Show Details to view the License Information.
If there are no IA_CLOUD or IA_CLOUD_O365 in the License Information, then you needed the correct license with IA_CLOUD or IA_CLOUD_O365. Once you have the correct license, click License Page button.
In the License Update page, click Browse button and navigate to the correct license then click Load License button. Wait for a while then navigate to System > Administrative Tools > Cloud Log Collection Configuration and you should be able to see Azure Cloud icon is now green and you should be able to Add Azure Cloud Collection. |
Azure Cloud Log Collector icon is gray, and the Status is Not Running (Disabled by configuration)
Expand | ||
---|---|---|
| ||
When your configured Azure Cloud Log Collector icon is gray, it is possible that the log collector is disabled during configuration or toggled off. Select the Azure Cloud Log Collector and check if Status: Not Running (Disabled by configuration) To enable Azure Cloud Log Collector, simply toggle on the Enable button beside its name in Cloud Log Providers or the one in the upper right corner beside the Edit icon, then click Confirm in the pop-up dialog box. Once toggled to ON, the configured Azure Cloud Log Collector icon should be green and enabled. Snare Central will now start collecting Azure activity and platform Logs (assuming that the configuration parameters were valid and working). |
Azure Cloud Log Collector icon is red, and the Status is Not Running (Could not generate access token for ….)
Expand | ||
---|---|---|
| ||
When the Azure Cloud Log Collector icon is red and Status is Not Running (Could not generate access token for ….), it is possible that the Client ID or Client Secret is invalid or expired. Go to Azure portal site and check if Tenant ID is correct or if the Client ID and Client Secret is not yet expired or check if the value entered in the Snare Central cloud collection configuration is correct. If the value entered in the Snare Central Configuration is incorrect, you can simply edit it by clicking the Edit icon on the upper left corner. |
Azure Cloud Log Collector icon is red, and the Status is Not Running (The provided credentials have insufficient access …)
Expand | ||
---|---|---|
| ||
When the Azure Cloud Log Collector icon is red and Status: Not Running (The provided credentials have insufficient access …), it is possible that the Log Analytics API permission is not properly set, or the Log Analytics workspace’s access control was not properly configured. Go to the Azure portal site, check the assigned application at Application Registration, and verify if the permissions were properly set. See App Registration guide above, to identify whether API has the correct permission. If the permission is correct, then check the Log Analytics workspace’s access control to see if it's properly configured. See Setting up workspace Access Control guide, to identify whether access control is properly configured or not. Update and configure the necessary API permission and workspace’s access control then re-enable the collector by Disabling and Enabling Azure Cloud Log Collector again after 5 minutes (it may take a while for the new settings to reflect on the entire Azure environment). |
Azure Cloud Log Collector icon is red, and the Status is Not Running (The workspace could not be found for logtype ...)
Expand | ||
---|---|---|
| ||
When the Azure Cloud Log Collector icon is red and Status: Not Running (The workspace could not be found for logtype ...), it is possible that the configured Workspace ID is incorrect or does not exist. Go to Azure portal site and search for the target Log Analytics workspace and check if the Workspace ID value entered in the Snare Central cloud collection configuration is correct. If the Workspace ID value entered in the Snare Central Configuration is incorrect, you can simply edit and update it by clicking the Edit icon on the upper left corner. If Log Analytics workspace does not exist, then you need to create a new Log Analytic workspace (See Create Log Analytics workspace guide), setup the necessary access control (See Setting up workspace Access Control guide) and edit the Workspace ID on the collector’s configuration. |
Azure Cloud Log Collector icon is red, and the Status is Not Running (Cannot connect to microsoft API, please check the IP configuration …)
Expand | ||
---|---|---|
| ||
When the Azure Cloud Log Collector icon is red and the Status is Status: Not Running (Cannot connect to microsoft API, please check the IP configuration of the Snare Central.), it is possible that the IP Configuration is incorrect. Go to Snare Central and navigate to System > Administrative Tools > Configuration Wizard > IP Address Configuration then check if the IP Configuration parameters were correct (most of the time the problem lies on the Domain Name Server(s)). After updating the necessary IP Configuration parameter/s, re-enable the collector by Disabling and Enabling Azure Cloud Log Collector again after 1 minutes. |
Azure Cloud Log Collector icon is red, and the Status is Not Running (Cannot connect to proxy server, ….)
Expand | ||
---|---|---|
| ||
When the Azure Cloud Log Collector icon is red and the Status is Status: Not Running (Cannot connect to proxy server, ….), it is possible that the proxy was enabled in the Snare Central with incorrect settings. Go to Snare Central and navigate to System > Administrative Tools > Configuration Wizard > Network Services then Proxy Settings, check the following:
After updating the necessary Proxy Settings or configuring the proper firewall settings, re-enable the collector by Disabling and Enabling Azure Cloud Log Collector again after 1 minute. |
Azure Cloud Log Collector icon is red, and the Status is Not Running (Invalid proxy credentials...)
Expand | ||
---|---|---|
| ||
When the Azure Cloud Log Collector icon is red and the Status is Status: Not Running (Invalid proxy credentials, please re-configure these parameters.), it is possible that the proxy was enabled in the Snare Central with incorrect settings. Go to Snare Central and navigate to System > Administrative Tools > Configuration Wizard > Network Services then Proxy Settings, check the following.
|
Azure Cloud Log Collector icon is red, and the Status is Not Running (Invalid proxy type…)
Expand | ||
---|---|---|
| ||
When the Azure Cloud Log Collector icon is red and the Status is Status: Not Running (Invalid proxy type, please re-configure 'type' based on the actual proxy server type.), it is possible that the proxy was enabled in the Snare Central with incorrect settings. Go to Snare Central and navigate to System > Administrative Tools > Cloud Log Collection Configuration. Step 2. Select Azure Cloud and Click the Azure Cloud Collector that you want to delete. Click the Delete icon on the top right of the details panel.Configuration Wizard > Network Services then Proxy Settings, check the following:
After updating the necessary Proxy Settings or configuring the proper firewall settings, re-enable the collector by Disabling and Enabling Azure Cloud Log Collector again after 1 minute. |