Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[breaking] FIPS compliant metrics + secrets management #649

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

Merged
merged 6 commits into from
May 9, 2025

Conversation

nhulston
Copy link
Contributor

@nhulston nhulston commented May 8, 2025

What does this PR do?

  • Determine FIPS mode based on region + DD_LAMBDA_FIPS_MODE env var. By default, govcloud regions are FIPS enabled, and commercial regions are FIPS disabled. However, this default can be overridden by setting DD_LAMBDA_FIPS_MODE to true or `false
  • Update our KMS service (for secrets management) to use FIPS endpoints if fips mode is enabled
  • Currently, we send metrics in 3 possible ways: (1) dogstatsd if the extension is installed, (2) through log forwarding if enabled and extension is not installed, or (3) directly via the DD API
  • dogstatsd and log forwarding are FIPS compliant, but the DD API is not. Therefore, if the user has FIPS mode enabled but tries to use the DD API, we skip sending the metric and log a debug message explaining why
  • We can use timestamps with dogstatsd now after Implement dogstatsd, add timestamp support, fix flushing #648

Motivation

FIPS compliance
https://datadoghq.atlassian.net/browse/SVLS-6295

Testing Guidelines

Manually - the fips enabled follows expected behavior based on region + env var

Unit tests

Additional Notes

Breaking because customers with FIPS enabled and no extension/forwarder will no longer be able to send metrics.

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@nhulston nhulston changed the title [draft] Nicholas.hulston/fips metrics [draft] [breaking] Nicholas.hulston/fips metrics May 8, 2025
@nhulston nhulston changed the title [draft] [breaking] Nicholas.hulston/fips metrics [breaking] FIPS compliant metrics + secrets management May 9, 2025
@nhulston nhulston marked this pull request as ready for review May 9, 2025 13:38
@nhulston nhulston requested a review from a team as a code owner May 9, 2025 13:38
@@ -123,41 +123,11 @@ describe("MetricsListener", () => {
await expect(listener.onCompleteInvocation()).resolves.toEqual(undefined);
});

it("configures FIPS endpoint for GovCloud regions", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we keep a version of this test like configures FIPS endpoint for FIPS_MODE_ENABLED?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved those tests to fips.spec.ts; since we're moving the FIPS enabled/disabled logic to there, this was a little redundant

Copy link
Contributor

@apiarian-datadog apiarian-datadog left a comment

Choose a reason for hiding this comment

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

looking good. added a note about a deleted test but fine otherwise. we'll add statsd timestamp support separately?

@nhulston
Copy link
Contributor Author

nhulston commented May 9, 2025

looking good. added a note about a deleted test but fine otherwise. we'll add statsd timestamp support separately?

Thanks! Yes, I added timestamp support in #648

@nhulston nhulston merged commit dab10b2 into main May 9, 2025
25 checks passed
@nhulston nhulston deleted the nicholas.hulston/fips-metrics branch May 9, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants