alexcrichton / curl-rust

Rust bindings to libcurl
MIT License
1.01k stars 234 forks source link

Enabling aws-sigv4 integration #392

Closed theawless closed 3 years ago

theawless commented 3 years ago

Hi, I wanted to enable the aws-sigv4 integration that was introduced with curl version 7.75. Multiple cloud providers use this scheme, but many don't have adequate rust clients (SDKs or signing libraries). I think it would be pretty nifty to have this feature supported out of the box in curl-rust (and hopefully in isahc). Q1. What are your thoughts on this?

Here's my work so far: https://github.com/alexcrichton/curl-rust/compare/master...theawless:aws-sigv4

I noticed that removing CURL_DISABLE_CRYPTO_AUTH automatically starts building NTLM which I didn't intend to. The already existing flag CURL_DISABLE_NTLM didn't seem to work. I noticed that curl got rid of that flag here in this commit. I haven't worked with curl before but I think it might be impacting other dependencies as well (at least the code search shows many instances). Q2: Do you think that this could be reverted and should I start a discussion at their end?

alexcrichton commented 3 years ago

Seems reasonable to me to add this! If this requires fiddly bits as part of the build that's ok, the current build script is pretty specialized to what this crate needs as-is and if it needs more it's expected that we'd need to pull in more files and update things. I don't know ahead of time what changes are necessary to support this, but figuring it out on a PR seems fine by me.

theawless commented 3 years ago

@alexcrichton Just one last question before I close this issue and continue the work on a pull request.

Since this commit in curl the flag CURL_DISABLE_NTLM is not working. Do you happen to know a for sure way to disable NTLM while building curl?

alexcrichton commented 3 years ago

Nah unfortunately I do not know.