Debian Codegraph @

ansible_collections/community/aws/tests/integration/targets/opensearch/templates/kms_policy.j2

raw
1 {
2 "Id": "key-ansible-test-policy-123",
3 "Version": "2012-10-17",
4 "Statement": [
5 {
6 "Sid": "Allow access for root user",
7 "Effect": "Allow",
8 "Principal": {
9 "AWS": "arn:aws:iam::{{ aws_caller_info.account }}:root"
10 },
11 "Action": "kms:*",
12 "Resource": "*"
13 },
14 {
15 "Sid": "AnsibleTestManage",
16 "Effect": "Allow",
17 "Principal": {
18 "AWS": "{{ aws_caller_info.arn }}"
19 },
20 "Action": "kms:*",
21 "Resource": "*"
22 },
23 {
24 "Sid": "Allow access for Key Administrators",
25 "Effect": "Allow",
26 "Principal": {
27 "AWS": "arn:aws:iam::{{ aws_caller_info.account }}:role/admin"
28 },
29 "Action": "kms:*",
30 "Resource": "*"
31 },
32 {
33 "Sid": "Allow access through OpenSearch Service for all principals in the account that are authorized to use OpenSearch Service",
34 "Effect": "Allow",
35 "Principal": {
36 "AWS": "*"
37 },
38 "Action": [
39 "kms:Encrypt",
40 "kms:Decrypt",
41 "kms:ReEncrypt*",
42 "kms:GenerateDataKey*",
43 "kms:CreateGrant",
44 "kms:DescribeKey"
45 ],
46 "Resource": "*",
47 "Condition": {
48 "StringEquals": {
49 "kms:CallerAccount": "{{ aws_caller_info.account }}",
50 "kms:ViaService": "es.{{ aws_region }}.amazonaws.com"
51 }
52 }
53 },
54 {
55 "Sid": "Allow OpenSearch service principals to describe the key directly",
56 "Effect": "Allow",
57 "Principal": {
58 "Service": "es.amazonaws.com"
59 },
60 "Action": [
61 "kms:Describe*",
62 "kms:Get*",
63 "kms:List*"
64 ],
65 "Resource": "*"
66 }
67 ]
68 }