Commit beac675
authored
fix(s3): grantRead does not allow s3:HeadObject (#27416)
Fixes the policy enforced by `grantRead` to allow operations that require to read an object's metadata, for example:
```
s3 = boto3.client("s3")
# this operation requires s3:HeadObject permission
s3.download_file(bucket, key, filepath)
```
Closes #27389.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*1 parent 3fc86ca commit beac675
124 files changed
Lines changed: 299 additions & 14 deletions
File tree
- packages
- @aws-cdk-testing/framework-integ/test
- aws-codebuild/test
- integ.asset-build-spec.js.snapshot
- integ.caching.js.snapshot
- integ.project-bucket.js.snapshot
- integ.project-buildspec-artifacts.js.snapshot
- integ.project-secondary-sources-artifacts.js.snapshot
- aws-codedeploy/test/server/integ.deployment-group.js.snapshot
- aws-codepipeline-actions/test
- cloudformation/integ.stacksets.js.snapshot
- integ.cfn-template-from-repo.lit.js.snapshot
- integ.lambda-deployed-through-codepipeline.lit.js.snapshot
- integ.lambda-pipeline.js.snapshot
- integ.pipeline-alexa-deploy.js.snapshot
- integ.pipeline-cfn-cross-region.js.snapshot
- integ.pipeline-cfn-with-action-role.js.snapshot
- integ.pipeline-cfn.js.snapshot
- integ.pipeline-code-build-batch.js.snapshot
- integ.pipeline-code-build-multiple-inputs-outputs.js.snapshot
- integ.pipeline-code-commit-build.js.snapshot
- integ.pipeline-code-commit.js.snapshot
- integ.pipeline-code-deploy-ecs.js.snapshot
- integ.pipeline-code-deploy.js.snapshot
- integ.pipeline-ecr-source.js.snapshot
- integ.pipeline-ecs-deploy.js.snapshot
- integ.pipeline-ecs-separate-source.lit.js.snapshot
- integ.pipeline-elastic-beanstalk-deploy.js.snapshot
- integ.pipeline-events.js.snapshot
- integ.pipeline-jenkins.js.snapshot
- integ.pipeline-manual-approval.js.snapshot
- integ.pipeline-s3-deploy.js.snapshot
- integ.pipeline-stepfunctions.js.snapshot
- integ.pipeline-with-replication.js.snapshot
- s3/integ.source-bucket-events-cross-stack-same-env.js.snapshot
- aws-ec2/test/integ.instance-init.js.snapshot
- aws-ecs/test/ec2/integ.environment-file.js.snapshot
- aws-eks/test
- integ.eks-cluster-imported.js.snapshot
- integ.eks-cluster-ipv6.js.snapshot
- integ.eks-cluster.js.snapshot
- integ.eks-helm-asset.js.snapshot
- aws-events-targets/test
- codepipeline/integ.pipeline-event-target.js.snapshot
- kinesis-firehose/integ.kinesis-firehose-stream.js.snapshot
- aws-rds/test
- integ.cluster-s3.js.snapshot
- integ.cluster-s3.mysql-8.js.snapshot
- integ.instance-s3-postgres.js.snapshot
- integ.instance-s3.js.snapshot
- aws-s3-assets/test
- integ.assets.bundling.lit.js.snapshot
- integ.assets.directory.lit.js.snapshot
- integ.assets.file-bundling.lit.js.snapshot
- integ.assets.file.lit.js.snapshot
- integ.assets.permissions.lit.js.snapshot
- integ.assets.refs.lit.js.snapshot
- aws-s3-deployment/test
- integ.bucket-deployment-cloudfront.js.snapshot
- integ.bucket-deployment-data.js.snapshot
- integ.bucket-deployment-deployed-bucket.js.snapshot
- integ.bucket-deployment-signcontent.js.snapshot
- integ.bucket-deployment-substitution-with-role.js.snapshot
- integ.bucket-deployment-substitution.js.snapshot
- integ.bucket-deployment.js.snapshot
- aws-s3/test
- integ.bucket-sharing.js.snapshot
- integ.bucket.js.snapshot
- aws-servicecatalog/test
- integ.nested-stack-in-product-stack.js.snapshot
- integ.product.encrypted.asset.js.snapshot
- integ.product.js.snapshot
- integ.two-products.js.snapshot
- aws-stepfunctions-tasks/test
- emrcontainers/integ.job-submission-workflow.js.snapshot
- glue
- integ.glue-task.js.snapshot
- integ.start-job-run.js.snapshot
- sagemaker
- integ.call-sagemaker.js.snapshot
- integ.create-training-job.js.snapshot
- pipelines/test
- integ.newpipeline-with-codebuild-logging.js.snapshot
- integ.newpipeline-with-cross-account-keys.js.snapshot
- integ.newpipeline-with-file-system-locations.js.snapshot
- integ.newpipeline-with-vpc.js.snapshot
- integ.newpipeline.js.snapshot
- integ.pipeline-security.js.snapshot
- integ.pipeline-with-artifact-bucket.js.snapshot
- integ.pipeline-with-assets-single-upload.js.snapshot
- integ.pipeline-with-assets.js.snapshot
- integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot
- integ.pipeline-with-variables.js.snapshot
- integ.pipeline-without-prepare.js.snapshot
- integ.pipeline.js.snapshot
- @aws-cdk
- app-staging-synthesizer-alpha/test
- integ.synth-default-resources.js.snapshot
- integ.synth-default-resources.ts.snapshot
- aws-appconfig-alpha/test/integ.configuration.js.snapshot
- aws-apprunner-alpha/test
- aws-glue-alpha/test
- integ.job-python-shell.js.snapshot
- integ.job.js.snapshot
- integ.table.js.snapshot
- aws-iot-actions-alpha/test/kinesis-firehose/integ.firehose-put-record-action.js.snapshot
- aws-kinesisanalytics-flink-alpha/test
- integ.application-code-from-bucket.lit.js.snapshot
- integ.application.lit.js.snapshot
- integ.vpc-application.js.snapshot
- aws-kinesisfirehose-alpha/test
- integ.delivery-stream.js.snapshot
- integ.delivery-stream.source-stream.js.snapshot
- aws-kinesisfirehose-destinations-alpha/test
- integ.s3-bucket.lit.js.snapshot
- aws-sagemaker-alpha/test
- integ.endpoint-config.js.snapshot
- integ.endpoint.alarms.js.snapshot
- integ.endpoint.js.snapshot
- integ.model.js.snapshot
- aws-cdk-lib
- aws-codebuild/test
- aws-codepipeline-actions/test
- cloudformation
- lambda
- s3
- aws-ec2/test
- aws-rds/test
- aws-s3-assets/test
- aws-s3-deployment/test
- aws-s3
- lib
- test
- aws-servicecatalog/test
- aws-stepfunctions-tasks/test/emrcontainers
- aws-stepfunctions/test
- pipelines/test/compliance
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
| 396 | + | |
395 | 397 | | |
396 | 398 | | |
397 | 399 | | |
| |||
556 | 558 | | |
557 | 559 | | |
558 | 560 | | |
| 561 | + | |
559 | 562 | | |
560 | 563 | | |
561 | 564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
| 437 | + | |
436 | 438 | | |
437 | 439 | | |
438 | 440 | | |
| |||
558 | 560 | | |
559 | 561 | | |
560 | 562 | | |
| 563 | + | |
561 | 564 | | |
562 | 565 | | |
563 | 566 | | |
| |||
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
| 674 | + | |
671 | 675 | | |
672 | 676 | | |
673 | 677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
497 | 498 | | |
498 | 499 | | |
499 | 500 | | |
| 501 | + | |
500 | 502 | | |
501 | 503 | | |
502 | 504 | | |
| |||
614 | 616 | | |
615 | 617 | | |
616 | 618 | | |
| 619 | + | |
617 | 620 | | |
618 | 621 | | |
619 | 622 | | |
| |||
923 | 926 | | |
924 | 927 | | |
925 | 928 | | |
| 929 | + | |
926 | 930 | | |
927 | 931 | | |
928 | 932 | | |
| |||
1031 | 1035 | | |
1032 | 1036 | | |
1033 | 1037 | | |
| 1038 | + | |
1034 | 1039 | | |
1035 | 1040 | | |
1036 | 1041 | | |
| |||
1347 | 1352 | | |
1348 | 1353 | | |
1349 | 1354 | | |
| 1355 | + | |
1350 | 1356 | | |
1351 | 1357 | | |
1352 | 1358 | | |
| |||
1558 | 1564 | | |
1559 | 1565 | | |
1560 | 1566 | | |
| 1567 | + | |
1561 | 1568 | | |
1562 | 1569 | | |
1563 | 1570 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
| 364 | + | |
363 | 365 | | |
364 | 366 | | |
365 | 367 | | |
| |||
0 commit comments