-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-servicecatalog: ProductStack fails with assetBucket that requires encryption #26302
Labels
@aws-cdk/aws-servicecatalog
Related to AWS Service Catalog
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Comments
wolanlu
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Jul 10, 2023
github-actions
bot
added
the
@aws-cdk/aws-servicecatalog
Related to AWS Service Catalog
label
Jul 10, 2023
A possible solution: #26303 |
Yes it makes sense to me. Thank you for your PR. |
pahud
added
p2
effort/medium
Medium work item – several days of effort
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Jul 10, 2023
mergify bot
pushed a commit
that referenced
this issue
Jul 11, 2023
#26303) Clients account setup strictly required that every bucket is encrypted. It also forces Bucket Policy to deny any unencrypted PutObject actions. When suppling ProductStack with such a Bucket as assetBucket the deployment fails on Custom Resource Lambda not being able to synch asset files into assetBucket (Access Denied). Expected Behavior I would expect that assets will be encrypted when the asset bucket has encryption enabled. Current Behavior Under the hood ProductStack uses BucketDeployment construct without encryption which results in AccessDenied. I does not considers Bucket encryption settings. Possible Solution This PR is a possible solution in which user would provide additional property `serverSideEncryption` along with encryption key `serverSideEncryptionAwsKmsKeyId` which would turn on respectful options on BucketDeployment to enable encryption. This could also be implicitly learnt from assetBucket configuration but I feel it better to leave this decision to the user - but I am open to change implementation if you thing this is better approach. Closes #26302. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
bmoffatt
pushed a commit
to bmoffatt/aws-cdk
that referenced
this issue
Jul 29, 2023
aws#26303) Clients account setup strictly required that every bucket is encrypted. It also forces Bucket Policy to deny any unencrypted PutObject actions. When suppling ProductStack with such a Bucket as assetBucket the deployment fails on Custom Resource Lambda not being able to synch asset files into assetBucket (Access Denied). Expected Behavior I would expect that assets will be encrypted when the asset bucket has encryption enabled. Current Behavior Under the hood ProductStack uses BucketDeployment construct without encryption which results in AccessDenied. I does not considers Bucket encryption settings. Possible Solution This PR is a possible solution in which user would provide additional property `serverSideEncryption` along with encryption key `serverSideEncryptionAwsKmsKeyId` which would turn on respectful options on BucketDeployment to enable encryption. This could also be implicitly learnt from assetBucket configuration but I feel it better to leave this decision to the user - but I am open to change implementation if you thing this is better approach. Closes aws#26302. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-servicecatalog
Related to AWS Service Catalog
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
Clients account setup strictly required that every bucket is encrypted. It also forces Bucket Policy to deny any unencrypted PutObject actions. When suppling ProductStack with such a Bucket as assetBucket the deployment fails on Custom Resource Lambda not being able to synch asset files into assetBucket (Access Denied).
Expected Behavior
I would expect that assets will be encrypted when the asset bucket has encryption enabled.
Current Behavior
Under the hood ProductStack uses BucketDeployment construct without encryption which results in AccessDenied. I does not considers Bucket encryption settings.
Reproduction Steps
Create a ProductStack that includes a Lambda (to use assets). Provide as assetBucket a Bucket with SSE_KMS encryption enabled and BucketPolicy configured to deny any unencrypted PutObjects.
Possible Solution
I've created a PR with a possible solution in which user would provide additional property which would turn on respectful options on BucketDeployment to enable encryption. This could also be implicitly learnt from assetBucket configuration but I feel it better to leave this decision to the user.
Additional Information/Context
No response
CDK CLI Version
2.87.0
Framework Version
No response
Node.js Version
18.16.1
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: