smithy-rs icon indicating copy to clipboard operation
smithy-rs copied to clipboard

`Display` and `Debug` don't honor `@sensitive` for individual fields

Open jjant opened this issue 2 years ago • 2 comments

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.

jjant avatar Oct 10 '22 09:10 jjant