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

aws: Add an option to enforce FIPS endpoints #8075

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

Smjert
Copy link
Member

@Smjert Smjert commented Jul 7, 2023

Add the "aws_enforce_fips" to force that all current services using AWS (Kinesis, Firehose, EC2, STS),
must use FIPS endpoints, or fail to.

@Smjert Smjert added the AWS Related to Amazon Web Services tables label Jul 7, 2023
Add the "aws_enforce_fips" to force that all current services
using AWS (Kinesis, Firehose, EC2, STS), must use FIPS endpoints,
or fail to.
@Smjert Smjert force-pushed the stefano/feature/aws-fips-option branch from 46ffb6a to 97df6c6 Compare July 10, 2023 17:26
@Smjert Smjert marked this pull request as ready for review July 10, 2023 17:26
@Smjert Smjert requested review from a team as code owners July 10, 2023 17:27
@@ -134,6 +139,13 @@ static const std::set<std::string> kAwsRegions = {
"us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1",
"us-west-2"};

static const std::set<std::string> kAwsFipsRegions = {"us-east-1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way we can do this without needing to hardcode the list of FIPS regions? (Because I'm sure they'll change over time)

Copy link
Member Author

@Smjert Smjert Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I know of. For context, in theory the AWS SDK should provide this functionality, if anything the conversion to the correct endpoint, but this is not actually working.

Comment on lines +715 to +717
config.endpointOverride =
service + "-fips." + config.region + ".amazonaws.com";
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is based on https://aws.amazon.com/compliance/fips/

Can we do this without the region checks? Or is that going to be a recipe for trouble?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean without the region checks?

If you mean not checking that it's a valid region to enable FIPS in, I don't think it's ideal to have osquery attempt to connect to some bogus url, even if the domain is from Amazon, it would raise red flags.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like a lot of not great options.

Either we guess URLs and then attempt to use them. Or we hardcode regions.

I think that of those two choices, hardcoding feels better. I doubt those regions will change quickly.

directionless
directionless previously approved these changes Jul 19, 2023
Copy link
Member

@directionless directionless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love it, but it feels like maybe the best we can do with the AWS sdk today.

@Smjert
Copy link
Member Author

Smjert commented Jul 20, 2023

@directionless thanks for the review, I've done a small update to link where the regions were taken from and to do a minor fix on the match of us-gov since it was scanning the whole string.

@Smjert Smjert merged commit b87a4b5 into osquery:master Jul 31, 2023
16 checks passed
@Smjert Smjert deleted the stefano/feature/aws-fips-option branch July 31, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AWS Related to Amazon Web Services tables
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants