You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sentinel/connect-aws.md
+89-24Lines changed: 89 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
title: Connect Microsoft Sentinel to Amazon Web Services to ingest AWS service log data
3
3
description: Use the AWS connector to delegate Microsoft Sentinel access to AWS resource logs, creating a trust relationship between Amazon Web Services and Microsoft Sentinel.
4
4
author: yelevin
5
-
ms.topic: how-to
6
-
ms.date: 12/12/2022
7
5
ms.author: yelevin
6
+
ms.topic: how-to
7
+
ms.date: 01/31/2024
8
8
---
9
9
10
10
# Connect Microsoft Sentinel to Amazon Web Services to ingest AWS service log data
@@ -54,6 +54,8 @@ This graphic and the following text show how the parts of this connector solutio
54
54
55
55
- To connect to the SQS queue and the S3 bucket, Microsoft Sentinel uses AWS credentials and connection information embedded in the AWS S3 connector's configuration. The AWS credentials are configured with a role and a permissions policy giving them access to those resources. Similarly, the Microsoft Sentinel workspace ID is embedded in the AWS configuration, so there is in effect two-way authentication.
56
56
57
+
For customers in **Azure Government clouds**, Microsoft Sentinel uses a federated web identity provider (Microsoft Entra ID) for authenticating with AWS through OpenID Connect (OIDC), and assuming an AWS IAM role.
58
+
57
59
## Connect the S3 connector
58
60
59
61
-**In your AWS environment:**
@@ -70,7 +72,7 @@ This graphic and the following text show how the parts of this connector solutio
70
72
71
73
-**In Microsoft Sentinel:**
72
74
73
-
- Enable and configure the **AWS S3 Connector** in the Microsoft Sentinel portal. See the instructions below.
75
+
- Enable and configure the **AWS S3 Connector** in the Microsoft Sentinel portal. [See the instructions below](#add-the-aws-role-and-queue-information-to-the-s3-data-connector).
74
76
75
77
## Automatic setup
76
78
@@ -86,6 +88,8 @@ The script takes the following actions:
86
88
87
89
- Configures any necessary IAM permissions policies and applies them to the IAM role created above.
88
90
91
+
For Azure Government clouds, a specialized script first creates an OIDC identity provider, to which it assigns the IAM assumed role. It then performs all the other steps above.
92
+
89
93
### Prerequisites for automatic setup
90
94
91
95
- You must have PowerShell and the AWS CLI on your machine.
@@ -103,10 +107,14 @@ To run the script to set up the connector, use the following steps:
103
107
If you don't see the connector, install the Amazon Web Services solution from the **Content Hub** in Microsoft Sentinel.
104
108
105
109
1. In the details pane for the connector, select **Open connector page**.
110
+
106
111
1. In the **Configuration** section, under **1. Set up your AWS environment**, expand **Setup with PowerShell script (recommended)**.
107
112
108
113
1. Follow the on-screen instructions to download and extract the [AWS S3 Setup Script](https://github.com/Azure/Azure-Sentinel/blob/master/DataConnectors/AWS-S3/ConfigAwsS3DataConnectorScripts.zip?raw=true) (link downloads a zip file containing the main setup script and helper scripts) from the connector page.
109
114
115
+
> [!NOTE]
116
+
> For ingesting AWS logs into an **Azure Government cloud**, download and extract [this specialized AWS S3 Gov Setup Script](https://github.com/Azure/Azure-Sentinel/blob/master/DataConnectors/AWS-S3/ConfigAwsS3DataConnectorScriptsGov.zip?raw=true) instead.
117
+
110
118
1. Before running the script, run the `aws configure` command from your PowerShell command line, and enter the relevant information as prompted. See [AWS Command Line Interface | Configuration basics](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html) (from AWS documentation) for details.
111
119
112
120
1. Now run the script. Copy the command from the connector page (under "Run script to set up the environment") and paste it in your command line.
@@ -137,19 +145,19 @@ Microsoft recommends using the automatic setup script to deploy this connector.
137
145
138
146
### Prepare your AWS resources
139
147
140
-
- Create an **S3 bucket** to which you will ship the logs from your AWS services - VPC, GuardDuty, CloudTrail, or CloudWatch.
148
+
1. Create an **S3 bucket** to which you will ship the logs from your AWS services - VPC, GuardDuty, CloudTrail, or CloudWatch.
141
149
142
150
- See the [instructions to create an S3 storage bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) in the AWS documentation.
143
151
144
-
- Create a standard **Simple Queue Service (SQS) message queue** to which the S3 bucket will publish notifications.
152
+
1. Create a standard **Simple Queue Service (SQS) message queue** to which the S3 bucket will publish notifications.
145
153
146
154
- See the [instructions to create a standard Simple Queue Service (SQS) queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/creating-sqs-standard-queues.html) in the AWS documentation.
147
155
148
-
- Configure your S3 bucket to send notification messages to your SQS queue.
156
+
1. Configure your S3 bucket to send notification messages to your SQS queue.
149
157
150
158
- See the [instructions to publish notifications to your SQS queue](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-event-notifications.html) in the AWS documentation.
151
159
152
-
### Create an AWS assumed role and grant access to the AWS Sentinel account
160
+
### Install AWS data connector and prepare environment
153
161
154
162
1. In Microsoft Sentinel, select **Data connectors** from the navigation menu.
155
163
@@ -161,24 +169,79 @@ Microsoft recommends using the automatic setup script to deploy this connector.
161
169
162
170
1. Under **Configuration**, expand **Setup with PowerShell script (recommended)**, then copy the **External ID (Workspace ID)** to your clipboard.
163
171
164
-
1. In a different browser window or tab, open the AWS console. Follow the [instructions in the AWS documentation for creating a role for an AWS account](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html).
165
-
166
-
- For the account type, instead of **This account**, choose **Another AWS account**.
167
-
168
-
- In the **Account ID** field, enter the number **197857026523** (you can copy and paste it from here). This number is **Microsoft Sentinel's service account ID for AWS**. It tells AWS that the account using this role is a Microsoft Sentinel user.
169
-
170
-
- In the options, select **Require external ID** (*do not* select *Require MFA*). In the **External ID** field, paste your Microsoft Sentinel **Workspace ID** that you copied in the previous step. This identifies *your specific Microsoft Sentinel account* to AWS.
171
-
172
-
- Assign the necessary permissions policies. These policies include:
173
-
-`AmazonSQSReadOnlyAccess`
174
-
-`AWSLambdaSQSQueueExecutionRole`
175
-
-`AmazonS3ReadOnlyAccess`
176
-
-`ROSAKMSProviderPolicy`
177
-
- Additional policies for ingesting the different types of AWS service logs.
178
-
179
-
For information on these policies, see the [AWS S3 connector permissions policies page](https://github.com/Azure/Azure-Sentinel/blob/master/DataConnectors/AWS-S3/AwsRequiredPolicies.md) in the Microsoft Sentinel GitHub repository.
172
+
### Create an AWS assumed role and grant access to the AWS Sentinel account
180
173
181
-
- Name the role with a meaningful name that includes a reference to Microsoft Sentinel. Example: "*MicrosoftSentinelRole*".
174
+
The following instructions apply for public **Azure Commercial clouds** only. For granting access to AWS from Azure Government clouds, see [For Azure Government: Use identity federation](#for-azure-government-use-identity-federation).
175
+
176
+
1. In a different browser window or tab, open the AWS console.
177
+
178
+
1. Create an **IAM assumed role**. Follow these instructions in the AWS documentation:<br>[Creating a role to delegate permissions to an IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html).
179
+
180
+
| Parameter | Selection/Value | Comments |
181
+
| - | - | - |
182
+
|**Trusted entity type**|*AWS account*| Instead of default *AWS service*. |
183
+
|**Which account**|*Another AWS account*,<br>Account ID `197857026523`| Instead of the default *This account*,<br>Microsoft Sentinel's application service account.|
|**External ID**| Your Microsoft Sentinel *Workspace ID*,<br>pasted from your clipboard. | This identifies *your specific Microsoft Sentinel account* to AWS. |
186
+
|**Permissions to assign**| <ul><li>`AmazonSQSReadOnlyAccess`<li>`AWSLambdaSQSQueueExecutionRole`<li>`AmazonS3ReadOnlyAccess`<li>`ROSAKMSProviderPolicy`<li>Additional policies for ingesting the different types of AWS service logs. | For information on these policies, see the [AWS S3 connector permissions policies page](https://github.com/Azure/Azure-Sentinel/blob/master/DataConnectors/AWS-S3/AwsRequiredPolicies.md) in the Microsoft Sentinel GitHub repository. |
187
+
|**Name**| Example: "*MicrosoftSentinelRole*". | Choose a meaningful name that includes a reference to Microsoft Sentinel. |
188
+
189
+
1. Continue with [Add the AWS role and queue information to the S3 data connector](#add-the-aws-role-and-queue-information-to-the-s3-data-connector) below.
190
+
191
+
#### For Azure Government: Use identity federation
192
+
193
+
1. In a different browser window or tab, open the AWS console.
194
+
195
+
1. Create a **web identity provider**. Follow these instructions in the AWS documentation:<br>[Creating OpenID Connect (OIDC) identity providers](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html).
196
+
197
+
| Parameter | Selection/Value | Comments |
198
+
| - | - | - |
199
+
|**Client ID**| Ignore this, you already have it. See **Audience** line below. ||
200
+
|**Provider type**|*OpenID Connect*| Instead of default *SAML*.|
1. Create an **IAM assumed role**. Follow these instructions in the AWS documentation:<br>[Creating a role for web identity or OpenID Connect Federation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html#idp_oidc_Create).
206
+
207
+
| Parameter | Selection/Value | Comments |
208
+
| - | - | - |
209
+
|**Trusted entity type**|*Web identity*| Instead of default *AWS service*. |
210
+
|**Identity provider**|`sts.windows.net/cab8a31a-1906-4287-a0d8-4eef66b95f6e/`| The provider you created in the previous step. |
211
+
|**Audience**|`api://d4230588-5f84-4281-a9c7-2c15194b28f7`| The audience you defined for the identity provider in the previous step. |
212
+
|**Permissions to assign**| <ul><li>`AmazonSQSReadOnlyAccess`<li>`AWSLambdaSQSQueueExecutionRole`<li>`AmazonS3ReadOnlyAccess`<li>`ROSAKMSProviderPolicy`<li>Additional policies for ingesting the different types of AWS service logs. | For information on these policies, see the [AWS S3 connector permissions policies page](https://github.com/Azure/Azure-Sentinel/blob/master/DataConnectors/AWS-S3/AwsRequiredPoliciesForGov.md) for Government, in the Microsoft Sentinel GitHub repository. |
213
+
|**Name**| Example: "*MicrosoftSentinelRole*". | Choose a meaningful name that includes a reference to Microsoft Sentinel. |
214
+
215
+
216
+
1. Edit the new role's trust policy and add another condition:<br>`"sts:RoleSessionName": "MicrosoftSentinel_{WORKSPACE_ID)"`
-`XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX` is your Microsoft Sentinel workspace ID.
243
+
244
+
Update (save) the policy when you're done editing.
182
245
183
246
### Add the AWS role and queue information to the S3 data connector
184
247
@@ -295,6 +358,7 @@ Setting up this connector has two steps:
295
358
> [!IMPORTANT]
296
359
> As of December 1, 2020, the **AwsRequestId** field has been replaced by the **AwsRequestId_** field (note the added underscore). The data in the old **AwsRequestId** field will be preserved through the end of the customer's specified data retention period.
297
360
361
+
298
362
---
299
363
300
364
## Next steps
@@ -303,3 +367,4 @@ In this document, you learned how to connect to AWS resources to ingest their lo
303
367
- Learn how to [get visibility into your data, and potential threats](get-visibility.md).
304
368
- Get started [detecting threats with Microsoft Sentinel](detect-threats-built-in.md).
305
369
-[Use workbooks](monitor-your-data.md) to monitor your data.
0 commit comments