gRPC basic auth encoding
Doing the gRPC request using basic auth, I’m setting the username and password, and the server responds with basic auth token is not valid base64: illegal base64 data - indicating that the credentials are not encoded.
Copy pasting the same request and credentials to Postman work, it does encode the basic auth header I guess.
I’ve tried encoding the password alone, etc. But as far as I know, the whole credentials must be encode, for example, here https://www.rfc-editor.org/rfc/rfc2617#section-2
Could you please let me know if I can configure it somehow in Yaak or is this something has to be adjusted on the app side?
Thanks!
What version are you running? There was a fix related to this recently
Updated today to 9.0, was about to install the new beta-10
Hmm, 2024.9.0 should be working. I just tested with httpbin and am getting success. Are you able to print the Authorization header in your server and see if something looks off?
I also checked with Curl and am getting the same header sent as Yaak.
So, had some time to fiddle a bit today. Wanted to remind you that this is gRPC request, perhaps there are differences in the implementation, not sure?
Anywho, I’m firing up the request with these credentials
On the server side I get this header:
And trying to base64 decode it I’m getting
I’ve played around with similar examples, including my real credentials. It doesn’t seem very stable, sometimes adding “1” at the end of the username, or deleting some characters off the password produce a properly encoded string.
I hope you can pinpoint the issue! Let me know if you need more details. Thanks!
Oh, here’s what I’ve noticed - if I do the request with postman, I get an additional “=” in the end of the encoded string, that must be it, the line termination
Ooo yes, gRPC. The fix was only applied to http so I'll make sure to port it over
Fixed in https://github.com/yaakapp/app/commit/6247603cec98d56d8f3d7d2ed467748f1f17d9fa
https://yaak.app/blog/2024.10.0-beta.3
https://yaak.app/blog/2024.10.0