Skip to content

Commit 712812a

Browse files
committed
Adding service-specific guidance
1 parent 4aa7e86 commit 712812a

30 files changed

Lines changed: 2933 additions & 59 deletions

README.md

Lines changed: 52 additions & 15 deletions
Large diffs are not rendered by default.
169 KB
Loading

service_control_policies/README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Example data access patterns:
160160
* [Amazon WorkSpaces image](https://docs.aws.amazon.com/workspaces/latest/adminguide/share-custom-image.html): You can share custom WorkSpaces images with other accounts with the `UpdateWorkspaceImagePermission` API.
161161
* [Amazon CloudWatch sink](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html): You can share observability data with other accounts with the `CreateLink` API.
162162
* [AWS Service Catalog portfolio](https://docs.aws.amazon.com/servicecatalog/latest/adminguide/catalogs_portfolios_sharing.html): AWS Service Catalog portfolios can be shared with other AWS accounts with the `CreatePortfolioShare` API.
163-
* [AWS Config aggregator](https://docs.aws.amazon.com/config/latest/developerguide/aggregate-data.html): The `PutConfigurationAggregator` API allows you to select another account to add to your AWS Config aggregator.
163+
* [AWS Config aggregator](https://docs.aws.amazon.com/config/latest/developerguide/aggregate-data.html): The `PutConfigurationAggregator` API allows you to select another account to add to your AWS Config aggregator. Additionally, the `PutAggregationAuthorization` API allows you to authorize another account to collect data from your account.
164164
* [AWS Fault Injection experiment template](https://docs.aws.amazon.com/fis/latest/userguide/multi-account.html): You create a multi-account experiment template by specifying other accounts with the `CreateTargetAccountConfiguration` API.
165165
* [AWS Global Accelerator attachment](https://docs.aws.amazon.com/global-accelerator/latest/dg/cross-account-resources.create-attachment.html): You can add a resource from another account as an endpoint for an accelerator with the `CreateCrossAccountAttachment` API.
166166
* [AWS Cloud9 shared environment](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html): You can share AWS Cloud9 development environment with users from other accounts with the `CreateEnvironmentMembership` API.
@@ -169,7 +169,7 @@ Example data access patterns:
169169

170170
### "Sid":"ProtectActionsNotSupportedByPrimaryDPControls"
171171

172-
This statement is included in [data_perimeter_governance_scp](data_perimeter_governance_scp.json) and restricts actions that are not supported by primary data perimeter controls, such as those listed in the[ResourceOrgID condition key page](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourceorgid).
172+
This statement is included in [data_perimeter_governance_scp](data_perimeter_governance_scp.json) and restricts actions that are not supported by primary data perimeter controls, such as those listed in the [ResourceOrgID condition key page](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourceorgid).
173173

174174
Example data access patterns:
175175

@@ -191,16 +191,6 @@ You can also consider using service-specific condition keys such as `ec2:Accepte
191191

192192
This statement is included in the [data_perimeter_governance_scp](data_perimeter_governance_scp.json) and prevents the attaching, detaching, and modifying of tags used for authorization controls within the data perimeter.
193193

194-
### "Sid":"PreventS3PublicAccessBlockConfigurations"
195-
196-
This statement is included in the [data_perimeter_governance_scp](data_perimeter_governance_scp.json) and prevents users from altering S3 Block Public Access configurations.
197-
198-
[S3 Block Public Access](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html) provides settings for access points, buckets, and accounts to help you manage public access to Amazon S3 resources. With S3 Block Public Access, account administrators and bucket owners can set up centralized controls to limit public access to their Amazon S3 resources that are enforced, regardless of how the resources are created.
199-
200-
### "Sid":"PreventPublicBucketACL"
201-
202-
This statement is included in the [data_perimeter_governance_scp](data_perimeter_governance_scp.json) and prevents users from applying public read and public read-write canned access control lists to Amazon S3 buckets.
203-
204194
### "Sid":"PreventLambdaFunctionURLAuthNone"
205195

206196
This statement is included in the [data_perimeter_governance_scp](data_perimeter_governance_scp.json) and denies the creation of Lambda functions that have `lambda:FunctionUrlAuthType` set to `NONE`.

service_control_policies/data_perimeter_governance_scp.json

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"oam:CreateLink",
5252
"servicecatalog:CreatePortfolioShare",
5353
"config:PutConfigurationAggregator",
54+
"config:PutAggregationAuthorization",
5455
"fis:CreateTargetAccountConfiguration",
5556
"globalaccelerator:CreateCrossAccountAttachment",
5657
"cloud9:CreateEnvironmentMembership",
@@ -100,37 +101,6 @@
100101
}
101102
},
102103
{
103-
"Sid": "PreventPublicBucketACL",
104-
"Effect": "Deny",
105-
"Action": [
106-
"s3:PutBucketAcl",
107-
"s3:CreateBucket"
108-
],
109-
"Resource": "*",
110-
"Condition": {
111-
"StringEquals": {
112-
"s3:x-amz-acl": [
113-
"public-read",
114-
"public-read-write"
115-
]
116-
},
117-
"StringNotEqualsIfExists": {
118-
"aws:PrincipalTag/dp:exclude:identity": "true"
119-
}
120-
}
121-
},
122-
{
123-
"Sid": "PreventS3PublicAccessBlockConfigurations",
124-
"Effect": "Deny",
125-
"Action": "s3:PutAccountPublicAccessBlock",
126-
"Resource": "*",
127-
"Condition": {
128-
"StringNotEqualsIfExists": {
129-
"aws:PrincipalTag/dp:exclude:identity": "true"
130-
}
131-
}
132-
},
133-
{
134104
"Sid":"PreventLambdaFunctionURLAuthNone",
135105
"Effect":"Deny",
136106
"Action":[

service_control_policies/service_specific_controls/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Use the following example SCPs individually or in combination:
1212
* [network_perimeter_iam_users_scp](/service_control_policies/service_specific_controls/network_perimeter_iam_users_scp.json) - Enforces network perimeter controls on IAM users with long-term access keys.
1313
* [network_perimeter_lambda_scp](/service_control_policies/service_specific_controls/network_perimeter_lambda_scp.json) - Enforces network perimeter controls on service roles used by AWS Lambda.
1414
* [restrict_nonvpc_deployment_scp](/service_control_policies/service_specific_controls/restrict_nonvpc_deployment_scp.json) - Enforces deployment of resources in a customer managed Amazon VPC.
15-
* [restrict_idp_configurations_scp](/service_control_policies/service_specific_controls/restrict_idp_configurations_scp.json) - Restricts ability to make configuration changes to the IAM SAML identity providers.
15+
* [restrict_idp_configurations_scp](/service_control_policies/service_specific_controls/restrict_idp_configurations_scp.json) - Restricts the ability to make configuration changes to the IAM SAML identity providers.
16+
* [restrict_untrusted_endpoints_scp](/service_control_policies/service_specific_controls/restrict_untrusted_endpoints_scp.json) - Prevent untrusted non-AWS resources from being configured as targets for service operations.
17+
* [restrict_presignedURL_scp](service_control_policies/service_specific_controls/restrict_presignedURL_scp.json) - Restricts the ability to create Amazon S3 presigned URLs within specific services.
1618

1719
Note that the SCP examples in this repository use a [deny list strategy](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_strategies.html), which means that you also need a FullAWSAccess policy or other policy attached to your AWS Organizations organization entities to allow actions. You still also need to grant appropriate permissions to your principals by using identity-based or resource-based policies.
1820

@@ -91,3 +93,10 @@ For more details, see the definition of the parameter [`AppNetworkAccessType`](h
9193
This statement is included in the [restrict_nonvpc_deployment_scp](restrict_nonvpc_deployment_scp.json) and prevents users from creating [Amazon SageMaker Notebooks Instances](https://docs.aws.amazon.com/sagemaker/latest/dg/nbi.html) that can access the internet through a VPC managed by SageMaker.
9294
For more details, see [Connect a Notebook Instance in a VPC to External Resources](https://docs.aws.amazon.com/sagemaker/latest/dg/appendix-notebook-and-internet-access.html) in the Amazon SageMaker documentation.
9395

96+
### "Sid": "PreventUntrustedSNSEmailSubscriptions"
97+
98+
This statement is included in the [restrict_sns_subscription_scp](/service_control_policies/service_specific_controls/restrict_sns_subscription_scp.json) and prevents users from subscribing email addresses that belong to domains other than the one denoted by <trusted_email_domain> to an SNS topic. See [Amazon SNS policy keys](https://docs.aws.amazon.com/sns/latest/dg/sns-using-identity-based-policies.html#sns-policy-keys) for more details.
99+
100+
### "Sid": "PreventCreationOfServicePresignedURL"
101+
102+
This statement is included in the [restrict_presignedURL_scp](service_control_policies/service_specific_controls/restrict_presignedURL_scp.json) and prevents users from creating Amazon S3 presigned URLs within specific services.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Sid": "PreventCreationOfServicePresignedURL",
6+
"Effect": "Deny",
7+
"Action": [
8+
"lambda:GetFunction"
9+
],
10+
"Resource": "*",
11+
"Condition": {
12+
"StringNotEqualsIfExists": {
13+
"aws:PrincipalTag/dp:exclude:network": "true"
14+
}
15+
}
16+
}
17+
]
18+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Sid": "PreventUntrustedSNSEmailSubscriptions",
6+
"Effect": "Deny",
7+
"Action": [
8+
"sns:Subscribe"
9+
],
10+
"Resource": "*",
11+
"Condition": {
12+
"StringEquals": {
13+
"sns:Protocol": "email"
14+
},
15+
"StringNotLike": {
16+
"sns:Endpoint": "*@<trusted_email_domain>"
17+
},
18+
"StringNotEqualsIfExists": {
19+
"aws:PrincipalTag/dp:exclude:resource": "true"
20+
}
21+
}
22+
}
23+
]
24+
}

service_owned_resources.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ The following table contains service-owned resources that AWS services use to pe
4141
| Amazon S3 bucket | AWS Elastic Disaster Recovery | `arn:aws:s3:::aws-drs-clients-<region>/*`<br /><br />`arn:aws:s3:::aws-drs-clients-hashes-<region>/*`<br /><br />`arn:aws:s3:::aws-drs-internal-<region>/*`<br /><br />`arn:aws:s3:::aws-drs-internal-hashes-<region>/*`<br /><br />`arn:aws:s3:::aws-elastic-disaster-recovery-<region>/*`<br /><br />`arn:aws:s3:::aws-elastic-disaster-recovery-hashes-<region>/*` | Elastic Disaster Recovery uses service-owned S3 buckets to store and access managed resources used to perform its operations. The [AWS Replication Agent installer](https://docs.aws.amazon.com/drs/latest/userguide/agent-installation.html) uses a presigned URL, which is signed by the service account, to make requests to various service-owned S3 buckets, which originate from your VPC. See [Elastic Disaster Recovery network requirements](https://docs.aws.amazon.com/drs/latest/userguide/Network-Requirements.html) for more details. | [s3_endpoint_policy.json](vpc_endpoint_policies/s3_endpoint_policy.json) |
4242
| Amazon S3 bucket | AWS Certificate Manager (ACM) | `arn:aws:s3:::aws-ec2-enclave-certificate-<region>-prod/*` | ACM for AWS Nitro Enclaves uses an service-owned S3 bucket to distribute a certificate to an EC2-hosted web server. See [AWS Certificate Manager for Nitro Enclaves](https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html#role-cert) for more details. | [s3_endpoint_policy.json](vpc_endpoint_policies/s3_endpoint_policy.json) |
4343
| Amazon S3 bucket | AWS CodeArtifact | `arn:aws:s3:::assets-<CodeArtifact-Region-Account>-<region>/*` | CodeArtifact uses service-owned S3 buckets to host the artifacts and redirects HTTP requests for an artifact repository URL to a presigned URL backed by one of service-owned buckets. See [Minimum Amazon S3 bucket permissions for AWS CodeArtifact](https://docs.aws.amazon.com/codeartifact/latest/ug/create-s3-gateway-endpoint.html#s3-gateway-endpoint-permissions) for more details| [s3_endpoint_policy.json](vpc_endpoint_policies/s3_endpoint_policy.json) |
44+
| Amazon S3 bucket | AWS Lambda | `arn:aws:s3:::prod-04-2014-tasks/*`<br /><br />`arn:aws:s3:::awslambda-<region>-tasks/*` | AWS Lambda stores function deployment packages in service-owned S3 buckets. Lambda uses its service principal to create a presigned S3 URL, which can be used to download these packages. See [GetFunction](https://docs.aws.amazon.com/cli/latest/reference/lambda/get-function.html) for more details.| [s3_endpoint_policy.json](vpc_endpoint_policies/s3_endpoint_policy.json)*|
4445
| AWS CloudFormation transform | AWS CloudFormation | `arn:aws:cloudformation:*:aws:transform/*` | You can use [AWS CloudFormation transforms](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-reference.html) to process templates through a special macro that can modify or extend the functionality of a CloudFormation template before it is deployed. CloudFormation uses its service role or FAS to make requests to the transforms. See [Control CloudFormation access with AWS Identity and Access Management](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/control-access-with-iam.html) for more details. | [resource_perimeter_scp.json](service_control_policies/resource_perimeter_scp.json)<br /><br />[cloudformation_endpoint_policy.json](vpc_endpoint_policies/cloudformation_endpoint_policy.json)* |
4546
| AWS IAM policy | Multiple | `arn:aws:iam::aws:policy/*` | You can use [AWS Identity and Access Management (IAM)](https://aws.amazon.com/iam/) [AWS managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) to assign appropriate permissions to users, IAM groups, and roles. See [What are AWS managed policies?](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) for more details. | [resource_perimeter_scp.json](service_control_policies/resource_perimeter_scp.json)<br /><br />[iam_endpoint_policy](vpc_endpoint_policies/iam_endpoint_policy.json)* |
4647
| AWS Lambda layer | Multiple | `arn:aws:lambda:*:<service-account-id>:layer:*` | Services such as Amazon CloudWatch and AWS AppConfig maintain AWS Lambda extensions owned by Amazon that you can add as layers to you functions. For example, [CloudWatch Lambda Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html) and [AWS AppConfig Agent Lambda extension](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-lambda-extensions.html).See [Available versions of the Lambda Insights extension](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versions.html) and [Understanding available versions of the AWS AppConfig Agent Lambda extension](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-lambda-extensions-versions.html) for more details. Note that `<service-account-id>` can vary by AWS Region, and you might need to allow multiple account IDs if you are operating in multiple Regions. | [resource_perimeter_scp.json](service_control_policies/resource_perimeter_scp.json)<br /><br />[lambda_endpoint_policy](vpc_endpoint_policies/lambda_endpoint_policy.json)* |
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Service-specific guidance
2+
3+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: CC-BY-SA-4.0
4+
5+
## Description
6+
7+
This folder contains service-specific documents with additional considerations that you might want to review and consider when implementing a data perimeter for a service. Each service-specific document contains a list of service APIs reviewed against data perimeter control objectives to assess whether additional considerations apply to a service within the scope of current analysis.
8+
9+
For each consideration, we provide prescriptive guidance about controls you might want to implement in addition to the [general data perimeter guidance and default policies](../#General-data-perimeter-guidance).
10+
11+
The following are the types of additional controls that you might want to consider:
12+
* **Preventative controls**: Security controls designed to prevent actions that lead to deviations from your data perimeter baseline. These controls are implemented by using [service control policies (SCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) or [resource control policies (RCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html).
13+
* **Proactive controls**: Security controls designed to prevent resource configurations that lead to deviations from your data perimeter baseline. These controls are implemented through automated checks within deployment pipelines, such as those supported with [AWS CloudFormation Hooks](https://docs.aws.amazon.com/cloudformation-cli/latest/hooks-userguide/what-is-cloudformation-hooks.html). Though we primarily use CloudFormation hooks in the prescriptive guidance, you can implement policy-as-code checks by using your preferred infrastructure as code (IaC) tooling.
14+
* **Detective controls**: Security controls designed to detect actions or resource configurations that lead to deviations from your data perimeter baseline. These controls can be implemented by using [AWS CloudTrail](https://aws.amazon.com/cloudtrail/) ([management events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-events.html#cloudtrail-management-events), [data events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-events.html#cloudtrail-data-events), [network activity events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-events.html#cloudtrail-network-events)), [AWS Config](https://aws.amazon.com/config/), and your preferred log analysis tools. If necessary, you can remediate detected deviations with the responsive controls of your choice.
15+
16+
Based on your risk-mitigation strategy, determine which of these control types to apply for additional considerations outlined in each service-specific document.
17+
18+
When AWS services make calls to other services on your behalf, you might need to review service-specific guidance for all services in use to implement appropriate controls. For example, when using services that stores data using your Amazon S3 buckets, consider implementing data perimeter controls for Amazon S3 by consulting S3-specific guidance for comprehensive control coverage.

0 commit comments

Comments
 (0)