-
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
custom-resources: Provider logs Data from response with NoEcho: true #30275
custom-resources: Provider logs Data from response with NoEcho: true #30275
Comments
If you are using CustomResource Provider Framework, at this moment, there's no way to turn off the logging: aws-cdk/packages/aws-cdk-lib/custom-resources/lib/provider-framework/runtime/framework.ts Line 38 in 32e9b02
If you use AwsCustomResource, you can disable not logging the Looks like you are using custom CustomResource Provider Framework? |
Making it a p1 feature request to disable the logging for the CR provider framework. |
|
1 similar comment
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
When using a Provider to create a custom resource, the request and response objects are logged by the provider function. There is no apparent way to prevent or redact this logging, resulting in secrets being logged if returned in the custom resource's Data object. By extension, if secret values are passed in the resource's ResourceProperties they will be logged as well.
Expected Behavior
When the custom resource response has
NoEcho: true
, the log output from the Provider function should redact the values from the Data object.Current Behavior
The provider function logged the full Data payload
Reproduction Steps
Deploy this stack and you can see the following log:
Possible Solution
Add logic to the provider handler code to redact the Data object if NoEcho = true
Add properties to the Provider construct to redact some/all of the ResourceProperties from the provider logs.
Additional Information/Context
No response
CDK CLI Version
2.133.0 (build dcc1e75)
Framework Version
2.133.0
Node.js Version
20
OS
Ubuntu
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: