Skip to content

Commit

Permalink
Update vfs.s3.proxy_scheme default to 'http'
Browse files Browse the repository at this point in the history
A user reported errors with the `https` default setting,
which requires advanced configuration and is likely uncommon.
'http' is the default for AWS SDK, and makes more sense for common
use-cases.
  • Loading branch information
ihnorton committed Aug 5, 2020
1 parent 3f21a31 commit d34929a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* AWS SDK version bumped to 1.8.6 [#1718](https://github.com/TileDB-Inc/TileDB/pull/1718)
* Split posix permissions into files and folers permissions [#1719](https://github.com/TileDB-Inc/TileDB/pull/1719)
* Support seeking for CURL to allow redirects for posting to REST [#1728](https://github.com/TileDB-Inc/TileDB/pull/1728)
* Changed default setting for `vfs.s3.proxy_scheme` from `https` to `http` to match common usage needs [#1759](https://github.com/TileDB-Inc/TileDB/pull/1759)


## Deprecations

Expand Down
8 changes: 4 additions & 4 deletions test/src/unit-capi-config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void check_save_to_file() {
<< "\n";
ss << "vfs.s3.multipart_part_size 5242880\n";
ss << "vfs.s3.proxy_port 0\n";
ss << "vfs.s3.proxy_scheme https\n";
ss << "vfs.s3.proxy_scheme http\n";
ss << "vfs.s3.region us-east-1\n";
ss << "vfs.s3.request_timeout_ms 3000\n";
ss << "vfs.s3.scheme https\n";
Expand Down Expand Up @@ -495,7 +495,7 @@ TEST_CASE("C API: Test config iter", "[capi], [config]") {
all_param_values["vfs.s3.proxy_host"] = "";
all_param_values["vfs.s3.proxy_password"] = "";
all_param_values["vfs.s3.proxy_port"] = "0";
all_param_values["vfs.s3.proxy_scheme"] = "https";
all_param_values["vfs.s3.proxy_scheme"] = "http";
all_param_values["vfs.s3.proxy_username"] = "";
all_param_values["vfs.s3.verify_ssl"] = "true";
all_param_values["vfs.hdfs.username"] = "stavros";
Expand Down Expand Up @@ -547,7 +547,7 @@ TEST_CASE("C API: Test config iter", "[capi], [config]") {
vfs_param_values["s3.proxy_host"] = "";
vfs_param_values["s3.proxy_password"] = "";
vfs_param_values["s3.proxy_port"] = "0";
vfs_param_values["s3.proxy_scheme"] = "https";
vfs_param_values["s3.proxy_scheme"] = "http";
vfs_param_values["s3.proxy_username"] = "";
vfs_param_values["s3.verify_ssl"] = "true";
vfs_param_values["hdfs.username"] = "stavros";
Expand Down Expand Up @@ -593,7 +593,7 @@ TEST_CASE("C API: Test config iter", "[capi], [config]") {
s3_param_values["proxy_host"] = "";
s3_param_values["proxy_password"] = "";
s3_param_values["proxy_port"] = "0";
s3_param_values["proxy_scheme"] = "https";
s3_param_values["proxy_scheme"] = "http";
s3_param_values["proxy_username"] = "";
s3_param_values["verify_ssl"] = "true";

Expand Down
2 changes: 1 addition & 1 deletion tiledb/sm/c_api/tiledb.h
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ TILEDB_EXPORT void tiledb_config_free(tiledb_config_t** config);
* **Default**: 0
* - `vfs.s3.proxy_scheme` <br>
* The S3 proxy scheme. <br>
* **Default**: "https"
* **Default**: "http"
* - `vfs.s3.proxy_username` <br>
* The S3 proxy username. Note: this parameter is not serialized by
* `tiledb_config_save_to_file`. <br>
Expand Down
2 changes: 1 addition & 1 deletion tiledb/sm/config/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const std::string Config::VFS_S3_CONNECT_TIMEOUT_MS = "3000";
const std::string Config::VFS_S3_CONNECT_MAX_TRIES = "5";
const std::string Config::VFS_S3_CONNECT_SCALE_FACTOR = "25";
const std::string Config::VFS_S3_REQUEST_TIMEOUT_MS = "3000";
const std::string Config::VFS_S3_PROXY_SCHEME = "https";
const std::string Config::VFS_S3_PROXY_SCHEME = "http";
const std::string Config::VFS_S3_PROXY_HOST = "";
const std::string Config::VFS_S3_PROXY_PORT = "0";
const std::string Config::VFS_S3_PROXY_USERNAME = "";
Expand Down
2 changes: 1 addition & 1 deletion tiledb/sm/cpp_api/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ class Config {
* **Default**: 0
* - `vfs.s3.proxy_scheme` <br>
* The proxy scheme. <br>
* **Default**: "https"
* **Default**: "http"
* - `vfs.s3.proxy_username` <br>
* The proxy username. Note: this parameter is not serialized by
* `tiledb_config_save_to_file`. <br>
Expand Down
6 changes: 3 additions & 3 deletions tiledb/sm/filesystem/s3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ Status S3::init(const Config& config, ThreadPool* const thread_pool) {
if (!proxy_host.empty()) {
client_config.proxyHost = proxy_host.c_str();
client_config.proxyPort = proxy_port;
client_config.proxyScheme = proxy_scheme == "http" ?
Aws::Http::Scheme::HTTP :
Aws::Http::Scheme::HTTPS;
client_config.proxyScheme = proxy_scheme == "https" ?
Aws::Http::Scheme::HTTPS :
Aws::Http::Scheme::HTTP;
client_config.proxyUserName = proxy_username.c_str();
client_config.proxyPassword = proxy_password.c_str();
}
Expand Down

0 comments on commit d34929a

Please sign in to comment.