Skip to content
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

Allow additional fields in Cloud Storage Connection credentials (or maybe gdal credentials more broadly) #60174

Open
fvankrieken opened this issue Jan 16, 2025 · 2 comments · May be fixed by OSGeo/gdal#11699
Assignees
Labels
Feature Request Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)

Comments

@fvankrieken
Copy link

Feature description

When adding an AWS S3 Cloud Storage Connection from the browser, be able to set AWS_S3_ENDPOINT in the credentials widget

Additional context

Very excited to use the s3 browser connection added in #57870. However, my organization uses Digital Ocean Spaces. This implements AWS S3 api, but with a custom endpoint. Connecting to it in python for example with gdal, we do the following

gdal.SetConfigOption("AWS_S3_ENDPOINT", os.environ["AWS_S3_ENDPOINT"])
gdal.SetConfigOption("AWS_SECRET_ACCESS_KEY", os.environ["AWS_SECRET_ACCESS_KEY"])
gdal.SetConfigOption("AWS_ACCESS_KEY_ID", os.environ["AWS_ACCESS_KEY_ID"])

The first field here, AWS_S3_ENDPOINT, is not an option in the widget to add credentials, meaning we're unable to connect to buckets on this custom endpoint using cloud -> AWS S3 in the browser

Image

The only space I see the AWS... variables referenced explicitly in the repo is in https://github.com/qgis/QGIS/blob/master/src/gui/providers/gdal/qgsgdalcredentialoptionswidget.cpp#L610, though that doesn't include all the options shown in my screenshot so I'm not certain that's where it would need to be added.

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Jan 17, 2025

@fvankrieken, thanks for reporting. AFAIK the available options are retrieved from the GDAL library. The missing one should be probably added to https://github.com/OSGeo/gdal/blob/3da654408183e34eed4be7981f1070a3f0c19824/port/cpl_vsil_s3.cpp#L1904-L1941
Ping @rouault.

@agiudiceandrea agiudiceandrea added the Data Provider Related to specific vector, raster or mesh data providers label Jan 17, 2025
@rouault
Copy link
Contributor

rouault commented Jan 17, 2025

AFAIK the available options are retrieved from the GDAL library.

indeed, I see a call to

const char *pszVsiOptions( VSIGetFileSystemOptions( vsiPrefix.toLocal8Bit().constData() ) );

The missing one should be probably added to https://github.com/OSGeo/gdal/blob/3da654408183e34eed4be7981f1070a3f0c19824/port/cpl_vsil_s3.cpp#L1904-L1941

yes, pull request welcome

@agiudiceandrea agiudiceandrea added Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...) and removed Data Provider Related to specific vector, raster or mesh data providers QGIS Browser labels Jan 17, 2025
@rouault rouault self-assigned this Jan 20, 2025
rouault added a commit to rouault/gdal that referenced this issue Jan 20, 2025
…// prefixing in it

Fixes qgis/QGIS#60174

Funded by QGIS bugfixing program
rouault added a commit to rouault/gdal that referenced this issue Jan 21, 2025
…// prefixing in it

Fixes qgis/QGIS#60174

Funded by QGIS bugfixing program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants