Skip to content

Commit

Permalink
review: Validate region for Kinesis or Firehose if no endpoint override
Browse files Browse the repository at this point in the history
  • Loading branch information
Smjert committed Nov 22, 2023
1 parent 83b2f11 commit bdeeca4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion osquery/utils/aws/aws_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
#include <osquery/logger/data_logger.h>
#include <osquery/logger/logger.h>
#include <osquery/utils/aws/aws_util.h>
#include <osquery/utils/expected/expected.h>
#include <osquery/utils/json/json.h>
#include <osquery/utils/system/time.h>
#include <osquery/utils/expected/expected.h>

namespace pt = boost::property_tree;

Expand Down
3 changes: 2 additions & 1 deletion plugins/logger/aws_firehose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ FLAG(string,
Status FirehoseLoggerPlugin::setUp() {
initAwsSdk();

auto aws_region_res = AWSRegion::make(FLAGS_aws_firehose_region);
auto aws_region_res = AWSRegion::make(FLAGS_aws_firehose_region,
FLAGS_aws_firehose_endpoint.empty());

if (aws_region_res.isError()) {
return Status::failure(aws_region_res.getError().getMessage());
Expand Down
3 changes: 2 additions & 1 deletion plugins/logger/aws_kinesis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ FLAG(string,
Status KinesisLoggerPlugin::setUp() {
initAwsSdk();

auto aws_region_res = AWSRegion::make(FLAGS_aws_kinesis_region);
auto aws_region_res = AWSRegion::make(FLAGS_aws_kinesis_region,
FLAGS_aws_kinesis_endpoint.empty());

if (aws_region_res.isError()) {
return Status::failure(aws_region_res.getError().getMessage());
Expand Down

0 comments on commit bdeeca4

Please sign in to comment.