You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see any error handling in VSICurlHandle::DownloadRegion, it just returns empty string.
Steps to reproduce the problem.
Either it is possible to wait a day to let the token expire, or it is possible to make a small change to code to take the token always from config map, when constructing headers. It is then possible to change the token to invalid one.
A more appropriate / general fix would be to handle token expiration, and re-issue a request for a token for the case where the user doesn't provide SWIFT_AUTH_TOKEN, but uses SWIFT_AUTH_V1_URL + SWIFT_USER + SWIFT_KEY
I'm willing to implement the refresh of the token by SWIFT_AUTH_V1_URL. I would also like to add V3 interface for authentication.
If you would have some tips where to put the code that would be much appreciated.
port/cpl_swift.cpp for authentication logic and port/cpl_vsil_swift.cpp for virtual file system logic.
For the refresh, there is some logic in port/cpl_aws.cpp (which may not work according to #1593 (comment)). Not completely sure if that can help or is a model for inspiration
Expected behavior and actual behavior.
When
SWIFT_AUTH_TOKEN
expire, swift begins to return 401.This behavior is documented here:
https://docs.openstack.org/swift/queens/api/authentication.html
In such case I would expect
RasterIO()
call to fail so user can handle it somehow.Instead the call silently returns empty data.
With debugging on, I can see
which comes from here:
gdal/gdal/port/cpl_vsil_curl.cpp
Line 1335 in ef49c00
I don't see any error handling in
VSICurlHandle::DownloadRegion
, it just returns empty string.Steps to reproduce the problem.
Either it is possible to wait a day to let the token expire, or it is possible to make a small change to code to take the token always from config map, when constructing headers. It is then possible to change the token to invalid one.
Operating system
Debian Buster
GDAL version and provenance
The latest master from github.
The text was updated successfully, but these errors were encountered: