Comments (13)
I created a pull request, but have not had time to test it yet. No clue where that content-
prefix came from. Must be some copy-paste from somewhere. But I guess I forgot where I took it from...
from gcs_signed_url.
Of course, this time I tried, it worked absolutely fine. I'll post the results in a bit. Thanks for your assistance!
from gcs_signed_url.
Hi @camelpunch
Thanks for the issue, I was not aware of this deprecation. So I'm not currently working on it. If you wanna give it a go, be my guest! Otherwise I will take a look at it. Let me know.
from gcs_signed_url.
Actually, what makes you think the used api is the deprecated one? I'd have to give it a closer look but after looking at the request and response parameters just briefly, I tkink it's the correct one...
from gcs_signed_url.
This comment is what got me worried.
However, this comment points to the new one:
The actual domain used seems to be content-iamcredentials.googleapis.com - whereas the docs say to use iamcredentials.googleapis.com (this could be deliberate - I don't know enough about this).
from gcs_signed_url.
Fixed. Let me know if you need this released asap. Otherwise with the next release.
from gcs_signed_url.
Thanks! It's not urgent for me. I wanted to use this library's parts to sign a direct-upload form POST, but ran into issues with the SignBlob API. I can get an upload working with a static JSON key but the SignBlob API's signatures never match (tried with/without base64, and I am base16ing the signature afterwards).
If I figure it out I might PR form signing into this repo, if that makes sense? Kinda at odds with its name, though.
from gcs_signed_url.
We do that on a project. Let me know if you need help with it.
We do the same on a project and it works well. Let me know if you need help.
I can get an upload working with a static JSON key but the SignBlob API's signatures never match
Are you on the latest version? Does it have to do with #16?
Kinda at odds with its name, though.
Fair enough ;)
from gcs_signed_url.
@mruoss is there any chance I could see a working example of the SignBlob API being used to sign a form upload? I've recently revisited this and come up against the same issues. I tried using the official, generated, google API with the horrendous docs and get the same problems with mismatching sigs.
from gcs_signed_url.
My working version with on-premises signing is here: https://github.com/code-supply/code-supply/blob/d10d16df738a799d15b610eb2d7bcbf0e9aa8a0d/web/affable/lib/affable/uploads.ex#L8-L45
It integrates with the fancy LiveView uploads stuff, which needs a JS component: https://github.com/code-supply/code-supply/blob/d10d16df738a799d15b610eb2d7bcbf0e9aa8a0d/web/affable/assets/src/app.ts#L43-L67
from gcs_signed_url.
Not sure I understand. You have a working solution but you want to switch from on-prem signing to using the API?
from gcs_signed_url.
Apologies, I wasn't very clear. Yes! The links above point to working code using on-prem signing. I want to use the SignBlob API, but whenever I use it either from this library or from Google's SDK, I run into trouble.
The API returns a base64-encoded string, which differs to the result of the on-prem sign
, which gives a non-UTF8 bytestring. This would be alright, but even when decoded, the bytes are wildly different from the result of the on-prem signing, and the body of the POST from the browser confirms this (SignatureDoesNotMatch
).
When I recreate a failing case for the nth time I'll post it as a branch to that code.
from gcs_signed_url.
This is the new working code (missing error checking etc) with SignBlob: https://github.com/code-supply/code-supply/blob/ddcde9e69f5a7098beda4c403483180a261f6372/web/affable/lib/affable/uploads.ex#L33-L50
Thanks for your work!
from gcs_signed_url.
Related Issues (8)
- Remove fixtures in favor of defining local setup blocks HOT 4
- MalformedSecurityHeader : Facing issue while passing content-type HOT 9
- GKE Workload Identity Support
- GcsSignedUrl.hours_after returns invalid number for v4 HOT 4
- MalformedSecurityHeader HOT 10
- GcsSignedUrl.generate_v4 doesn't work HOT 3
- Tag released package versions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcs_signed_url.