Skip to content

Commit 37637a1

Browse files
chore: use the newly renamed datadog-fips package and add a clippy rule for reqwest::Client::builder
1 parent e930cdc commit 37637a1

File tree

8 files changed

+26
-23
lines changed

8 files changed

+26
-23
lines changed

bottlecap/Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bottlecap/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog",
1717
datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" }
1818
dogstatsd = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false }
1919
datadog-trace-agent = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection" }
20-
datadog-serverless-fips = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false }
20+
datadog-fips = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false }
2121
figment = { version = "0.10", default-features = false, features = ["yaml", "env"] }
2222
hyper = { version = "1.6", default-features = false, features = ["server"] }
2323
hyper-util = { version = "0.1.10", features = [
@@ -81,12 +81,12 @@ inherits = "release"
8181
opt-level = 3
8282

8383
[features]
84-
default = ["reqwest/rustls-tls", "dogstatsd/default", "datadog-serverless-fips/default" ]
84+
default = ["reqwest/rustls-tls", "dogstatsd/default", "datadog-fips/default" ]
8585
fips = [
8686
"ddcommon/fips",
8787
"datadog-trace-utils/fips",
8888
"dogstatsd/fips",
89-
"datadog-serverless-fips/fips",
89+
"datadog-fips/fips",
9090
"reqwest/rustls-tls-native-roots-no-provider",
9191
"rustls/fips",
9292
"rustls-native-certs",

bottlecap/clippy.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
disallowed-methods = [
2+
{ path = "reqwest::Client::builder", reason = "prefer the FIPS-compatible adapter", replacement = "datadog_fips::reqwest_adapter::create_reqwest_client_builder" },
3+
]

bottlecap/src/bin/bottlecap/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use bottlecap::{
4848
EXTENSION_ID_HEADER, EXTENSION_NAME, EXTENSION_NAME_HEADER, EXTENSION_ROUTE,
4949
LAMBDA_RUNTIME_SLUG, TELEMETRY_PORT,
5050
};
51-
use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder;
51+
use datadog_fips::reqwest_adapter::create_reqwest_client_builder;
5252
use datadog_trace_obfuscation::obfuscation_config;
5353
use datadog_trace_utils::send_data::SendData;
5454
use decrypt::resolve_secrets;

bottlecap/src/fips/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This module contains all of the things we do a little bit differently when we compile for FIPS
2-
// mode. This is used in conjunction with the datadog-serverless-fips crate to ensure that when we
2+
// mode. This is used in conjunction with the datadog-fips crate to ensure that when we
33
// compile the extension in FIPS mode, everything is built and configured correctly.
44

55
#[cfg(feature = "fips")]

bottlecap/src/http_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::config;
22
use core::time::Duration;
3-
use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder;
3+
use datadog_fips::reqwest_adapter::create_reqwest_client_builder;
44
use std::error::Error;
55
use std::sync::Arc;
66
use tracing::error;

bottlecap/src/secrets/decrypt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::config::{aws::AwsConfig, Config};
22
use crate::fips::compute_aws_api_host;
33
use base64::prelude::*;
44
use chrono::{DateTime, Utc};
5-
use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder;
5+
use datadog_fips::reqwest_adapter::create_reqwest_client_builder;
66
use hmac::{Hmac, Mac};
77
use reqwest::header::{HeaderMap, HeaderValue};
88
use reqwest::Client;

bottlecap/src/telemetry/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder;
1+
use datadog_fips::reqwest_adapter::create_reqwest_client_builder;
22
use reqwest::Response;
33
use serde_json;
44
use std::error::Error;

0 commit comments

Comments
 (0)