Splunk Enterprise

AWS Add-On Permissions S3 Generic

rkeq0515
Path Finder

I have been using the AWS Add-On to pull data from S3 into Splunk.  It's been working well for internal use.  I now have been tasked to provide data to an external source.  The external source should only have access to the data that they need.   The S3 looks similar to this.

bucketname

dataset1/dashboard

dataset2/dashboard <--- External source should only access this data

dataset3/dashboard

I created AWS keys specifically for this external source.  I want to set my permissions so the external source only has access to dataset2 without viewing data from dataset1 and dataset3.

The problem is Splunk requires the ListBucket permission to index the data.  I have attempted to use a condition statement to lock this down to the specific folder.  However, when I use the permissions below, Splunk cannot grab the data.  If I remove the condition statement the data is processed into Splunk but I can now see the contents of dataset1 and dataset3.   

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBuckets"
            ],
            "Resource": [
                "arn:aws:s3:::bucketname"
            ],
            "Condition": {
                "StringLike": {
                    "s3:prefix": [
                        "dataset2/",
                        "dataset2/dashboard/*"
                    ]
                }
            }
        },
        {
            "Sid": "AllowUsersToAccessFolder2Only",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject*",
                "s3:PutObject*"
            ],
            "Resource": [
                "arn:aws:s3:::bucketname/dataset2/dashboard/*"
            ]
        }
    ]
}

 

 My solution for now is to create another bucket specifically for this external source and reroute the data to that bucket.  I want to avoid this if possible.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...