diff --git a/cloudformation/ai-sre/README.md b/cloudformation/ai-sre/README.md index 5ade204..98be0fc 100644 --- a/cloudformation/ai-sre/README.md +++ b/cloudformation/ai-sre/README.md @@ -58,7 +58,7 @@ The role has no `ReadOnlyAccess`. It reads exactly this list, minus the configur - Load balancers, API Gateway configuration and Route 53 zones - SQS, SNS, Kinesis and Firehose metadata; Step Functions and EventBridge - CloudTrail trails and event history (`LookupEvents`), AWS Health events, X-Ray traces -- CloudFormation stacks and their resources' status, not their `Metadata`, Application Auto Scaling, the account alias and enabled regions +- CloudFormation stacks and their resources' status, not their `Metadata`, Application Auto Scaling, the account alias, the account name (`account:GetAccountInformation`) and enabled regions - Its own role and policies, and the stack's two deny policies (`iam:GetRole` and the role policy reads on its own ARN, `iam:GetPolicy` and `iam:GetPolicyVersion` on the two policies' ARNs, nothing else), to tell which release it runs and what it allows - `signin:CreateOAuth2Token` for AWS's MCP Server, which Better Stack calls with the role's session - `kms:Decrypt` through CloudWatch Logs only, for log groups encrypted with your key diff --git a/cloudformation/ai-sre/better-stack-ai-sre.yaml b/cloudformation/ai-sre/better-stack-ai-sre.yaml index c62d1d0..2ce30cd 100644 --- a/cloudformation/ai-sre/better-stack-ai-sre.yaml +++ b/cloudformation/ai-sre/better-stack-ai-sre.yaml @@ -287,7 +287,7 @@ Resources: - health:Describe* Resource: '*' # Logs Insights, recent API activity, traces, deployment history from stack events, scaling, the - # account alias and the enabled regions. + # account alias, the account name and the enabled regions. - Sid: InvestigationReads Effect: Allow Action: @@ -301,6 +301,7 @@ Resources: - application-autoscaling:Describe* - iam:ListAccountAliases - account:ListRegions + - account:GetAccountInformation Resource: '*' - !Ref 'AWS::NoValue' - !If diff --git a/cloudformation/ai-sre/restricted-reads.txt b/cloudformation/ai-sre/restricted-reads.txt index 5668c40..3cdd283 100644 --- a/cloudformation/ai-sre/restricted-reads.txt +++ b/cloudformation/ai-sre/restricted-reads.txt @@ -1,3 +1,4 @@ +account:GetAccountInformation account:ListRegions apigateway:GET denied on some resources application-autoscaling:DescribeScalableTargets diff --git a/cloudformation/ai-sre/test/simulate_policy.py b/cloudformation/ai-sre/test/simulate_policy.py index c2d6a93..efd22d9 100644 --- a/cloudformation/ai-sre/test/simulate_policy.py +++ b/cloudformation/ai-sre/test/simulate_policy.py @@ -112,6 +112,7 @@ def both(decision): ("application-autoscaling:DescribeScalableTargets", ANY, (), *both(ALLOW)), ("iam:ListAccountAliases", ANY, (), *both(ALLOW)), ("account:ListRegions", ANY, (), *both(ALLOW)), + ("account:GetAccountInformation", ANY, (), *both(ALLOW)), # The role's own description and policies; other roles' only through ReadOnlyAccess. ("iam:GetRole", SELF, (), *both(ALLOW)), ("iam:ListRolePolicies", SELF, (), *both(ALLOW)),