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 libcurl cookie engine #1000
Comments
Fulfilling this enhancement request would allow vsicurl requests against files protected by single-sign-on authentication. In particular, NASA's earth science mission data are hosted behind authentication administered by https://urs.earthdata.nasa.gov . vsicurl already supports redirects and netrc credentials, but also needs libcurl's cookie engine enabled to support the single-sign-on workflow. Enabling the cookie engine internally, or allowing users to override the CURLOPT_COOKIEFILE and CURLOPT_COOKIEJAR libcurl options at runtime, would allow gdal users to interact with these data sets directly over the web. NASA Earth Observation Data - https://earthdata.nasa.gov/earth-observation-data |
This would be great to get into the next release since it just seems to require a few environment variables and will open up a lot of useful archived datasets! I'll follow up with a pull request. Thanks for finding a solution and bringing this up @asjohnston-asf and @idixon ! |
cURL: added curl cookiefile and cookiejar variables (fixes #1000)
We would like libcurl in gdal to enable the cookie engine. The files we are trying to access with /vsicurl/ have a redirect auth in front of them. Without the cookie engine enabled the auth cookie is never forwarded and the requests fail.
We confirmed this is possible by adding:
curl_easy_setopt(http_handle, CURLOPT_COOKIEFILE, "");
to cpl_http.cpp in version 2.3.2.
As an additional feature it would be great to have the COOKIEFILE and COOKIEJAR options exposed to the user.
The text was updated successfully, but these errors were encountered: