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

Implement Stringify methods for the Go SDK structs that respect @sensitive #1883

Open
1 of 2 tasks
garrettheel opened this issue Oct 12, 2022 · 1 comment
Open
1 of 2 tasks
Assignees
Labels
feature-request A feature should be added or improved. l Effort estimation: large p3 This is a minor priority issue queued This issues is on the AWS team's backlog

Comments

@garrettheel
Copy link

Describe the feature

It would be nice if the Prettify function from https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/internal/awsutil were public (i.e. not within an internal path)

Use Case

Debugging v2 structs is tedious without this function being available. This behavior is different from aws-sdk-go, which called Prettify in String() methods.. making it even easier to inspect these when debugging.

v1 also exposes prettify publicly (github.com/aws/aws-sdk-go/aws/awsutil), and that sorta works.. however it does not format some of the v2 structs properly.

Proposed Solution

Expose Prettify in a public module

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Go SDK V2 Module Versions Used

n/a

Go version used

1.19

@garrettheel garrettheel added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 12, 2022
@RanVaknin RanVaknin added p3 This is a minor priority issue m Effort estimation: medium labels Nov 14, 2022
@RanVaknin RanVaknin self-assigned this Jan 11, 2023
@RanVaknin RanVaknin removed needs-triage This issue or PR still needs to be triaged. p3 This is a minor priority issue m Effort estimation: medium labels Jan 11, 2023
@RanVaknin
Copy link
Contributor

Hi @garrettheel,

Thanks for opening the feature request. Unfortunately we can't expose the prettify function in v2 because v2 does not have Smithy's sensitive trait implemented.
Without this, customers could be using Prettify to log sensitive information, and from a security standpoint this is a no-no.

Until we can get that implemented I can recommend using spew.Dump() to walk through the response.

I'm going to leave this FR open since this is something that we eventually do want to add back. In the spirit of full transparency I'll say that it will take a while until we can get to it, but I appreciate you bringing this to us.

Thanks again!
Ran

@RanVaknin RanVaknin added p3 This is a minor priority issue l Effort estimation: large labels Jan 11, 2023
@garrettheel garrettheel changed the title (short issue description) Expose Prettify function in a public module May 9, 2023
@RanVaknin RanVaknin changed the title Expose Prettify function in a public module Implement Stringify methods for the Go SDK structs that respect @sensitive Feb 29, 2024
@RanVaknin RanVaknin added the queued This issues is on the AWS team's backlog label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. l Effort estimation: large p3 This is a minor priority issue queued This issues is on the AWS team's backlog
Projects
None yet
Development

No branches or pull requests

2 participants