smithy-rs
smithy-rs copied to clipboard
`Display` and `Debug` don't honor `@sensitive` for individual fields
As discussed in https://github.com/awslabs/smithy-rs/issues/1743#issuecomment-1260989510, the current @sensitive
implementation only respects the trait when logging the structure containing the sensitive field, but not when logging the field itself.
A possible fix to this issue, is to newtype @sensitive
shapes in the generated code, overriding their Display
and Debug
implementations through the Sensitive
type.