Apply the resource access policy for your dataset

Apply the Splunk-generated resource access policy to the IAM role associated with your connection to authenticate access to your Amazon S3 dataset.

Before your dataset is ready for federated search, you need to apply a resource access policy to a role in AWS. This resource access policy is generated by Splunk software and controls the following:

  • Grants access to the Amazon S3 bucket that contains the Amazon S3 location you specified for the dataset in the Define dataset step.
  • If you are using an AWS Glue catalog table to refer to your Amazon S3 dataset, the resource access policy grants access to the AWS Glue catalog.
  • If you have set up an SQS queue and event notification for the Amazon S3 bucket that contains your dataset, the resource access policy contains the SQS queue ARN that you supplied earlier in the dataset definition.
  • If you are using server-side encryption (SSE-KMS) to encrypt data in the Amazon S3 bucket or the AWS Glue catalog table, the resource access policy allows Splunk software to search that data.
  • A role on your Splunk Cloud Platform deployment with the edit_datasets and edit_federated_providers capabilities.
  • Review the connection this dataset is associated with. Obtain the name of the IAM role that it uses for IAM role authentication. See Create a federated search connection.
  • You must have completed the Configure dataset step of the Create dataset workflow.
  1. On your Splunk Cloud Platform deployment, in the Data Management app, at the Resource access step of the Create dataset workflow, update the AWS KMS key ARNs field with AWS KMS key ARN values for your Amazon S3 bucket or AWS Glue data catalog, if you have provided server-side encryption with AWS key management service keys for either object.
    Skip this step if you have not applied SSE-KMS encryption to your bucket or your AWS Glue data catalog. For instructions on obtaining these keys, see the sections at the end of this topic.
  2. In a new browser tab, log in to your AWS account and navigate to the Identity and Access Management (IAM) console.
  3. In the left-hand navigation pane of the IAM console, select Roles.
  4. In the Roles list, select the name of the role that is used for IAM role authentication by the connection this dataset is associated with.
  5. In the Permissions policies section of the role, select Add permissions > Create inline policy.
  6. On the Specify permissions page, in the Policy editor, select JSON.
  7. Back on the browser tab that contains your federated search dataset definition, select Copy for your Resource access policy.
  8. Return to the IAM console in your other browser tab and paste the resource access policy into the Policy editor, overwriting the sample policy as you do so.
    Note: Resolve security warnings, errors, general warnings, and suggestions before saving your policy.
  9. Select Next.
  10. On the Review and create page, do the following:
    1. In the Policy details section, give your policy a unique and easily identifiable Policy name.
    2. Select Create policy.
  11. Back on the browser tab that contains your federated search dataset definition, select Next.
  12. On the Review page, review your dataset definition. If the details appear correct, select Create Dataset to create your dataset.
After you create the dataset, you can run federated searches over it. See Run federated searches over Amazon S3 datasets.

Get the AWS KMS key ARN for your Amazon S3 bucket

If the Amazon S3 bucket that contains the Amazon S3 location for this dataset has SSE-KMS encryption, follow these steps to obtain its AWS KMS key ARN.

  1. In a new browser tab, log in to your AWS account and navigate to the Amazon S3 console.
  2. In the left-hand navigation pane of the Amazon S3 console, select General purpose buckets.
  3. Select the name of the Amazon S3 bucket that contains the Amazon S3 location for this dataset.
  4. Select the bucket Properties tab.
  5. Inspect the Default encryption section. If the Encryption type is Server-side encryption with AWS Key Management Service keys (SSE-KMS), copy the Encryption key ARN that appears below it.
  6. Back in the browser tab that contains your federated search dataset definition, paste the copied ARN into the AWS KMS Key ARNs A

Get the AWS KMS key ARN for your AWS Glue Data Catalog

If you are using an AWS Glue data catalog table to refer to your dataset, the AWS Glue catalog might have SSE-KMS encryption. Follow these steps to determine whether your Glue catalog has SSE-KMS encryption and, if it does, to obtain the KMS key ARN.

  1. In a new browser tab, log in to the AWS account that contains your dataset and navigate to the AWS Glue console.
  2. In the left-hand navigation, select Data Catalog and then Catalog settings.
  3. Under Encryption options, if Metadata encryption is selected and you find an AWS KMS key ARN in the AWS KMS key for metadata encryption field, copy it.
  4. Back in the browser tab that contains your federated search dataset definition, paste the copied ARN into the AWS KMS Key ARNs field and select its drop-down value to set it in. The resource access policy updates automatically with the new ARN.