Advanced AWS IAM policy permissions

Creating restrictive IAM integration policies

Overview

Your organizations security policies may require you to restrict CloudTruth integration access to specific resources in your AWS account. CloudTruth verifies integration permissions by querying a key _cloudtruth_test_. You will need to provide access to _cloudtruth_test_* in the AWS Secret Manager and SSM inline policies in order for the integration status to show connected.
Without _cloudtruth_test_* allowed the integration status will show the following errors.
Secrets Manager Details: Unable to complete a Secrets Manager operation. Please check your IAM policy for the 'secretsmanager:DescribeSecret' permission.
SSM Details: Unable to complete an SSM operation. Please check your IAM policy for the 'ssm:GetParameter' permission.

Resolution

Below are examples that add the _cloudtruth_test_* resource to your specific inline policy along with a sample included resource.
AWS Secret Manager
This example inline policy allows access to all secrets that start with the prefix sample and allows the integration health check _cloudtruth_test_.
1
{
2
"Version": "2012-10-17",
3
"Statement": [
4
{
5
"Sid": "ListSecrets",
6
"Effect": "Allow",
7
"Action": "secretsmanager:ListSecrets",
8
"Resource": "*"
9
},
10
{
11
"Sid": "SecretAccess",
12
"Effect": "Allow",
13
"Action": [
14
"secretsmanager:GetSecretValue",
15
"secretsmanager:DescribeSecret"
16
],
17
"Resource": [
18
"arn:aws:secretsmanager:*:*:secret:sample*",
19
"arn:aws:secretsmanager:*:*:secret:_cloudtruth_test_*"
20
]
21
}
22
]
23
}
Copied!
SSM Parameter store
This example policy allows access to all parameters that start with the prefix sample and allows the integration health check _cloudtruth_test_.
1
{
2
"Version": "2012-10-17",
3
"Statement": [
4
{
5
"Sid": "ParameterList",
6
"Effect": "Allow",
7
"Action": "ssm:DescribeParameters",
8
"Resource": "*"
9
},
10
{
11
"Sid": "ParameterAccess",
12
"Effect": "Allow",
13
"Action": [
14
"ssm:GetParametersByPath",
15
"ssm:GetParameters",
16
"ssm:GetParameter"
17
],
18
"Resource": [
19
"arn:aws:ssm:*:*:parameter/sample*",
20
"arn:aws:ssm:*:*:parameter/_cloudtruth_test_*"
21
]
22
}
23
]
24
}
Copied!
S3
S3 does not explicitly need a permission to allow _cloudtruth_test_. The following is an example on how you can limit the S3 integration to only get data from a specific bucket YOUR_BUCKET_NAME.
1
{
2
"Version": "2012-10-17",
3
"Statement": [
4
{
5
"Sid": "BucketSelection",
6
"Effect": "Allow",
7
"Action": "s3:ListAllMyBuckets",
8
"Resource": "*"
9
},
10
{
11
"Sid": "BucketAccess",
12
"Effect": "Allow",
13
"Action": [
14
"s3:ListBucket",
15
"s3:GetObject",
16
"s3:GetBucketLocation"
17
],
18
"Resource": [
19
"arn:aws:s3:::YOUR-BUCKET-NAME/*",
20
"arn:aws:s3:::YOUR-BUCKET-NAME"
21
]
22
}
23
]
24
}
Copied!