-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #392 from MrSecure/mega
WIP: MegaProwler Add-on
- Loading branch information
Showing
4 changed files
with
722 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Description: Prowler Auditing Role - in Control Tower pick AWSControlTowerStackSetRole for IAM role and AWSControlTowerExecution for execution | ||
|
||
Parameters: | ||
|
||
AuditorAccountId: | ||
Default: 987600001234 | ||
Description: AWS Account ID where the audit tooling executes | ||
Type: Number | ||
AuditRolePathName: | ||
Default: '/audit/prowler/XA_AuditRole_Prowler' | ||
Description: Path for role name in audit tooling account | ||
Type: String | ||
|
||
Resources: | ||
XAAuditRole: | ||
Type: "AWS::IAM::Role" | ||
Properties: # /audit/prowler/XA_AuditRole_Prowler | ||
RoleName: XA_AuditRole_Prowler | ||
Path: "/audit/prowler/" | ||
ManagedPolicyArns: | ||
- arn:aws:iam::aws:policy/SecurityAudit | ||
- arn:aws:iam::aws:policy/AWSOrganizationsReadOnlyAccess | ||
- arn:aws:iam::aws:policy/IAMReadOnlyAccess | ||
AssumeRolePolicyDocument: | ||
Version: "2012-10-17" | ||
Statement: | ||
- Effect: "Allow" | ||
Principal: | ||
AWS: # TODO: review permissions to see if this can be narrowed down - code build only perhaps | ||
- !Sub "arn:aws:iam::${AuditorAccountId}:root" | ||
Action: | ||
- "sts:AssumeRole" | ||
- Effect: "Allow" | ||
Principal: | ||
Service: | ||
- "codebuild.amazonaws.com" | ||
Action: | ||
- "sts:AssumeRole" | ||
# TODO: restrict to only AuditorAccount only | ||
Policies: | ||
- PolicyName: "ProwlerPolicyAdditions" | ||
PolicyDocument: | ||
Version: "2012-10-17" | ||
Statement: | ||
- Sid: "ProwlerPolicyAdditions" | ||
Effect: "Allow" | ||
Resource: "*" | ||
Action: | ||
- "acm:describecertificate" | ||
- "acm:listcertificates" | ||
- "es:describeelasticsearchdomainconfig" | ||
- "logs:DescribeLogGroups" | ||
- "logs:DescribeMetricFilters" | ||
- "ses:getidentityverificationattributes" | ||
- "sns:listsubscriptionsbytopic" | ||
- "guardduty:ListDetectors" | ||
- "guardduty:GetDetector" | ||
- "S3:GetEncryptionConfiguration" | ||
- "trustedadvisor:Describe*" | ||
- "cloudtrail:GetEventSelectors" | ||
- "apigateway:GET" | ||
- "support:*" | ||
Metadata: | ||
cfn_nag: | ||
rules_to_suppress: | ||
- id: W28 | ||
reason: "the role name is intentionally static" | ||
- id: W11 | ||
reason: "the policy grants read/view/audit access only, to all resources, by design" | ||
- id: F3 | ||
reason: "Support does not allow or deny access to individual actions" |
Oops, something went wrong.