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

Add Firehose/Kinesis support to Windows #3641

Merged
merged 4 commits into from Sep 3, 2017
Merged

Conversation

@alessandrogario
Copy link
Contributor

@alessandrogario alessandrogario commented Sep 3, 2017

List of changes

  • Updated the PowerShell script that generates the aws-sdk-cpp nupkg file to support the latest version (1.1.44).
  • Disabled support for AWS credential profiles when running under Windows.
  • A couple of small fixes to the tests for the AWS utilities.

Notes

The Aws::Auth::InstanceProfileCredentialsProvider causes a crash when enabled on Windows. I have disabled it for now, and would like to have some feedback.

…etails).

The Aws::Auth::InstanceProfileCredentialsProvider provider causes
a crash when used. I have decided to disable it when compiling on
Windows.
Copy link
Contributor

@muffins muffins left a comment

A couple of smaller nits, then I think we're good to fold this in, thanks!

@@ -29,6 +29,22 @@ static const char* kAwsProfileFileEnvVar = "AWS_SHARED_CREDENTIALS_FILE";
static const char* kAwsAccessKeyEnvVar = "AWS_ACCESS_KEY_ID";
static const char* kAwsSecretKeyEnvVar = "AWS_SECRET_ACCESS_KEY";

void SetEnvVar(const std::string& name, const std::string& value) {

This comment has been minimized.

@muffins

muffins Sep 3, 2017
Contributor

Is it possibly to use the abstractions we already have over set/unset env vars? https://github.com/facebook/osquery/blob/f9cb7149a9ac53c4aa563886d3bd37955876753f/osquery/core/process.h#L224

@@ -64,6 +80,9 @@ TEST_F(AwsUtilTests, test_get_credentials) {
ASSERT_EQ("FLAG_ACCESS_KEY_ID", credentials.GetAWSAccessKeyId());
ASSERT_EQ("flag_secret_key", credentials.GetAWSSecretKey());

// Profiles are not working on Windows; see the constructor of
// OsqueryAWSCredentialsProviderChain for more information
#if !defined(WINDOWS)

This comment has been minimized.

@muffins

muffins Sep 3, 2017
Contributor

If these aren't failing to compile, would you mind prefering the use of if (isPlatform(PlatformType::TYPE_WINDOWS)) { instead of preprocessor #defines?

$version = '1.0.107'
$chocoVersion = '1.0.107-r1'
$version = '1.1.44'
$chocoVersion = '1.1.44-r1'

This comment has been minimized.

@muffins

muffins Sep 3, 2017
Contributor

If this is the first time we've seen this version, the -r1 isn't required and we can do whole version releases, mind removing this?

$packageName = 'aws-sdk-cpp'
$projectSource = 'https://github.com/aws/aws-sdk-cpp'
$packageSourceUrl = 'https://github.com/apache/thrift'
$packageSourceUrl = 'https://github.com/aws/aws-sdk-cpp/archive/$version.zip'

This comment has been minimized.

@muffins

muffins Sep 3, 2017
Contributor

Thank you :)

Changes in the test module:

 o Use the setEnvVar/unsetEnvVar wrappers.
 o Do not use the preprocessor to disable test parts that
   are not compatible with Windows.
 o Fix the nupkg package version (remove the '-r1' suffix).
@facebook-github-bot
Copy link

@facebook-github-bot facebook-github-bot commented Sep 3, 2017

@alessandrogario updated the pull request - view changes

@muffins
muffins approved these changes Sep 3, 2017
@muffins muffins merged commit 6489c8b into osquery:master Sep 3, 2017
@alessandrogario alessandrogario deleted the alessandro/bugfix/aws-windows-support branch Nov 24, 2017
trizt added a commit to trizt/osquery that referenced this pull request May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.