In a multi-account AWS Organization, "who can actually read this S3 bucket?" is rarely answered by reading the bucket policy alone.

When buckets use SSE-KMS and cross-account roles are assumed via SSO or third-party trust policies, an IAM role with s3:GetObject on * can still be blocked by a missing kms:Decrypt grant or an Organization SCP. Conversely, delegating KMS key trust to arn:aws:iam::<account>:root silently lets any role in that account with kms:Decrypt in its identity policy decrypt objects once the bucket policy allows it.

Evaluating the full policy intersection

We just shipped v1.3.0 of CoreNova Cloud IAM & IaC Security Audit API + MCP (now PUBLIC on AWS Marketplace) with a zero-dependency effective read-access evaluator (POST /v1/scan/s3-access and MCP tool audit_s3_kms_effective_access).

Given a bucket policy, KMS key policy, optional Organization SCPs, and candidate principals (identity + sts:AssumeRole trust policies), it evaluates each layer and tells you:

  • Which principals resolve to ALLOW (effective_readers)
  • Which principals fail and why (BLOCKED_BY_KMS, BLOCKED_BY_BUCKET, BLOCKED_BY_SCP, BLOCKED_BY_EXPLICIT_DENY)
  • Which external principals can call sts:AssumeRole without aws:PrincipalOrgID or sts:ExternalId (TRUST_UNCONDITIONED_ASSUME_ROLE)
  • Whether any role marked expected_access: false still has effective read access (S3_UNEXPECTED_EFFECTIVE_READER)

Quick test with curl

You can run it against the unauthenticated sandbox at audit.corenovacloud.com (zero payload storage, evaluated in memory):

curl -s -X POST https://audit.corenovacloud.com/v1/scan/s3-access \ -H "Content-Type: application/json" \ -d '{ "bucket_name": "corp-pii-lake", "bucket_account_id": "111122223333", "kms_key_arn": "arn:aws:kms:us-east-1:111122223333:key/abc-123", "bucket_policy": { "Statement": [{ "Effect": "Allow", "Principal": {"AWS": [ "arn:aws:iam::444455556666:role/AnalyticsReader", "arn:aws:iam::444455556666:role/BlockedByKmsRole" ]}, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::corp-pii-lake/*" }] }, "kms_key_policy": { "Statement": [{ "Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::444455556666:root"}, "Action": "kms:Decrypt", "Resource": "*" }] }, "principals": [ { "id": "arn:aws:iam::444455556666:role/AnalyticsReader", "identity_policy": {"Statement": [{"Effect": "Allow", "Action": ["s3:GetObject", "kms:Decrypt"], "Resource": "*"}]} }, { "id": "arn:aws:iam::444455556666:role/BlockedByKmsRole", "identity_policy": {"Statement": [{"Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::corp-pii-lake/*"}]} } ] }' 

AnalyticsReader resolves to ALLOW, while BlockedByKmsRole is reported under blocked_principals with reason BLOCKED_BY_KMS because the KMS key delegates to :root and its identity policy lacks kms:Decrypt.

Using it from an AI coding agent via Remote MCP

Add https://audit.corenovacloud.com/mcp to Claude Code, Cursor, or Amazon Bedrock Agents (examples/mcp/mcp-config.json in cloud-audit-mcp-starter) and call audit_s3_kms_effective_access alongside audit_aws_iam_policy, audit_iac_template, audit_k8s_or_dockerfile, and audit_to_sarif.

Links

How does your team currently verify effective S3 + KMS read access across accounts before merging IAM or Terraform PRs?