Skip to content

Commit ba5ead2

Browse files
committed
SIEM policy updates
1 parent 165a1a8 commit ba5ead2

File tree

2 files changed

+91
-29
lines changed

2 files changed

+91
-29
lines changed
Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
11
Parameters:
2-
Principal:
2+
CoralogixRegionAlias:
33
Type: String
4-
Description: The AWS account ID or Role ARN of the principal who will assume the role
5-
ConstraintDescription: "Must be a valid AWS account ID or a valid Role ARN"
4+
Description: The Alias for the Coralogix region, possible options are [us1, us2, eu1, eu2, ap1, ap2, custom]
5+
AllowedValues:
6+
- us1
7+
- us2
8+
- eu1
9+
- eu2
10+
- ap1
11+
- ap2
12+
- custom
13+
CustomCoralogixAccount:
14+
Type: String
15+
Description: In case you want to use a custom coralogix account, enter the aws account id that you want to use.
16+
Default: ''
17+
18+
Conditions:
19+
IsRegionUs2: !Equals
20+
- Ref: CoralogixRegionAlias
21+
- us2
22+
IsCustomAccount: !Not
23+
- !Equals
24+
- Ref: CustomCoralogixAccount
25+
- ''
626

727
Resources:
828
CoralogixSIEMExecutionRole:
@@ -14,8 +34,15 @@ Resources:
1434
Statement:
1535
- Effect: Allow
1636
Principal:
17-
AWS:
18-
Ref: Principal
37+
AWS: !Sub
38+
- 'arn:aws:iam::${aws_account_id}:role/siem-service'
39+
- aws_account_id: !If
40+
- IsCustomAccount
41+
- !Ref CustomCoralogixAccount
42+
- !If
43+
- IsRegionUs2
44+
- '739076534691'
45+
- '625240141681'
1946
Action: sts:AssumeRole
2047
Policies:
2148
- PolicyName: CoralogixSIEMPolicy
@@ -26,17 +53,24 @@ Resources:
2653
Resource: ["*"]
2754
Effect: Allow
2855
Action:
29-
- "s3:GetBucketPublicAccessBlock"
30-
- "s3:GetBucketTagging"
31-
- "ec2:DescribeInstances"
32-
- "dynamodb:ListTagsOfResource"
33-
- "s3:GetBucketAcl"
34-
- "s3:GetEncryptionConfiguration"
35-
- "dynamodb:DescribeTable"
36-
- "rds:DescribeDBInstances"
37-
- "redshift:DescribeClusters"
38-
- "eks:DescribeCluster"
39-
- "eks:ListClusters"
40-
- "ec2:DescribeSubnets"
41-
- "s3:GetBucketLocation"
42-
- "redshift:DescribeClusterParameters"
56+
- "s3:GetBucketPublicAccessBlock",
57+
- "s3:GetBucketTagging",
58+
- "ec2:DescribeInstances",
59+
- "lambda:ListFunctions",
60+
- "dynamodb:ListTagsOfResource",
61+
- "s3:GetBucketAcl",
62+
- "ecs:DescribeClusters",
63+
- "s3:GetEncryptionConfiguration",
64+
- "s3:ListAllMyBuckets",
65+
- "lambda:ListTags",
66+
- "dynamodb:DescribeTable",
67+
- "rds:DescribeDBInstances",
68+
- "redshift:DescribeClusters",
69+
- "eks:DescribeCluster",
70+
- "ecs:ListContainerInstances",
71+
- "eks:ListClusters",
72+
- "ec2:DescribeSubnets",
73+
- "s3:GetBucketLocation",
74+
- "rds:DescribeDBClusters",
75+
- "redshift:DescribeClusterParameters",
76+
- "ecs:ListClusters"
Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,52 @@
11
Parameters:
2-
Principal:
2+
CoralogixRegionAlias:
33
Type: String
4-
Description: The AWS account ID of the principal who will assume the role
5-
ConstraintDescription: "Must be a valid AWS account ID"
4+
Description: The Alias for the Coralogix region, possible options are [us1, us2, eu1, eu2, ap1, ap2, custom]
5+
AllowedValues:
6+
- us1
7+
- us2
8+
- eu1
9+
- eu2
10+
- ap1
11+
- ap2
12+
- custom
13+
CustomCoralogixAccount:
14+
Type: String
15+
Description: In case you want to use a custom coralogix account, enter the aws account id that you want to use.
16+
Default: ''
17+
RoleName:
18+
Type: String
19+
Description: Don't change it! It needs to match the one that was input on the Coralogix form. Corresponds to the name of the AWS IAM role that will be created.
20+
AllowedPattern: '^[a-zA-Z0-9_+=,.@-]+$'
21+
MaxLength: 64
22+
Conditions:
23+
IsRegionUs2: !Equals
24+
- Ref: CoralogixRegionAlias
25+
- us2
26+
IsCustomAccount: !Not
27+
- !Equals
28+
- Ref: CustomCoralogixAccount
29+
- ''
630

731
Resources:
832
CoralogixSIEMManagementRole:
933
Type: AWS::IAM::Role
1034
Properties:
11-
RoleName: Coralogix-SIEM-Management-Role
35+
RoleName: !Ref RoleName
1236
AssumeRolePolicyDocument:
1337
Version: "2012-10-17"
1438
Statement:
1539
- Effect: Allow
1640
Principal:
17-
AWS:
18-
Ref: Principal
41+
AWS: !Sub
42+
- 'arn:aws:iam::${aws_account_id}:role/siem-service'
43+
- aws_account_id: !If
44+
- IsCustomAccount
45+
- !Ref CustomCoralogixAccount
46+
- !If
47+
- IsRegionUs2
48+
- '739076534691'
49+
- '625240141681'
1950
Action: sts:AssumeRole
2051
Policies:
2152
- PolicyName: CoralogixSIEMManagementRolePolicy
@@ -24,8 +55,5 @@ Resources:
2455
Statement:
2556
- Effect: Allow
2657
Action:
27-
- organizations:ListAccounts
28-
- iam:CreatePolicy
29-
- iam:DeletePolicy
30-
- iam:AttachRolePolicy
58+
- "organizations:ListAccounts"
3159
Resource: "*"

0 commit comments

Comments
 (0)