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

AWS Lambda Blob format incorrect #22

Open
kennyjwilli opened this issue May 21, 2019 · 2 comments
Open

AWS Lambda Blob format incorrect #22

kennyjwilli opened this issue May 21, 2019 · 2 comments

Comments

@kennyjwilli
Copy link

The Blob definition is defined here. A Blob is used in a few locations, one of which is in a Code object here. According to the AWS API Reference doc, this should be encoded as "Base64-encoded binary data object." Swagger has support for Base64 encoded content by using the format: byte property. The Blob format property is currently set to password. I believe it should be set to byte.

@MikeRalphson
Copy link
Contributor

Paging @pimterry

@pimterry
Copy link
Contributor

Totally makes sense to me. The backing AWS data for this is here, and the conversion logic is over here.

Right now, it:

  • Assumes blobs are all plain strings
  • Assumes all fields marked as sensitive in the AWS SDK should be in password format, so OpenAPI tools don't show the content

I think we should treat blob as a special case here, which is always in base64 format, and never marked as password. They can indeed be sensitive (e.g. PrivateKeyBlob), but managing base64 data feels different to managing passwords - nobody is going to be looking over your shoulder and memorizing your entire base64 private key, and I can imagine that tools properly understanding the blob format could be very helpful.

It doesn't sound like this is an urgent problem for now, and I'm quite busy, so I'm not going to be able to fix this in the short term. Assuming @MikeRalphson agrees with the plan above though, it should be easy to put in a PR for the linked aws2openapi conversion logic to add that special case, and fix this.

@MikeRalphson MikeRalphson transferred this issue from APIs-guru/openapi-directory Jun 11, 2019
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

No branches or pull requests

3 participants