Skip to content
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

Disallow sensitive trait on members #1137

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

gosar
Copy link
Contributor

@gosar gosar commented Mar 16, 2022

Allowing @sensitive trait on members can lead to insecure usage
patterns, like forgetting to put @sensitive on ALL members that target
the same shape, which can lead to sensitive data not getting handled
properly, e.g., not getting redacted from logs, etc.

Instead marking the target shape as sensitive prevents modeling
mistakes by ensuring every reference to data types that are inherently
sensitive are always considered sensitive.

TODO: Doc updates. Currently idl-2.0 branch's docs still references version 1.0 mostly. Will update docs separately later.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mtdowling
Copy link
Member

The spec probably needs to be updated to reflect this change. The selector shouldn't allow members for sensitive. Our implementation of Smithy will need to allow it since we support v1 and v2 simultaneously, but the extra validation we're doing will cover us to not actually allow it on members.

@gosar gosar force-pushed the sensitive-idl-2.0 branch 2 times, most recently from 6c2fd9a to b8dd42c Compare March 21, 2022 22:25
Allowing @sensitive trait on members can lead to insecure usage
patterns, like forgetting to put @sensitive on ALL members that target
the same shape, which can lead to sensitive data not getting handled
properly, e.g., not getting redacted from logs, etc.

Instead marking the target shape as sensitive prevents modeling
mistakes by ensuring every reference to data types that are inherently
sensitive are always considered sensitive.
@mtdowling mtdowling merged commit b237a10 into smithy-lang:idl-2.0 Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants