Skip to content

Commit

Permalink
hopefully final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
justing-bq committed Apr 1, 2023
1 parent a8fcd8d commit d4d19c1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions driver/iam_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,10 @@ bool IAM_PROXY::connect(const char* host, const char* user, const char* password
}
else {
// Go with default region if region is not provided.
region = "us-east-1";
region = Aws::Region::US_EAST_1;
}

if (ds->auth_port > 0) {
port = ds->auth_port;
}

std::string auth_token = this->get_auth_token(auth_host, region, port, user, ds->auth_expiration);
std::string auth_token = this->get_auth_token(auth_host, region, ds->auth_port, user, ds->auth_expiration);

bool connect_result = next_proxy->connect(host, user, auth_token.c_str(), database, port, socket, flags);
if (!connect_result) {
Expand Down
2 changes: 1 addition & 1 deletion integration/base_failover_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class BaseFailoverIntegrationTest : public testing::Test {
const std::string ERROR_CONN_FAILURE_DURING_TX = "08007";

// Helper functions

std::string get_endpoint(const std::string& instance_id) const {
return instance_id + DB_CONN_STR_SUFFIX;
}
Expand Down
2 changes: 1 addition & 1 deletion integration/iam_authentication_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class IamAuthenticationIntegrationTest : public testing::Test {
.withEnableClusterFailover(false) // Failover interferes with some of our tests
.withAuthMode("IAM")
.withAuthRegion("us-east-2")
.withAuthExpiration(100);
.withAuthExpiration(900);
}

void TearDown() override {
Expand Down
4 changes: 2 additions & 2 deletions util/installer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -749,8 +749,8 @@ DataSource *ds_new()
ds->port = 3306;
ds->has_port = false;
ds->no_schema = 1;
ds->auth_port = 0;
ds->auth_expiration = 0;
ds->auth_port = 3306;
ds->auth_expiration = 900; // 15 minutes
ds->enable_cluster_failover = true;
ds->allow_reader_connections = false;
ds->gather_perf_metrics = false;
Expand Down

0 comments on commit d4d19c1

Please sign in to comment.