Created
January 9, 2019 00:04
-
-
Save reecestart/a4b232ba5ba3fdc5087125e49e755695 to your computer and use it in GitHub Desktop.
Default KMS Key Policy for CloudTrail for AWS Organization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Id": "Key policy created by CloudTrail", | |
"Statement": [ | |
{ | |
"Sid": "Enable IAM User Permissions", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": [ | |
"arn:aws:iam::012345678901:root", | |
"arn:aws:sts::012345678901:assumed-role/Admin/adminUser" | |
] | |
}, | |
"Action": "kms:*", | |
"Resource": "*" | |
}, | |
{ | |
"Sid": "Allow CloudTrail to encrypt logs", | |
"Effect": "Allow", | |
"Principal": { | |
"Service": "cloudtrail.amazonaws.com" | |
}, | |
"Action": "kms:GenerateDataKey*", | |
"Resource": "*", | |
"Condition": { | |
"StringLike": { | |
"kms:EncryptionContext:aws:cloudtrail:arn": "arn:aws:cloudtrail:*:012345678901:trail/*" | |
} | |
} | |
}, | |
{ | |
"Sid": "Allow CloudTrail to describe key", | |
"Effect": "Allow", | |
"Principal": { | |
"Service": "cloudtrail.amazonaws.com" | |
}, | |
"Action": "kms:DescribeKey", | |
"Resource": "*" | |
}, | |
{ | |
"Sid": "Allow principals in the account to decrypt log files", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": [ | |
"kms:Decrypt", | |
"kms:ReEncryptFrom" | |
], | |
"Resource": "*", | |
"Condition": { | |
"StringEquals": { | |
"kms:CallerAccount": "012345678901" | |
}, | |
"StringLike": { | |
"kms:EncryptionContext:aws:cloudtrail:arn": "arn:aws:cloudtrail:*:012345678901:trail/*" | |
} | |
} | |
}, | |
{ | |
"Sid": "Allow alias creation during setup", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "kms:CreateAlias", | |
"Resource": "*", | |
"Condition": { | |
"StringEquals": { | |
"kms:CallerAccount": "012345678901", | |
"kms:ViaService": "ec2.ap-southeast-2.amazonaws.com" | |
} | |
} | |
}, | |
{ | |
"Sid": "Enable cross account log decryption", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": [ | |
"kms:Decrypt", | |
"kms:ReEncryptFrom" | |
], | |
"Resource": "*", | |
"Condition": { | |
"StringEquals": { | |
"kms:CallerAccount": "012345678901" | |
}, | |
"StringLike": { | |
"kms:EncryptionContext:aws:cloudtrail:arn": "arn:aws:cloudtrail:*:012345678901:trail/*" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment