Skip to content

Commit 20f7bd2

Browse files
committed
Adding Glue-specific network perimeter SCP
1 parent 7d4abe6 commit 20f7bd2

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

service_control_policies/service_specific_controls/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Use the following example SCPs individually or in combination:
1111
* [network_perimeter_ec2_scp](network_perimeter_ec2_scp.json) – Enforces network perimeter controls on service roles used by Amazon EC2 instances.
1212
* [network_perimeter_iam_users_scp](network_perimeter_iam_users_scp.json) - Enforces network perimeter controls on IAM users with long-term access keys.
1313
* [network_perimeter_lambda_scp](network_perimeter_lambda_scp.json) - Enforces network perimeter controls on service roles used by AWS Lambda.
14+
* [network_perimeter_glue_scp](network_perimeter_glue_scp.json) - Enforces network perimeter controls on service roles used by AWS Glue jobs.
1415
* [restrict_nonvpc_deployment_scp](restrict_nonvpc_deployment_scp.json) - Enforces deployment of resources in a customer managed Amazon VPC.
1516
* [restrict_idp_configurations_scp](restrict_idp_configurations_scp.json) - Restricts the ability to make configuration changes to the IAM SAML identity providers.
1617
* [restrict_untrusted_endpoints_scp](restrict_untrusted_endpoints_scp.json) - Prevent untrusted non-AWS resources from being configured as targets for service operations.
@@ -66,6 +67,16 @@ This policy statement is included in the [network_perimeter_lambda_scp](/service
6667

6768
The [` lambda:SourceFunctionArn `](https://docs.aws.amazon.com/lambda/latest/dg/permissions-source-function-arn.html) condition key is used to target role sessions that are created for your function's execution environment.
6869

70+
### "Sid":"EnforceNetworkPerimeterOnGlueRoles"
71+
72+
This policy statement is included in the [network_perimeter_glue_scp](/service_control_policies/service_specific_controls/network_perimeter_glue_scp.json) and limits access to expected networks for service roles used by AWS Glue jobs. Expected networks are defined as follows:
73+
* Your on-premises data centers and static egress points in AWS such as a NAT gateway that are specified by IP ranges (`<my-corporate-cidr>`) in the policy statement.
74+
* Your organization’s VPCs that are specified by VPC IDs (`<my-vpc>`) in the policy statement.
75+
* Networks of AWS services that use [forward access sessions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_forward_access_sessions.html) to access resources on your behalf as denoted by `aws:ViaAWSService` in the policy statement. This access pattern applies when you access data via an AWS service, and that service takes subsequent actions on your behalf by using your IAM credentials.
76+
* AWS Glue networks when the service interacts with [CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html), as denoted by the `NotAction` element with the actions `logs:CreateLogGroup`,`logs:CreateLogStream`,`logs:PutLogEvents`.
77+
78+
The [`glue:CredentialIssuingService`](https://docs.aws.amazon.com/glue/latest/dg/security_iam_id-based-policy-examples.html#glue-identity-based-policy-context-key-glue) condition key is used to target role sessions that are created for your job's execution environment.
79+
6980
### "Sid":"PreventIdPTrustModifications"
7081

7182
This statement is included in the [restrict_idp_configurations_scp](restrict_idp_configurations_scp.json) and prevents users from making configuration changes to the IAM SAML [identity providers](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html), IAM OIDC [identity providers](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html), and [AWS IAM Roles Anywhere](https://aws.amazon.com/iam/roles-anywhere/) [trust anchors](https://docs.aws.amazon.com/rolesanywhere/latest/userguide/getting-started.html). It also prevents creation of an [account instance of IAM Identity Center]( https://docs.aws.amazon.com/singlesignon/latest/userguide/account-instances-identity-center.html).
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Sid": "EnforceNetworkPerimeterOnGlueRoles",
6+
"Effect": "Deny",
7+
"NotAction": [
8+
"es:ES*",
9+
"dax:GetItem",
10+
"dax:BatchGetItem",
11+
"dax:Query",
12+
"dax:Scan",
13+
"dax:PutItem",
14+
"dax:UpdateItem",
15+
"dax:DeleteItem",
16+
"dax:BatchWriteItem",
17+
"dax:ConditionCheckItem",
18+
"logs:CreateLogGroup",
19+
"logs:CreateLogStream",
20+
"logs:PutLogEvents"
21+
],
22+
"Resource": "*",
23+
"Condition": {
24+
"BoolIfExists": {
25+
"aws:ViaAWSService": "false"
26+
},
27+
"NotIpAddressIfExists": {
28+
"aws:SourceIp": [
29+
"<my-corporate-cidr>"
30+
]
31+
},
32+
"StringNotEqualsIfExists": {
33+
"aws:PrincipalTag/dp:exclude:network": "true",
34+
"aws:SourceVpc": [
35+
"<my-vpc>"
36+
]
37+
},
38+
"Null": {
39+
"glue:CredentialIssuingService": "false"
40+
}
41+
}
42+
}
43+
]
44+
}

0 commit comments

Comments
 (0)