google-apis-rs / generator

A binding and CLI generator for all google APIs
Apache License 2.0
71 stars 14 forks source link

Add support for cloud storage signed URLs #21

Open mwilliammyers opened 5 years ago

mwilliammyers commented 5 years ago

I have some code that implements the Google Cloud Storage v4 signing algorithm. It is a pretty annoying algorithm to implement by hand—mostly because the Google docs are pretty confusing and I had to match hashing function params to what ring expects—so I thought I should make a crate out of it. It is especially annoying because all the official Google Cloud clients have a handy function for it.

It does everything locally which means it depends on ring... I think I could remove this dependency by using the signBlob function from the iamcredentials(IIRC) API instead (or really, keep both but feature-gate ring). I am not sure if I have the time to do that right now though...

Are we interested in adding it into this project somewhere? Not sure what our thoughts are about things that deviate from the published googleapis stuff...

mwilliammyers commented 5 years ago

I am going to clean it up a bit more before publishing it (not sure if I am sold on the function style API), but just so you get a sense of what I am talking about, here is a playground permalink.