Skip to content

Commit d7194ea

Browse files
committed
build(deps): replace ring with aws-lc-rs
The ring crate is deprecated and unmaintained. AWS-LC-RS provides equivalent functionality with active support and FIPS compliance. Signed-off-by: Maher Homsi <[email protected]>
1 parent 874e4ea commit d7194ea

File tree

6 files changed

+49
-7
lines changed

6 files changed

+49
-7
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ argh = "0.1"
1717
async-trait = "0.1"
1818
awc = "3"
1919
aws-config = { version = "1", default-features = false, features = ["credentials-process", "default-https-client", "rt-tokio"] }
20+
aws-lc-rs = { version = "1", features = ["bindgen"] }
2021
aws-sdk-ec2 = { version = "1", default-features = false, features = ["behavior-version-latest", "default-https-client", "rt-tokio"] }
2122
aws-sdk-eks = { version = "1", default-features = false, features = ["behavior-version-latest", "default-https-client", "rt-tokio"] }
2223
aws-sdk-iam = { version = "1", default-features = false, features = ["behavior-version-latest", "default-https-client", "rt-tokio"] }
@@ -55,7 +56,7 @@ kube = { version = "0.88", default-features = false, features = [ "derive", "run
5556

5657
regex = "1"
5758
reqwest = { version = "0.12", default-features = false, features = [ "json", "rustls-tls" ] }
58-
rustls = { version = "0.23", default-features = false, features = ["ring", "logging", "std", "tls12"] }
59+
rustls = { version = "0.23", default-features = false, features = ["aws_lc_rs", "logging", "std", "tls12"] }
5960
rustls-pemfile = { version = "2" }
6061
schemars = "0.8"
6162
semver = "1"

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ ADD ./ /src/
1313
# Ensure cargo dependencies are fetched and available in the Docker context
1414
RUN cargo fetch --locked --manifest-path /src/Cargo.toml
1515

16+
# Set bindgen clang arguments for cross-compilation targeting Bottlerocket's musl environment
17+
ENV BINDGEN_EXTRA_CLANG_ARGS="--target=${UNAME_ARCH}-bottlerocket-linux-musl --sysroot=/${UNAME_ARCH}-bottlerocket-linux-musl/sys-root"
18+
1619
# Builds brupop binaries
1720
RUN cargo install --offline --locked --target ${UNAME_ARCH}-bottlerocket-linux-musl --path /src/agent --root /src/agent && \
1821
cargo install --offline --locked --target ${UNAME_ARCH}-bottlerocket-linux-musl --path /src/apiserver --root /src/apiserver && \

clarify.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ license-files = [
1313
{ path = "LICENSE", hash = 0xcdf3ae00 },
1414
]
1515

16+
[clarify.aws-lc-fips-sys]
17+
expression = "ISC AND (Apache-2.0 OR ISC) AND OpenSSL AND MIT"
18+
license-files = [
19+
{ path = "LICENSE", hash = 0xf308ccd7 },
20+
{ path = "aws-lc/LICENSE", hash = 0xb6d14686 },
21+
{ path = "aws-lc/third_party/fiat/LICENSE", hash = 0x75829ee2 },
22+
]
23+
24+
[clarify.aws-lc-rs]
25+
expression = "ISC AND (Apache-2.0 OR ISC) AND MIT"
26+
license-files = [
27+
{ path = "LICENSE", hash = 0x8f713da7 },
28+
]
29+
1630
[clarify.aws-lc-sys]
1731
expression = "ISC AND (Apache-2.0 OR ISC) AND OpenSSL AND MIT"
1832
license-files = [

models/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ workspace = true
1010

1111
[dependencies]
1212
async-trait = { workspace = true }
13+
aws-lc-rs = { workspace = true }
1314
chrono = { workspace = true }
1415
futures = { workspace = true }
1516

models/src/crypto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustls::crypto::CryptoProvider;
1010
use snafu::Snafu;
1111

1212
pub fn install_default_crypto_provider() -> Result<(), CryptoConfigError> {
13-
CryptoProvider::install_default(rustls::crypto::ring::default_provider())
13+
CryptoProvider::install_default(rustls::crypto::aws_lc_rs::default_provider())
1414
.map_err(|_| CryptoConfigError)
1515
}
1616

0 commit comments

Comments
 (0)