-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9bc0d1
commit ada5f76
Showing
52 changed files
with
603 additions
and
210 deletions.
There are no files selected for viewing
Binary file added
BIN
+11.4 KB
docs/how-to-guides/data-sources/collect-azure-resource-data/img/access-control.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.92 KB
...ow-to-guides/data-sources/collect-azure-resource-data/img/add-client-secret.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.9 KB
docs/how-to-guides/data-sources/collect-azure-resource-data/img/add-permission.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.72 KB
.../how-to-guides/data-sources/collect-azure-resource-data/img/add-permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.12 KB
...-to-guides/data-sources/collect-azure-resource-data/img/add-role-assignment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.3 KB
.../how-to-guides/data-sources/collect-azure-resource-data/img/api-permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.7 KB
docs/how-to-guides/data-sources/collect-azure-resource-data/img/app-essentials.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.03 KB
...ow-to-guides/data-sources/collect-azure-resource-data/img/app-registrations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.6 KB
...to-guides/data-sources/collect-azure-resource-data/img/certificates-secrets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.9 KB
...-to-guides/data-sources/collect-azure-resource-data/img/client-secret-value.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.8 KB
...ow-to-guides/data-sources/collect-azure-resource-data/img/new-client-secret.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.16 KB
...how-to-guides/data-sources/collect-azure-resource-data/img/new-registration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.02 KB
docs/how-to-guides/data-sources/collect-azure-resource-data/img/next-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.3 KB
docs/how-to-guides/data-sources/collect-azure-resource-data/img/reader-role.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39 KB
...to-guides/data-sources/collect-azure-resource-data/img/register-application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+21.9 KB
docs/how-to-guides/data-sources/collect-azure-resource-data/img/review-assign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.2 KB
...guides/data-sources/collect-azure-resource-data/img/role-assignment-members.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11 KB
...o-guides/data-sources/collect-azure-resource-data/img/select-members-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.42 KB
docs/how-to-guides/data-sources/collect-azure-resource-data/img/select-members.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+41.7 KB
...w-to-guides/data-sources/collect-azure-resource-data/img/service-management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.15 KB
docs/how-to-guides/data-sources/collect-azure-resource-data/img/subscription.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.26 KB
docs/how-to-guides/data-sources/collect-azure-resource-data/img/subscriptions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.9 KB
...w-to-guides/data-sources/collect-azure-resource-data/img/user-impersonation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
219 changes: 219 additions & 0 deletions
219
docs/how-to-guides/data-sources/collect-azure-resource-data/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
--- | ||
sidebar_label: Collect Azure Resource Data | ||
--- | ||
|
||
# How to Collect Azure Resource Data | ||
|
||
The [Azure](../../../reference/unified-data-model/azure.mdx) collector is configured within the [Fix Inventory Worker configuration](../../../reference/configuration/index.mdx) via the [`config` command](../../../reference/cli/config/index.mdx) in [Fix Inventory Shell](../../../reference/components/shell.mdx). | ||
|
||
## Prerequisites | ||
|
||
This guide assumes that you have already [installed](../../../getting-started/install/index.mdx) Fix Inventory. | ||
|
||
## Directions | ||
|
||
### 1. Enable the Azure Collector | ||
|
||
1. Open the [Fix Inventory Worker configuration](../../../reference/configuration/index.mdx) via the [`config` command](../../../reference/cli/config) in [Fix Inventory Shell](../../../reference/components/shell): | ||
|
||
```bash | ||
> config edit fix.worker | ||
``` | ||
|
||
2. Add `azure` to the list of collectors by modifying the configuration as follows: | ||
|
||
```yaml | ||
fixworker: | ||
... | ||
# List of collectors to run | ||
collector: | ||
# highlight-next-line | ||
- 'azure' | ||
... | ||
... | ||
``` | ||
|
||
### 2. Configure Azure | ||
|
||
1. Open the Azure console. | ||
|
||
2. In the search box, type **App registrations** and select the **App registrations** service: | ||
|
||
![Azure app registrations](./img/app-registrations.png) | ||
|
||
3. Click **New registration**: | ||
|
||
![Azure new registration](./img/new-registration.png) | ||
|
||
4. Enter a name for the application and click the **Register** button: | ||
|
||
![Azure register application](./img/register-application.png) | ||
|
||
5. Make note of the displayed **Application (client) ID** and **Directory (tenant) ID**: | ||
|
||
![Azure application (client) ID & directory (tenant) ID](./img/app-essentials.png) | ||
|
||
:::note | ||
|
||
These values will be provided as `client_id` and `tenant_id` to the Azure collector. | ||
|
||
::: | ||
|
||
6. Click on **Certificates & secrets** in the left-hand menu: | ||
|
||
![Azure certificates & secrets](./img/certificates-secrets.png) | ||
|
||
7. Click **New client secret**: | ||
|
||
![Azure new client secret](./img/new-client-secret.png) | ||
|
||
8. Enter a description for the secret, select an expiration period, and click the **Add** button: | ||
|
||
![Azure add client secret](./img/add-client-secret.png) | ||
|
||
9. Make note of the displayed **Value** of the created secret: | ||
|
||
![Azure client secret value](./img/client-secret-value.png) | ||
|
||
:::note | ||
|
||
This value will be provided as `client_secret` to the Azure collector. | ||
|
||
::: | ||
|
||
10. Click on **API permissions** in the left-hand menu: | ||
|
||
![Azure API permissions](./img/api-permissions.png) | ||
|
||
11. Click **Add a permission**: | ||
|
||
![Azure add a permission](./img/add-permission.png) | ||
|
||
12. Click **Azure Service Management**: | ||
|
||
![Azure service management](./img/service-management.png) | ||
|
||
13. Select the **user_impersonation** permission: | ||
|
||
![Azure user impersonation permission](./img/user-impersonation.png) | ||
|
||
14. Click the **Add permissions** button: | ||
|
||
![Azure add permissions](./img/add-permissions.png) | ||
|
||
15. In the search box, type **Subscriptions** and select the **Subscriptions** service: | ||
|
||
![Azure subscriptions](./img/subscriptions.png) | ||
|
||
16. Click on your subscription: | ||
|
||
![Azure subscription](./img/subscription.png) | ||
|
||
17. Click **Access control (IAM)** in the left-hand menu: | ||
|
||
![Azure access control (IAM)](./img/access-control.png) | ||
|
||
18. Click **Add role assignment**: | ||
|
||
![Azure add role assignment](./img/add-role-assignment.png) | ||
|
||
19. In the **Role** tab, select the **Reader** role: | ||
|
||
![Azure reader role](./img/reader-role.png) | ||
|
||
20. Click the **Next** button: | ||
|
||
![Azure next button](./img/next-button.png) | ||
|
||
21. In the **Members** tab, click **Select members**: | ||
|
||
![Azure select members](./img/role-assignment-members.png) | ||
|
||
22. Search for the application you created earlier: | ||
|
||
![Azure search application](./img/select-members-search.png) | ||
|
||
23. Click the application and click the **Select** button: | ||
|
||
![Azure select button](./img/select-members.png) | ||
|
||
24. Click the **Review + assign** button: | ||
|
||
![Azure review + assign](./img/review-assign.png) | ||
|
||
### 3. Authenticate with Azure | ||
|
||
<Tabs> | ||
<TabItem value="configuration" label="Fix Inventory Worker Configuration"> | ||
|
||
1. Open the [Fix Inventory Worker configuration](../../../reference/configuration/index.mdx) via the [`config` command](../../../reference/cli/config) in [Fix Inventory Shell](../../../reference/components/shell): | ||
|
||
```bash | ||
> config edit fix.worker | ||
``` | ||
|
||
2. Modify the `azure` section of the configuration as follows, adding your API tokens and/or access keys: | ||
|
||
```yaml | ||
azure: | ||
# highlight-start | ||
accounts: | ||
default: | ||
client_secret: | ||
tenant_id: '<tenant ID>' | ||
client_id: '<client ID>' | ||
client_secret: '<client secret>' | ||
# highlight-end | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="environment" label="Environment Variables"> | ||
|
||
**Instead of specifying API tokens or secret access keys in the [Fix Inventory Worker configuration](../../../reference/configuration/index.mdx) directly, it is possible to define them using the [`--override` flag or `FIXWORKER_OVERRIDE` environment variable](../../../reference/configuration/index.mdx#overriding-individual-properties).** | ||
|
||
1. Set the `FIXWORKER_OVERRIDE` environment variable: | ||
|
||
- Add a environment variable definition to the `fixworker` service in `docker-compose.yaml`: | ||
|
||
```yaml title="docker-compose.yaml" | ||
services: | ||
... | ||
fixworker: | ||
# highlight-start | ||
environment: | ||
- FIXWORKER_OVERRIDE="azure.accounts.default.client_secret.tenant_id=<tenant ID> azure.accounts.default.client_secret.client_id=<client ID> azure.accounts.default.client_secret.client_secret=<client secret>" | ||
# highlight-end | ||
... | ||
... | ||
``` | ||
|
||
- Recreate the `fixworker` container with the updated service definition: | ||
|
||
```bash | ||
$ docker-compose up -d | ||
``` | ||
|
||
:::note | ||
|
||
[Docker Compose V2 integrated compose functions in to the Docker platform.](https://docs.docker.com/compose/#compose-v2-and-the-new-docker-compose-command) | ||
|
||
In Docker Compose V2, the command is `docker compose` (no hyphen) instead of `docker-compose`. | ||
|
||
::: | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
### 4. Trigger Resource Collection | ||
|
||
1. By default, Fix Inventory performs resource collection each hour. To immediately trigger a collect run, use the [`workflow run` command](../../../reference/cli/workflow/run.mdx) in [Fix Inventory Shell](../../../reference/components/shell): | ||
|
||
```bash | ||
> workflow run collect | ||
``` | ||
|
||
2. Once the collect run completes, you can view a summary of collected [Azure resources](../../../reference/unified-data-model/azure.mdx) using the following search: | ||
|
||
```bash | ||
> search is(azure_resource) | count kind | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+11.4 KB
...X/how-to-guides/data-sources/collect-azure-resource-data/img/access-control.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.92 KB
...ow-to-guides/data-sources/collect-azure-resource-data/img/add-client-secret.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.9 KB
...X/how-to-guides/data-sources/collect-azure-resource-data/img/add-permission.png
Oops, something went wrong.
Binary file added
BIN
+1.72 KB
.../how-to-guides/data-sources/collect-azure-resource-data/img/add-permissions.png
Oops, something went wrong.
Binary file added
BIN
+5.12 KB
...-to-guides/data-sources/collect-azure-resource-data/img/add-role-assignment.png
Oops, something went wrong.
Binary file added
BIN
+11.3 KB
.../how-to-guides/data-sources/collect-azure-resource-data/img/api-permissions.png
Oops, something went wrong.
Binary file added
BIN
+12.7 KB
...X/how-to-guides/data-sources/collect-azure-resource-data/img/app-essentials.png
Oops, something went wrong.
Binary file added
BIN
+8.03 KB
...ow-to-guides/data-sources/collect-azure-resource-data/img/app-registrations.png
Oops, something went wrong.
Binary file added
BIN
+11.6 KB
...to-guides/data-sources/collect-azure-resource-data/img/certificates-secrets.png
Oops, something went wrong.
Binary file added
BIN
+16.9 KB
...-to-guides/data-sources/collect-azure-resource-data/img/client-secret-value.png
Oops, something went wrong.
Binary file added
BIN
+12.8 KB
...ow-to-guides/data-sources/collect-azure-resource-data/img/new-client-secret.png
Oops, something went wrong.
Binary file added
BIN
+5.16 KB
...how-to-guides/data-sources/collect-azure-resource-data/img/new-registration.png
Oops, something went wrong.
Binary file added
BIN
+2.02 KB
...-4.X/how-to-guides/data-sources/collect-azure-resource-data/img/next-button.png
Oops, something went wrong.
Binary file added
BIN
+30.3 KB
...-4.X/how-to-guides/data-sources/collect-azure-resource-data/img/reader-role.png
Oops, something went wrong.
Binary file added
BIN
+39 KB
...to-guides/data-sources/collect-azure-resource-data/img/register-application.png
Oops, something went wrong.
Binary file added
BIN
+21.9 KB
....X/how-to-guides/data-sources/collect-azure-resource-data/img/review-assign.png
Oops, something went wrong.
Binary file added
BIN
+15.2 KB
...guides/data-sources/collect-azure-resource-data/img/role-assignment-members.png
Oops, something went wrong.
Binary file added
BIN
+11 KB
...o-guides/data-sources/collect-azure-resource-data/img/select-members-search.png
Oops, something went wrong.
Binary file added
BIN
+8.42 KB
...X/how-to-guides/data-sources/collect-azure-resource-data/img/select-members.png
Oops, something went wrong.
Binary file added
BIN
+41.7 KB
...w-to-guides/data-sources/collect-azure-resource-data/img/service-management.png
Oops, something went wrong.
Binary file added
BIN
+2.15 KB
...4.X/how-to-guides/data-sources/collect-azure-resource-data/img/subscription.png
Oops, something went wrong.
Binary file added
BIN
+7.26 KB
....X/how-to-guides/data-sources/collect-azure-resource-data/img/subscriptions.png
Oops, something went wrong.
Binary file added
BIN
+37.9 KB
...w-to-guides/data-sources/collect-azure-resource-data/img/user-impersonation.png
Oops, something went wrong.
Oops, something went wrong.