Deprecated

Removed from AWS on 2023-12-04 - Active for 9 months

AmazonDataZoneProjectRolePermissionsBoundary

Last Modified

Mar 21, 2023

March 21, 2023 at 03:13 AM UTC

Version

v1

Total Versions

1

Created

Mar 21, 2023

Actions

229

Risk

Medium

The same capabilities in a scoped form, resource policy writes, reads across all data, or full access to a whole service. Read from this policy document alone: trust policies, boundaries and SCPs in your account still decide what actually succeeds. How this is assessed

  • Medium

    Can launch resources that run as a more privileged role

    Grants the actions of 2 documented escalation paths, but only on named resources or under a condition. Review that scope before trusting it.

    • glue-003iam:PassRole + glue:CreateJob + glue:StartJobRunscoped
      • iam:PassRole: on arn:aws:iam::*:role/datazone*
      • glue:StartJobRun (via glue:*): condition aws:ResourceTag/datazone:projectId
    • glue-005iam:PassRole + glue:UpdateJob + glue:StartJobRunscoped
      • iam:PassRole: on arn:aws:iam::*:role/datazone*
      • glue:UpdateJob (via glue:*): condition aws:ResourceTag/datazone:projectId
      • glue:StartJobRun (via glue:*): condition aws:ResourceTag/datazone:projectId

    Use with caution: Check which roles, users or policies fall inside the scope shown above. Within it the escalation works as documented, so keep privileged principals out of it.

  • Medium

    Can switch off security monitoring

    Can delete CloudWatch log groups, which is how an intruder hides.

    logs:DeleteLogGroup (via logs:*)

    Use with caution: Deny these actions with an SCP for everyone outside a break-glass role, so no single policy can blind you.

  • Medium

    Can read secrets

    Reads Glue connection passwords, on any resource with no condition.

    glue:GetConnection (via glue:Get*)

    Use with caution: Where the holder needs only some secrets, write your own policy scoped to their ARNs or tags, and limit decryption in the KMS key policies.

  • Medium

    Can rewrite resource policies and sharing

    Grants 14 permissions management actions across 4 services (datazone, glue, logs, ram) on any resource, enough to share resources outside the account.

    datazone:addpolicygrantdatazone:deletedomainsharingpolicydatazone:putdomainsharingpolicydatazone:removepolicygrantglue:deleteresourcepolicyglue:putresourcepolicylogs:deleteresourcepolicylogs:putresourcepolicyram:acceptresourceshareinvitationram:associateresourceshareram:createresourceshareram:deleteresourceshareand 2 more

    Use with caution: Turn on IAM Access Analyzer external access findings, and keep account-level guards like S3 Block Public Access enabled.

  • Medium

    Full access to 4 services on every resource

    Uses datazone:*, logs:*, redshift-data:*, sqlworkbench:* with Resource "*" and no condition, so every action AWS adds to those services later is granted too.

    datazone:*logs:*redshift-data:*sqlworkbench:*

    Use with caution: The grant grows every time the service does. For long-lived access, prefer a policy that lists the actions you actually need.

Policy Document

View on GitHub
{
  "PolicyVersion": {
    "Document": {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "s3:List*",
            "s3:Get*",
            "s3:DeleteObjectVersion",
            "s3:RestoreObject",
            "s3:ReplicateObject",
            "s3:PutObject",
            "s3:AbortMultipartUpload",
            "s3:CreateBucket",
            "s3:PutBucketPublicAccessBlock",
            "s3:PutObjectRetention",
            "s3:DeleteObject"
          ],
          "Resource": "arn:aws:s3:::datazone*",
          "Condition": {
            "StringEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "s3:List*",
            "s3:Get*",
            "kms:List*",
            "kms:Get*",
            "kms:Describe*",
            "kms:Decrypt"
          ],
          "Resource": "*",
          "Condition": {
            "StringNotEquals": {
              "aws:ResourceAccount": "${aws:PrincipalAccount}"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "ec2:Describe*",
            "ec2:CreateNetworkInterface",
            "ec2:DeleteNetworkInterface",
            "logs:*",
            "athena:TerminateSession",
            "athena:CreatePreparedStatement",
            "athena:StopCalculationExecution",
            "athena:StartQueryExecution",
            "athena:UpdatePreparedStatement",
            "athena:BatchGet*",
            "athena:List*",
            "athena:UpdateNotebook",
            "athena:DeleteNotebook",
            "athena:DeletePreparedStatement",
            "athena:UpdateNotebookMetadata",
            "athena:DeleteNamedQuery",
            "athena:Get*",
            "athena:UpdateNamedQuery",
            "athena:CreateNamedQuery",
            "athena:ExportNotebook",
            "athena:StopQueryExecution",
            "athena:StartCalculationExecution",
            "athena:StartSession",
            "athena:CreatePresignedNotebookUrl",
            "athena:CreateNotebook",
            "athena:ImportNotebook",
            "organizations:DescribeOrganization",
            "organizations:DescribeAccount",
            "lakeformation:GetDataAccess",
            "lakeformation:BatchGrantPermissions",
            "lakeformation:GrantPermissions",
            "lakeformation:GetDataLakeSettings",
            "lakeformation:PutDataLakeSettings",
            "lakeformation:BatchRevokePermissions",
            "lakeformation:GetResourceLFTags",
            "lakeformation:ListPermissions",
            "ram:CreateResourceShare",
            "ram:UpdateResourceShare",
            "ram:DeleteResourceShare",
            "ram:AssociateResourceShare",
            "ram:DisassociateResourceShare",
            "ram:AcceptResourceShareInvitation",
            "ram:Get*",
            "ram:List*",
            "redshift:DescribeClusters",
            "redshift:JoinGroup",
            "redshift:CreateClusterUser",
            "redshift:GetClusterCredentials",
            "redshift-data:*",
            "redshift:AuthorizeDataShare",
            "redshift:DescribeDataShares",
            "redshift:AssociateDataShareConsumer",
            "tag:GetResources",
            "iam:ListRoles",
            "iam:ListUsers",
            "iam:ListGroups",
            "iam:ListRolePolicies",
            "iam:GetRole",
            "iam:GetRolePolicy",
            "glue:CreateTable",
            "glue:BatchCreatePartition",
            "glue:CreatePartition",
            "glue:CreatePartitionIndex",
            "glue:CreateDataQualityRuleset",
            "glue:CreateBlueprint",
            "glue:CreateJob",
            "glue:CreateConnection",
            "glue:CreateCrawler",
            "glue:CreateWorkflow",
            "sqlworkbench:*",
            "datazone:*"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "ec2:CreateTags",
            "ec2:DeleteTags"
          ],
          "Resource": [
            "arn:aws:ec2:*:*:network-interface/*"
          ],
          "Condition": {
            "ForAllValues:StringEquals": {
              "aws:TagKeys": [
                "aws-glue-service-resource"
              ]
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "kms:List*",
            "kms:Get*",
            "kms:Describe*",
            "kms:Decrypt",
            "kms:Encrypt",
            "kms:ReEncrypt*",
            "kms:Verify",
            "kms:Sign",
            "kms:GenerateDataKey",
            "glue:*"
          ],
          "Resource": "*",
          "Condition": {
            "Null": {
              "aws:ResourceTag/datazone:projectId": "false"
            }
          }
        },
        {
          "Effect": "Allow",
          "Action": [
            "iam:PassRole"
          ],
          "Resource": [
            "arn:aws:iam::*:role/datazone*"
          ]
        },
        {
          "Effect": "Allow",
          "Action": [
            "glue:BatchGet*",
            "glue:SearchTables",
            "glue:List*",
            "glue:Get*",
            "glue:CreateDatabase",
            "glue:UpdateDatabase",
            "glue:DeleteTable",
            "glue:BatchDeleteTable",
            "glue:UpdateTable",
            "glue:DeletePartition",
            "glue:BatchDeletePartition",
            "glue:PutResourcePolicy",
            "glue:BatchUpdatePartition",
            "glue:DeleteTableVersion",
            "glue:DeleteColumnStatisticsForPartition",
            "glue:DeleteColumnStatisticsForTable",
            "glue:DeletePartitionIndex",
            "glue:UpdateColumnStatisticsForPartition",
            "glue:UpdateColumnStatisticsForTable",
            "glue:BatchDeleteTableVersion",
            "glue:UpdatePartition",
            "glue:NotifyEvent",
            "glue:DeleteResourcePolicy"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Deny",
          "NotAction": [
            "s3:List*",
            "s3:Get*",
            "s3:Describe*",
            "s3:DeleteObjectVersion",
            "s3:RestoreObject",
            "s3:ReplicateObject",
            "s3:PutObject",
            "s3:AbortMultipartUpload",
            "s3:CreateBucket",
            "s3:PutBucketPublicAccessBlock",
            "s3:PutObjectRetention",
            "s3:DeleteObject",
            "kms:List*",
            "kms:Get*",
            "kms:Describe*",
            "kms:Decrypt",
            "kms:Encrypt",
            "kms:ReEncrypt*",
            "kms:Verify",
            "kms:Sign",
            "kms:GenerateDataKey",
            "ec2:Describe*",
            "ec2:CreateNetworkInterface",
            "ec2:DeleteNetworkInterface",
            "ec2:CreateTags",
            "ec2:DeleteTags",
            "logs:*",
            "athena:*",
            "glue:BatchGet*",
            "glue:Get*",
            "glue:SearchTables",
            "glue:List*",
            "glue:CreateDatabase",
            "glue:UpdateDatabase",
            "glue:CreateTable",
            "glue:DeleteTable",
            "glue:BatchDeleteTable",
            "glue:UpdateTable",
            "glue:BatchCreatePartition",
            "glue:CreatePartition",
            "glue:DeletePartition",
            "glue:BatchDeletePartition",
            "glue:PutResourcePolicy",
            "glue:CreatePartitionIndex",
            "glue:BatchUpdatePartition",
            "glue:DeleteTableVersion",
            "glue:DeleteColumnStatisticsForPartition",
            "glue:DeleteColumnStatisticsForTable",
            "glue:DeletePartitionIndex",
            "glue:UpdateColumnStatisticsForPartition",
            "glue:UpdateColumnStatisticsForTable",
            "glue:BatchDeleteTableVersion",
            "glue:UpdatePartition",
            "glue:NotifyEvent",
            "glue:StartBlueprintRun",
            "glue:PutWorkflowRunProperties",
            "glue:StopCrawler",
            "glue:DeleteJob",
            "glue:DeleteWorkflow",
            "glue:UpdateCrawler",
            "glue:DeleteBlueprint",
            "glue:UpdateWorkflow",
            "glue:StartCrawler",
            "glue:ResetJobBookmark",
            "glue:UpdateJob",
            "glue:StartWorkflowRun",
            "glue:StopCrawlerSchedule",
            "glue:ResumeWorkflowRun",
            "glue:DeleteCrawler",
            "glue:UpdateBlueprint",
            "glue:BatchStopJobRun",
            "glue:StopWorkflowRun",
            "glue:UpdateCrawlerSchedule",
            "glue:DeleteConnection",
            "glue:UpdateConnection",
            "glue:BatchDeleteConnection",
            "glue:StartCrawlerSchedule",
            "glue:StartJobRun",
            "glue:CreateWorkflow",
            "glue:*DataQuality*",
            "glue:CreateBlueprint",
            "glue:CreateJob",
            "glue:CreateConnection",
            "glue:CreateCrawler",
            "glue:DeleteResourcePolicy",
            "organizations:DescribeOrganization",
            "organizations:DescribeAccount",
            "lakeformation:GetDataAccess",
            "lakeformation:BatchGrantPermissions",
            "lakeformation:GrantPermissions",
            "lakeformation:GetDataLakeSettings",
            "lakeformation:PutDataLakeSettings",
            "lakeformation:BatchRevokePermissions",
            "lakeformation:GetResourceLFTags",
            "lakeformation:ListPermissions",
            "ram:*",
            "redshift:*",
            "redshift-data:*",
            "tag:GetResources",
            "iam:List*",
            "iam:GetRole",
            "iam:GetRolePolicy",
            "iam:PassRole",
            "sqlworkbench:*",
            "datazone:*"
          ],
          "Resource": [
            "*"
          ]
        }
      ]
    },
    "VersionId": "v1",
    "IsDefaultVersion": true,
    "CreateDate": "2023-03-21T02:51:56Z"
  }
}

Version History (1 recorded)

Raw history

Update detected

No recorded action delta - this version predates the change index. View the raw diff.

Mar 21, 2023

1b15c44