Create a Workload Federated Identity role
Learn more about creating a Workload Federated Identity role in Cortex XDR.
If you do not designate a separate AWS IAM user to provide access to Cortex XDR to your logs and to perform API operations, you can create a Workload Federated Identity (WIF) role in AWS that trusts the Cortex XDR log collector through OpenID Connect (OIDC) federation. This role grants Cortex XDR access to your logs with a short-lived OIDC token, without storing any long-lived AWS credentials. For more information, see Create a role for OpenID Connect federation (console).
When setting up any type of Amazon S3 Collector in Cortex XDR, these instructions explain setting up a Workload Federated Identity role. To use an assumed role instead, see Create an assumed role.
Register the Google OIDC identity provider in the IAM console of the AWS Management Console.
This step registers the Google OIDC endpoint so that AWS STS can validate the token that Cortex XDR presents. For more information, see Create an OpenID Connect (OIDC) identity provider in IAM.
Log in to the AWS Management Console, and open the IAM console in the same region as your AWS account.
In the navigation pane on the left, select Access Management → Identity providers, and click Add provider.
Configure the provider:
Provider type: Select OpenID Connect.
Provider URL: Enter
https://accounts.google.com, and click Get thumbprint.Audience: Enter
sts.amazonaws.com.
Click Add provider.
Create a policy in the IAM console in the same region as your AWS account.
In the navigation pane on the left, select Access Management → Policies, and click Create policy.
For the Policy editor, select the JSON tab.
Copy the following JSON policy and paste it within the editor window.
The
<s3-arn>and<sqs-arn>are placeholders. These are filled out using the S3 bucket and SQS that you configured in the prerequisite steps above.{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:GetObject", "Resource": "<s3-arn>/*" }, { "Effect": "Allow", "Action": [ "sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:ChangeMessageVisibility" ], "Resource": "<sqs-arn>" } ] }Click Next.
Review and create the policy.
Create a role for Cortex XDR in the IAM console.
For more information, see Create a role for OpenID Connect federation (console).
In the navigation pane on the left, select Access Management → Roles, and click Create role.
On the Select trusted entity page, use the following values and options:
Trusted entity type: Select Web identity.
Under Web identity, configure the following settings:
Identity provider: Select Google.
Audience: Select
sts.amazonaws.com.
Add a condition to restrict the role to the Cortex XDR log collector service account by setting the following:
Key: Select
accounts.google.com:sub.Condition: Select StringEquals.
Value: Enter the Cortex XDR service account identifier. To get this value, in Cortex XDR select Settings → Data Sources & Integrations, add or edit an Amazon S3 data source, select Workload Federated Identity as the authentication method, and in the Copy service account identifier section, click Identifier.
When you finish adding the condition, verify the Web identity settings.
Click Next, and add permissions by selecting Use existing policy and choosing the policy that you created.
Click Next to name, review, and create the role.
Role name: Specify a name for the new role, and click Create role.
Copy the Policy ARN and Role ARN for future use by opening the policy and role that you created.
Continue with the task for the applicable Amazon S3 logs you want to configure.
The following types of logs are available:
When you configure the Amazon S3 collection in Cortex XDR, enter the Role ARN, and enter
sts.amazonaws.comin the Audience field. The Test button isn't available for Workload Federated Identity, so click Enable.
Reference: Resulting trust policy
To verify your configuration, the trust policy created by the steps above, which is shown on the Name, review, and create page, looks like the following. Replace <SERVICE_ACCOUNT_IDENTIFIER> with the identifier that you copied from Cortex XDR.
Last updated
Was this helpful?
