Skip to content

Commit

Permalink
Revert to more permissive policy
Browse files Browse the repository at this point in the history
  • Loading branch information
gi-erre committed Nov 2, 2023
1 parent 8ec33e1 commit f411ab4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 40 deletions.
14 changes: 4 additions & 10 deletions templates_cloudlogs/CloudLogs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Metadata:
- ExternalID
- TrustedIdentity
- BucketARN
- AccountID

ParameterLabels:
CloudLogsRoleName:
Expand All @@ -25,8 +24,6 @@ Metadata:
default: "Trusted Identity (Sysdig use only)"
BucketARN:
default: "Bucket ARN"
AccountID:
default: "Account ID"

Parameters:
CloudLogsRoleName:
Expand All @@ -41,9 +38,6 @@ Parameters:
BucketARN:
Type: String
Description: The ARN of your s3 bucket associated with your Cloudtrail trail.
AccountID:
Type: String
Description: The Identifier of your AWS account.

Resources:
CloudLogsRole:
Expand All @@ -68,19 +62,19 @@ Resources:
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: "CloudlogsS3AccessGet"
- Sid: "CloudlogsS3AccessList"
Effect: "Allow"
Action:
- "s3:List*"
Resource:
- !Sub '${BucketARN}'
- !Sub '${BucketARN}/*'
- Sid: "CloudlogsS3AccessList"
- Sid: "CloudlogsS3AccessGet"
Effect: "Allow"
Action:
- "s3:Get*"
Resource:
- !Sub '${BucketARN}/AWSLogs/${AccountID}'
- !Sub '${BucketARN}/AWSLogs/${AccountID}/*'
- !Sub '${BucketARN}'
- !Sub '${BucketARN}/*'
Roles:
- Ref: "CloudLogsRole"
14 changes: 4 additions & 10 deletions templates_cloudlogs/OrgCloudLogs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Metadata:
- ExternalID
- TrustedIdentity
- BucketARN
- AccountID

ParameterLabels:
CSPMRoleName:
Expand All @@ -29,8 +28,6 @@ Metadata:
default: "Trusted Identity (Sysdig use only)"
BucketARN:
default: "Bucket ARN"
AccountID:
default: "Account ID"

Parameters:
CSPMRoleName:
Expand All @@ -48,9 +45,6 @@ Parameters:
BucketARN:
Type: String
Description: The ARN of your s3 bucket associated with your Cloudtrail trail.
AccountID:
Type: String
Description: The Identifier of your AWS account.

Resources:
CloudLogsRole:
Expand All @@ -75,20 +69,20 @@ Resources:
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: "CloudlogsS3AccessGet"
- Sid: "CloudlogsS3AccessList"
Effect: "Allow"
Action:
- "s3:List*"
Resource:
- !Sub '${BucketARN}'
- !Sub '${BucketARN}/*'
- Sid: "CloudlogsS3AccessList"
- Sid: "CloudlogsS3AccessGet"
Effect: "Allow"
Action:
- "s3:Get*"
Resource:
- !Sub '${BucketARN}/AWSLogs/${AccountID}'
- !Sub '${BucketARN}/AWSLogs/${AccountID}/*'
- !Sub '${BucketARN}'
- !Sub '${BucketARN}/*'
Roles:
- Ref: "CloudLogsRole"
CloudAgentlessRole:
Expand Down
14 changes: 4 additions & 10 deletions templates_cspm_cloudlogs/FullInstall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Metadata:
- ExternalID
- TrustedIdentity
- BucketARN
- AccountID

ParameterLabels:
CSPMRoleName:
Expand All @@ -25,8 +24,6 @@ Metadata:
default: "Trusted Identity (Sysdig use only)"
BucketARN:
default: "Bucket ARN"
AccountID:
default: "Account ID"

Parameters:
CSPMRoleName:
Expand All @@ -44,9 +41,6 @@ Parameters:
BucketARN:
Type: String
Description: The ARN of your s3 bucket associated with your Cloudtrail trail.
AccountID:
Type: String
Description: The Identifier of your AWS account.

Resources:
CloudAgentlessRole:
Expand Down Expand Up @@ -88,19 +82,19 @@ Resources:
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: "CloudlogsS3AccessGet"
- Sid: "CloudlogsS3AccessList"
Effect: "Allow"
Action:
- "s3:List*"
Resource:
- !Sub '${BucketARN}'
- !Sub '${BucketARN}/*'
- Sid: "CloudlogsS3AccessList"
- Sid: "CloudlogsS3AccessGet"
Effect: "Allow"
Action:
- "s3:Get*"
Resource:
- !Sub '${BucketARN}/AWSLogs/${AccountID}'
- !Sub '${BucketARN}/AWSLogs/${AccountID}/*'
- !Sub '${BucketARN}'
- !Sub '${BucketARN}/*'
Roles:
- Ref: "CloudLogsRole"
14 changes: 4 additions & 10 deletions templates_cspm_cloudlogs/OrgFullInstall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Metadata:
- TrustedIdentity
- BucketARN
- OrganizationUnitIDs
- AccountID

ParameterLabels:
CSPMRoleName:
Expand All @@ -28,8 +27,6 @@ Metadata:
default: "Trusted Identity (Sysdig use only)"
OrganizationUnitIDs:
default: "Organization Unit IDs (Sysdig use only)"
AccountID:
default: "Account ID"

Parameters:
CSPMRoleName:
Expand All @@ -50,9 +47,6 @@ Parameters:
OrganizationUnitIDs:
Type: String
Description: Organization Unit IDs to deploy
AccountID:
Type: String
Description: The Identifier of your AWS account.

Resources:
CloudAgentlessRole:
Expand Down Expand Up @@ -93,20 +87,20 @@ Resources:
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: "CloudlogsS3AccessGet"
- Sid: "CloudlogsS3AccessList"
Effect: "Allow"
Action:
- "s3:List*"
Resource:
- !Sub '${BucketARN}'
- !Sub '${BucketARN}/*'
- Sid: "CloudlogsS3AccessList"
- Sid: "CloudlogsS3AccessGet"
Effect: "Allow"
Action:
- "s3:Get*"
Resource:
- !Sub '${BucketARN}/AWSLogs/${AccountID}'
- !Sub '${BucketARN}/AWSLogs/${AccountID}/*'
- !Sub '${BucketARN}'
- !Sub '${BucketARN}/*'
Roles:
- Ref: "CloudLogsRole"
RolesStackSet:
Expand Down

0 comments on commit f411ab4

Please sign in to comment.