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

Enable trust serializer to unzip raw bytes from bytes.Reader #51

Open
3 tasks
bbengfort opened this issue May 31, 2021 · 0 comments
Open
3 tasks

Enable trust serializer to unzip raw bytes from bytes.Reader #51

bbengfort opened this issue May 31, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@bbengfort
Copy link
Collaborator

bbengfort commented May 31, 2021

Right now the trust serializer expects an io.ReadCloser from zip.OpenReader when passed to serializer.Read() - this works when the zip file is being opened from a path on disk, but doesn't allow in-memory decompression of zip files, which may be required when using secrets storage such as Google Secret Manager or Vault. Although in most cases the secret will be mounted to a pod and read as though it were on disk, it would still be useful to have this utility.

  • in serializer.Read in ZIP mode perform a type check to see if the reader is a zip.ReadCloser, a zip.Reader, or not.
  • If zip.ReadCloser - continue as normal; if not a zip.Reader, create a zip.Reader from the reader.
  • Process the zip.Reader independently of the zip.ReadCloser Using advice from this stackoverflow post

See also this small test issue in the directory repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant