-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore: build a JSON blueprint to redact object values #33113
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
Merged
QuantumNeuralCoder
merged 5 commits into
yuanhaoz/feat/metadata-collection
from
yuanhaoz/feat/metadata-collection-importer2
Jan 29, 2025
Merged
chore: build a JSON blueprint to redact object values #33113
QuantumNeuralCoder
merged 5 commits into
yuanhaoz/feat/metadata-collection
from
yuanhaoz/feat/metadata-collection-importer2
Jan 29, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9584b0d to
6eccb25
Compare
6eccb25 to
5940fc3
Compare
5940fc3 to
91bd497
Compare
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
xazhao
reviewed
Jan 24, 2025
xazhao
approved these changes
Jan 28, 2025
| if (Array.isArray(data)) { | ||
| // Handle arrays by recursively redacting each element | ||
| return data.map((item) => redactTelemetryDataHelper(item, visited)); | ||
| // Do not redact boolean value |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| // Do not redact boolean value | |
| // Do not redact enum value |
11dd8cf
into
yuanhaoz/feat/metadata-collection
8 checks passed
Contributor
|
Comments on closed issues and PRs are hard for our team to see. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
contribution/core
This is a PR that came from AWS.
p2
pr/needs-maintainer-review
This PR needs a review from a Core Team Member
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reason for this change
We want to identify the difference between built-in objects vs customer input objects.
For built-in objects, we want to recursively log the content and redact the values.
However, for property keys and values that customer uniquely create, the entire object will be redacted. For example, if you use InlineApiDefinition to define an OpenAPI specification and pass it into a RestApi construct, the entire
InlineApiDefinitionobject will be redacted.Description of changes
Build a workflow (that will be linked to GHA in the future) and when redacting, redact based on the value. The workflow on run will parse all files in aws-cdk repository and built a JSON file that contains all constructs and loggable properties of the construct.
When redacting, only log the property key if the key exists in the JSON file. The value will be logged only if the value is not a
*in the JSON file. Everything else is redacted for safely.Description of how you validated changes
Unit tests added to test the updater tool as well as unit tests for modules.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license