Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Diagnostic Settings for Azure Network Azure Firewall #223

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
89f6db3
collecting azure network azure firewall entities and relationships
KeionneDerousselle Feb 11, 2021
d24196c
Merge branch 'master' into feature/diagnostic-settings-network
KeionneDerousselle Feb 11, 2021
af9950d
writing a unit test for collecting azure network azure firewall entit…
KeionneDerousselle Feb 12, 2021
addccef
taking another recording of the network steps
KeionneDerousselle Feb 12, 2021
9f0b660
removing uneeded await on a non asynchronous call
KeionneDerousselle Feb 12, 2021
8adb3cf
adding all possible diagnostic settings for network to terraform so t…
KeionneDerousselle Feb 12, 2021
6cf32a3
adding all possible diagnostic settings for api management services t…
KeionneDerousselle Feb 12, 2021
4300077
adding all possible diagnostic settings for batch accounts to terrafo…
KeionneDerousselle Feb 12, 2021
27b7a57
adding all possible diagnostic settings for cdn profiles and endpoint…
KeionneDerousselle Feb 12, 2021
ecdebc5
adding all possible diagnostic settings for azure network resources t…
KeionneDerousselle Feb 12, 2021
71d4112
adding all possible diagnostic settings for container registry regstr…
KeionneDerousselle Feb 12, 2021
c9f49bb
adding all possible diagnostic settings for event grid topics and dom…
KeionneDerousselle Feb 12, 2021
80656e6
adding all possible diagnostic settings for key vault to terraform so…
KeionneDerousselle Feb 12, 2021
a0bf687
collecting diagnostic settings entities and relationships for azure f…
KeionneDerousselle Feb 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ and this project adheres to
Public IP Addresses
- Collected Diagnostic Settings entities and relationships for Azure Network
Virtual Networks
- Added `azure_network_azure_firewall` entities
- Added `azure_resource_group|has|azure_network_azure_firewall` relationships
- Collected Diagnostic Setting entities and relationships for Azure Network
Azure Firewalls
- Refactored the terraform creation for Diagnostic Settings for Azure Batch
Accounts, Azure CDN Endpoints, Azure CDN Profiles, Azure Key Vaults, Azure
Network Load Balancers, Azure Network Security Groups, Azure Network Public IP
Addresses, Azure Network Virtual Networks, Azure Event Grid Domains, and Azure
Event Grid Topics. This was because Azure was creating default Diagnostic
Settings for categories not specified in the terraform. This was producing
inconsistent test results. See
https://github.com/terraform-providers/terraform-provider-azurerm/issues/7235#issuecomment-647974840
for more details.

## 5.11.2 - 2020-02-05

Expand Down
2 changes: 2 additions & 0 deletions docs/jupiterone.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ The following entities are created:
| [RM] Monitor Log Profile | `azure_monitor_log_profile` | `Configuration` |
| [RM] MySQL Database | `azure_mysql_database` | `Database`, `DataStore` |
| [RM] MySQL Server | `azure_mysql_server` | `Database`, `DataStore`, `Host` |
| [RM] Network Azure Firewall | `azure_network_azure_firewall` | `Firewall` |
| [RM] Network Interface | `azure_nic` | `NetworkInterface` |
| [RM] Policy Assignment | `azure_policy_assignment` | `ControlPolicy` |
| [RM] PostgreSQL Database | `azure_postgresql_database` | `Database`, `DataStore` |
Expand Down Expand Up @@ -199,6 +200,7 @@ The following relationships are created/mapped:
| `azure_resource_group` | **HAS** | `azure_managed_disk` |
| `azure_resource_group` | **HAS** | `azure_mariadb_server` |
| `azure_resource_group` | **HAS** | `azure_mysql_server` |
| `azure_resource_group` | **HAS** | `azure_network_azure_firewall` |
| `azure_resource_group` | **HAS** | `azure_nic` |
| `azure_resource_group` | **HAS** | `azure_postgresql_server` |
| `azure_resource_group` | **HAS** | `azure_private_dns_zone` |
Expand Down
4 changes: 4 additions & 0 deletions src/getStepStartStates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
STEP_RM_NETWORK_SECURITY_GROUPS,
STEP_RM_NETWORK_VIRTUAL_NETWORKS,
STEP_RM_NETWORK_SECURITY_GROUP_RULE_RELATIONSHIPS,
STEP_RM_NETWORK_AZURE_FIREWALLS,
} from './steps/resource-manager/network';
import {
STEP_RM_STORAGE_RESOURCES,
Expand Down Expand Up @@ -121,6 +122,7 @@ describe('getStepStartStates', () => {
[STEP_RM_NETWORK_SECURITY_GROUP_RULE_RELATIONSHIPS]: { disabled: true },
[STEP_RM_NETWORK_INTERFACES]: { disabled: true },
[STEP_RM_NETWORK_LOAD_BALANCERS]: { disabled: true },
[STEP_RM_NETWORK_AZURE_FIREWALLS]: { disabled: true },
[STEP_RM_NETWORK_PUBLIC_IP_ADDRESSES]: { disabled: true },
[STEP_RM_COMPUTE_VIRTUAL_MACHINE_IMAGES]: { disabled: true },
[STEP_RM_COMPUTE_VIRTUAL_MACHINE_DISKS]: { disabled: true },
Expand Down Expand Up @@ -197,6 +199,7 @@ describe('getStepStartStates', () => {
[STEP_RM_NETWORK_SECURITY_GROUP_RULE_RELATIONSHIPS]: { disabled: true },
[STEP_RM_NETWORK_INTERFACES]: { disabled: true },
[STEP_RM_NETWORK_LOAD_BALANCERS]: { disabled: true },
[STEP_RM_NETWORK_AZURE_FIREWALLS]: { disabled: true },
[STEP_RM_NETWORK_PUBLIC_IP_ADDRESSES]: { disabled: true },
[STEP_RM_COMPUTE_VIRTUAL_MACHINE_IMAGES]: { disabled: true },
[STEP_RM_COMPUTE_VIRTUAL_MACHINE_DISKS]: { disabled: true },
Expand Down Expand Up @@ -273,6 +276,7 @@ describe('getStepStartStates', () => {
[STEP_RM_NETWORK_SECURITY_GROUP_RULE_RELATIONSHIPS]: { disabled: false },
[STEP_RM_NETWORK_INTERFACES]: { disabled: false },
[STEP_RM_NETWORK_LOAD_BALANCERS]: { disabled: false },
[STEP_RM_NETWORK_AZURE_FIREWALLS]: { disabled: false },
[STEP_RM_NETWORK_PUBLIC_IP_ADDRESSES]: { disabled: false },
[STEP_RM_COMPUTE_VIRTUAL_MACHINE_IMAGES]: { disabled: false },
[STEP_RM_COMPUTE_VIRTUAL_MACHINE_DISKS]: { disabled: false },
Expand Down
2 changes: 2 additions & 0 deletions src/getStepStartStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
STEP_RM_NETWORK_SECURITY_GROUP_RULE_RELATIONSHIPS,
STEP_RM_NETWORK_SECURITY_GROUPS,
STEP_RM_NETWORK_VIRTUAL_NETWORKS,
STEP_RM_NETWORK_AZURE_FIREWALLS,
} from './steps/resource-manager/network/constants';
import {
STEP_RM_STORAGE_RESOURCES,
Expand Down Expand Up @@ -138,6 +139,7 @@ export function getResourceManagerSteps(): GetApiSteps {
STEP_RM_NETWORK_INTERFACES,
STEP_RM_NETWORK_PUBLIC_IP_ADDRESSES,
STEP_RM_NETWORK_LOAD_BALANCERS,
STEP_RM_NETWORK_AZURE_FIREWALLS,
STEP_RM_COMPUTE_VIRTUAL_MACHINE_IMAGES,
STEP_RM_COMPUTE_VIRTUAL_MACHINE_DISKS,
STEP_RM_COMPUTE_VIRTUAL_MACHINES,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"entries": [
{
"_id": "3440be136d06dd892a0cafcdd940df38",
"_id": "9d62ae571eb541c135fae72616ae365c",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -25,7 +25,7 @@
},
{
"name": "client-request-id",
"value": "2823103d-0694-4b12-9f0a-1def66bd9b46"
"value": "829bd87d-8af7-49d9-a583-25e34e081f68"
},
{
"name": "return-client-request-id",
Expand Down Expand Up @@ -70,18 +70,18 @@
"value": "1.0"
}
],
"url": "https://login.microsoftonline.com/bcd90474-9b62-4040-9d7b-8af257b1427d/oauth2/token?api-version=1.0"
"url": "https://login.microsoftonline.com/4a17becb-fb42-4633-b5c8-5ab66f28d195/oauth2/token?api-version=1.0"
},
"response": {
"bodySize": 1450,
"content": {
"mimeType": "application/json; charset=utf-8",
"size": 1450,
"text": "{\"token_type\":\"Bearer\",\"expires_in\":\"3599\",\"ext_expires_in\":\"3599\",\"expires_on\":\"1610735644\",\"not_before\":\"1610731744\",\"resource\":\"https://management.azure.com/\",\"access_token\":\"[REDACTED]\"}"
"text": "{\"token_type\":\"Bearer\",\"expires_in\":\"3599\",\"ext_expires_in\":\"3599\",\"expires_on\":\"1613169462\",\"not_before\":\"1613165562\",\"resource\":\"https://management.azure.com/\",\"access_token\":\"[REDACTED]\"}"
},
"cookies": [
{
"expires": "2021-02-14T17:34:04.000Z",
"expires": "2021-03-14T21:37:42.000Z",
"httpOnly": true,
"name": "fpc",
"path": "/",
Expand Down Expand Up @@ -113,6 +113,10 @@
"name": "pragma",
"value": "no-cache"
},
{
"name": "content-length",
"value": "1450"
},
{
"name": "content-type",
"value": "application/json; charset=utf-8"
Expand All @@ -135,15 +139,15 @@
},
{
"name": "client-request-id",
"value": "2823103d-0694-4b12-9f0a-1def66bd9b46"
"value": "829bd87d-8af7-49d9-a583-25e34e081f68"
},
{
"name": "x-ms-request-id",
"value": "037a8011-7053-40f5-9f7b-732393e11800"
"value": "9e02e356-939b-47d6-91a8-cf94a1917700"
},
{
"name": "x-ms-ests-server",
"value": "2.1.11397.13 - CHI ProdSlices"
"value": "2.1.11459.16 - CHI ProdSlices"
},
{
"name": "x-ms-clitelem",
Expand All @@ -166,15 +170,11 @@
},
{
"name": "date",
"value": "Fri, 15 Jan 2021 17:34:03 GMT"
"value": "Fri, 12 Feb 2021 21:37:41 GMT"
},
{
"name": "connection",
"value": "close"
},
{
"name": "content-length",
"value": "1450"
}
],
"headersSize": 782,
Expand All @@ -183,16 +183,16 @@
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2021-01-15T17:34:03.940Z",
"time": 405,
"startedDateTime": "2021-02-12T21:37:41.720Z",
"time": 411,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 405
"wait": 411
}
},
{
Expand All @@ -211,7 +211,7 @@
{
"_fromType": "array",
"name": "x-ms-client-request-id",
"value": "e3d47973-8ab1-4463-b1c7-a85fcdc7a13e"
"value": "72a5aa4d-fd70-40b8-a65c-234492f2776f"
},
{
"_fromType": "array",
Expand Down Expand Up @@ -265,11 +265,11 @@
"url": "https://management.azure.com/subscriptions?api-version=2016-06-01"
},
"response": {
"bodySize": 336,
"bodySize": 337,
"content": {
"mimeType": "application/json; charset=utf-8",
"size": 336,
"text": "{\"value\":[{\"id\":\"/subscriptions/40474ebe-55a2-4071-8fa8-b610acdd8e56\",\"authorizationSource\":\"RoleBased\",\"subscriptionId\":\"40474ebe-55a2-4071-8fa8-b610acdd8e56\",\"displayName\":\"Azure subscription 1\",\"state\":\"Enabled\",\"subscriptionPolicies\":{\"locationPlacementId\":\"Public_2014-09-01\",\"quotaId\":\"PayAsYouGo_2014-09-01\",\"spendingLimit\":\"Off\"}}]}"
"size": 337,
"text": "{\"value\":[{\"id\":\"/subscriptions/87f62f44-9dad-4284-a08f-f2fb3d8b528a\",\"authorizationSource\":\"RoleBased\",\"subscriptionId\":\"87f62f44-9dad-4284-a08f-f2fb3d8b528a\",\"displayName\":\"Azure subscription 1\",\"state\":\"Enabled\",\"subscriptionPolicies\":{\"locationPlacementId\":\"Public_2014-09-01\",\"quotaId\":\"PayAsYouGo_2014-09-01\",\"spendingLimit\":\"Off\"}}]}"
},
"cookies": [],
"headers": [
Expand Down Expand Up @@ -299,15 +299,15 @@
},
{
"name": "x-ms-request-id",
"value": "e4801809-150b-471e-892e-d7fe5270d3dc"
"value": "a0870787-1713-4f42-82ae-327a58ac5aa7"
},
{
"name": "x-ms-correlation-request-id",
"value": "e4801809-150b-471e-892e-d7fe5270d3dc"
"value": "a0870787-1713-4f42-82ae-327a58ac5aa7"
},
{
"name": "x-ms-routing-request-id",
"value": "WESTCENTRALUS:20210115T173404Z:e4801809-150b-471e-892e-d7fe5270d3dc"
"value": "CENTRALUS:20210212T213742Z:a0870787-1713-4f42-82ae-327a58ac5aa7"
},
{
"name": "strict-transport-security",
Expand All @@ -319,37 +319,37 @@
},
{
"name": "date",
"value": "Fri, 15 Jan 2021 17:34:04 GMT"
"value": "Fri, 12 Feb 2021 21:37:42 GMT"
},
{
"name": "connection",
"value": "close"
},
{
"name": "content-length",
"value": "336"
"value": "337"
}
],
"headersSize": 588,
"headersSize": 584,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2021-01-15T17:34:04.349Z",
"time": 229,
"startedDateTime": "2021-02-12T21:37:42.136Z",
"time": 349,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 229
"wait": 349
}
},
{
"_id": "ae56ab59166c177f596934c075af7bcc",
"_id": "5c1db22c845769a7b03a36e33c2d10bd",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -369,7 +369,7 @@
{
"_fromType": "array",
"name": "x-ms-client-request-id",
"value": "ccdfd42c-8f24-4304-a4db-4ea02f10aaf1"
"value": "ac063a10-abe7-456a-87ee-94a656d9194a"
},
{
"_fromType": "array",
Expand Down Expand Up @@ -415,14 +415,14 @@
"value": "2019-12-01"
}
],
"url": "https://management.azure.com/subscriptions/40474ebe-55a2-4071-8fa8-b610acdd8e56/resourceGroups/j1dev/providers/Microsoft.ApiManagement/service/j1dev/apis?api-version=2019-12-01"
"url": "https://management.azure.com/subscriptions/87f62f44-9dad-4284-a08f-f2fb3d8b528a/resourceGroups/j1dev/providers/Microsoft.ApiManagement/service/j1dev/apis?api-version=2019-12-01"
},
"response": {
"bodySize": 1099,
"bodySize": 1089,
"content": {
"mimeType": "application/json; charset=utf-8",
"size": 1099,
"text": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/40474ebe-55a2-4071-8fa8-b610acdd8e56/resourceGroups/j1dev/providers/Microsoft.ApiManagement/service/j1dev/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"subscriptionRequired\": true,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/40474ebe-55a2-4071-8fa8-b610acdd8e56/resourceGroups/j1dev/providers/Microsoft.ApiManagement/service/j1dev/apis/j1dev-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"j1dev-api\",\r\n \"properties\": {\r\n \"displayName\": \"j1dev API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"\",\r\n \"subscriptionRequired\": false,\r\n \"serviceUrl\": \"\",\r\n \"path\": \"j1dev/test\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true,\r\n \"apiVersion\": \"\"\r\n }\r\n }\r\n ],\r\n \"count\": 2\r\n}"
"size": 1089,
"text": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/87f62f44-9dad-4284-a08f-f2fb3d8b528a/resourceGroups/j1dev/providers/Microsoft.ApiManagement/service/j1dev/apis/echo-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"echo-api\",\r\n \"properties\": {\r\n \"displayName\": \"Echo API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": null,\r\n \"subscriptionRequired\": true,\r\n \"serviceUrl\": \"http://echoapi.cloudapp.net/api\",\r\n \"path\": \"echo\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/87f62f44-9dad-4284-a08f-f2fb3d8b528a/resourceGroups/j1dev/providers/Microsoft.ApiManagement/service/j1dev/apis/j1dev-api\",\r\n \"type\": \"Microsoft.ApiManagement/service/apis\",\r\n \"name\": \"j1dev-api\",\r\n \"properties\": {\r\n \"displayName\": \"j1dev API\",\r\n \"apiRevision\": \"1\",\r\n \"description\": \"\",\r\n \"subscriptionRequired\": true,\r\n \"serviceUrl\": \"\",\r\n \"path\": \"j1dev/test\",\r\n \"protocols\": [\r\n \"https\"\r\n ],\r\n \"authenticationSettings\": null,\r\n \"subscriptionKeyParameterNames\": null,\r\n \"isCurrent\": true,\r\n \"apiVersion\": \"\"\r\n }\r\n }\r\n ],\r\n \"count\": 2\r\n}"
},
"cookies": [],
"headers": [
Expand Down Expand Up @@ -456,7 +456,7 @@
},
{
"name": "x-ms-request-id",
"value": "6c7d540f-c5fd-4ccf-83c7-5683ff81ddff"
"value": "cd1db986-92c3-4312-a8a6-dc54398a08d6"
},
{
"name": "x-ms-ratelimit-remaining-subscription-reads",
Expand All @@ -468,37 +468,37 @@
},
{
"name": "x-ms-correlation-request-id",
"value": "e030b450-013d-4fc2-9152-3c6f85c2020a"
"value": "fcb89d6d-da21-4823-b778-b2e2c0d9bb2b"
},
{
"name": "x-ms-routing-request-id",
"value": "WESTCENTRALUS:20210115T173405Z:e030b450-013d-4fc2-9152-3c6f85c2020a"
"value": "CENTRALUS:20210212T213743Z:fcb89d6d-da21-4823-b778-b2e2c0d9bb2b"
},
{
"name": "date",
"value": "Fri, 15 Jan 2021 17:34:05 GMT"
"value": "Fri, 12 Feb 2021 21:37:42 GMT"
},
{
"name": "connection",
"value": "close"
}
],
"headersSize": 632,
"headersSize": 628,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2021-01-15T17:34:04.583Z",
"time": 576,
"startedDateTime": "2021-02-12T21:37:42.492Z",
"time": 584,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 576
"wait": 584
}
}
],
Expand Down
Loading