From 0694161af93ad320307737e92da02bcebdc7d9b9 Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Tue, 8 Apr 2025 13:59:48 -0400 Subject: [PATCH 01/12] feat: [SVLS-6242] fips bottlecap build --- .github/workflows/rs_ci.yml | 5 +- .gitlab/scripts/compile_bottlecap.sh | 1 + .gitlab/templates/pipeline.yaml.tpl | 10 +- bottlecap-run/runBottlecap.sh | 46 +- bottlecap/Cargo.lock | 99 +++-- bottlecap/Cargo.toml | 36 +- bottlecap/LICENSE-3rdparty.yml | 479 ++++++++++----------- bottlecap/build.rs | 109 +++++ bottlecap/src/bin/bottlecap/main.rs | 56 ++- bottlecap/src/config/mod.rs | 103 ++--- bottlecap/src/http_client.rs | 1 + bottlecap/src/otlp/agent.rs | 6 +- bottlecap/src/secrets/decrypt.rs | 12 +- bottlecap/src/telemetry/client.rs | 1 + bottlecap/src/traces/stats_processor.rs | 2 +- bottlecap/src/traces/trace_agent.rs | 6 +- bottlecap/src/traces/trace_processor.rs | 11 +- images/Dockerfile.bottlecap.alpine.compile | 20 +- images/Dockerfile.bottlecap.compile | 15 +- 19 files changed, 624 insertions(+), 394 deletions(-) create mode 100644 bottlecap/build.rs diff --git a/.github/workflows/rs_ci.yml b/.github/workflows/rs_ci.yml index 12b0a990e..893222130 100644 --- a/.github/workflows/rs_ci.yml +++ b/.github/workflows/rs_ci.yml @@ -76,8 +76,11 @@ jobs: components: clippy cache: false - uses: mozilla-actions/sccache-action@v0.0.9 + # We need to do these separately because the fips feature is incompatible with the default feature. - working-directory: bottlecap - run: cargo clippy --workspace --all-features + run: cargo clippy --workspace --features default + - working-directory: bottlecap + run: cargo clippy --workspace --no-default-features --features fips build-all: name: Build All diff --git a/.gitlab/scripts/compile_bottlecap.sh b/.gitlab/scripts/compile_bottlecap.sh index ca53d3295..c14fc6eb4 100755 --- a/.gitlab/scripts/compile_bottlecap.sh +++ b/.gitlab/scripts/compile_bottlecap.sh @@ -62,6 +62,7 @@ docker_build() { fi docker buildx build --platform linux/${arch} \ + --progress plain \ -t datadog/compile-bottlecap \ -f ./images/${file} \ --build-arg PLATFORM=$PLATFORM \ diff --git a/.gitlab/templates/pipeline.yaml.tpl b/.gitlab/templates/pipeline.yaml.tpl index 3d5f01270..4ee0b4d49 100644 --- a/.gitlab/templates/pipeline.yaml.tpl +++ b/.gitlab/templates/pipeline.yaml.tpl @@ -22,7 +22,7 @@ cargo fmt: image: ${CI_DOCKER_TARGET_IMAGE}:${CI_DOCKER_TARGET_VERSION} needs: [] script: - - cd bottlecap && cargo fmt + - cd bottlecap && cargo fmt --all -- --check cargo check: stage: test @@ -30,7 +30,7 @@ cargo check: image: ${CI_DOCKER_TARGET_IMAGE}:${CI_DOCKER_TARGET_VERSION} needs: [] script: - - cd bottlecap && cargo check + - cd bottlecap && cargo check --workspace cargo clippy: stage: test @@ -38,7 +38,11 @@ cargo clippy: image: ${CI_DOCKER_TARGET_IMAGE}:${CI_DOCKER_TARGET_VERSION} needs: [] script: - - cd bottlecap && cargo clippy --all-features + - apt-get update && apt-get install -y --fix-missing --no-install-recommends golang-go + - cd bottlecap + # We need to do these separately because the fips feature is incompatible with the default feature. + - cargo clippy --workspace --features default + - cargo clippy --workspace --no-default-features --features fips {{ range $flavor := (ds "flavors").flavors }} diff --git a/bottlecap-run/runBottlecap.sh b/bottlecap-run/runBottlecap.sh index 5fe0fd219..e8335d3cf 100755 --- a/bottlecap-run/runBottlecap.sh +++ b/bottlecap-run/runBottlecap.sh @@ -1,23 +1,47 @@ #!/bin/bash -set -e -arch=$(uname -a) -cd ../bottlecap -# build bottlecap in debug mode -if (echo $arch | grep -q "Darwin"); then - PATH=/usr/bin:$PATH cargo zigbuild --target=aarch64-unknown-linux-gnu - build_path=../bottlecap/target/aarch64-unknown-linux-gnu/debug/bottlecap +set -ex + +# Setup cleanup trap to ensure docker container is stopped and removed even if script is interrupted +cleanup() { + if [ -n "${docker_name}" ]; then + echo "Cleaning up Docker container..." + docker stop "${docker_name}" 2>/dev/null || true + docker rm "${docker_name}" 2>/dev/null || true + fi +} + +# Register trap for EXIT, INT (Ctrl+C), TERM, and ERR +trap cleanup EXIT INT TERM ERR + +if [ -z "$PREBUILT_BUILD_PATH" ]; then + cd ../bottlecap + arch=$(uname -a) + # build bottlecap in debug mode + if (echo $arch | grep -q "Darwin"); then + PATH=/usr/bin:$PATH cargo zigbuild --target=aarch64-unknown-linux-gnu + build_path=../bottlecap/target/aarch64-unknown-linux-gnu/debug/bottlecap + else + cargo build + build_path=../bottlecap/target/debug/bottlecap + fi + cd - + else - cargo build - build_path=../bottlecap/target/debug/bottlecap + echo "using a prebuilt bottlecap from $PREBUILT_BUILD_PATH" + build_path="$PREBUILT_BUILD_PATH" fi -cd - # run a hello world function in Lambda RIE (https://github.com/aws/aws-lambda-runtime-interface-emulator) # the lambda_extension binary is copied to /opt/extensions docker_name=$(docker create \ --publish 9000:8080 \ -e DD_API_KEY=XXX \ + -e DD_SERVERLESS_FLUSH_STRATEGY='periodically,1' \ + -e DD_LOG_LEVEL=debug \ + -e RUST_BACKTRACE=full \ + -e DD_ENV=dev \ + -e DD_VERSION=1 \ "public.ecr.aws/lambda/nodejs:20" "index.handler") echo -e 'export const handler = async () => {\n\tconsole.log("Hello world!");\n};' > /tmp/index.mjs docker cp "/tmp/index.mjs" "${docker_name}:/var/task/index.mjs" @@ -26,5 +50,3 @@ docker exec "${docker_name}" mkdir -p /opt/extensions docker cp "${build_path}" "${docker_name}:/opt/extensions/datadog-agent" curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}' docker logs "${docker_name}" -docker stop "${docker_name}" -docker rm "${docker_name}" diff --git a/bottlecap/Cargo.lock b/bottlecap/Cargo.lock index 2fa4a1581..d0c55173e 100644 --- a/bottlecap/Cargo.lock +++ b/bottlecap/Cargo.lock @@ -266,12 +266,27 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "aws-lc-fips-sys" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d9c2e952a1f57e8cbc78b058a968639e70c4ce8b9c0a5e6363d4e5670eed795" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", + "regex", +] + [[package]] name = "aws-lc-rs" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b756939cb2f8dc900aa6dcd505e6e2428e9cae7ff7b028c49e3946efa70878" dependencies = [ + "aws-lc-fips-sys", "aws-lc-sys", "zeroize", ] @@ -423,7 +438,6 @@ dependencies = [ "bytes 1.10.1", "chrono", "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/)", - "datadog-trace-mini-agent", "datadog-trace-normalization", "datadog-trace-obfuscation", "datadog-trace-protobuf", @@ -442,7 +456,7 @@ dependencies = [ "hyper-util", "lazy_static", "log", - "nix", + "nix 0.26.4", "opentelemetry-proto", "opentelemetry-semantic-conventions", "proptest", @@ -461,6 +475,7 @@ dependencies = [ "thiserror 1.0.69", "tokio", "tokio-util", + "trace-agent", "tracing", "tracing-core", "tracing-subscriber", @@ -674,32 +689,10 @@ dependencies = [ "tonic-build", ] -[[package]] -name = "datadog-trace-mini-agent" -version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=a0b92b643dff8bc28d87c974eddf7189c238eaa5#a0b92b643dff8bc28d87c974eddf7189c238eaa5" -dependencies = [ - "anyhow", - "async-trait", - "datadog-trace-normalization", - "datadog-trace-obfuscation", - "datadog-trace-protobuf", - "datadog-trace-utils", - "ddcommon", - "http-body-util", - "hyper 1.6.0", - "hyper-util", - "serde", - "serde_json", - "tokio", - "tower 0.5.2", - "tracing", -] - [[package]] name = "datadog-trace-normalization" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=a0b92b643dff8bc28d87c974eddf7189c238eaa5#a0b92b643dff8bc28d87c974eddf7189c238eaa5" +source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -708,7 +701,7 @@ dependencies = [ [[package]] name = "datadog-trace-obfuscation" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=a0b92b643dff8bc28d87c974eddf7189c238eaa5#a0b92b643dff8bc28d87c974eddf7189c238eaa5" +source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -725,7 +718,7 @@ dependencies = [ [[package]] name = "datadog-trace-protobuf" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=a0b92b643dff8bc28d87c974eddf7189c238eaa5#a0b92b643dff8bc28d87c974eddf7189c238eaa5" +source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" dependencies = [ "prost 0.11.9", "serde", @@ -735,7 +728,7 @@ dependencies = [ [[package]] name = "datadog-trace-utils" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=a0b92b643dff8bc28d87c974eddf7189c238eaa5#a0b92b643dff8bc28d87c974eddf7189c238eaa5" +source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" dependencies = [ "anyhow", "bytes 1.10.1", @@ -763,7 +756,7 @@ dependencies = [ [[package]] name = "ddcommon" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=a0b92b643dff8bc28d87c974eddf7189c238eaa5#a0b92b643dff8bc28d87c974eddf7189c238eaa5" +source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" dependencies = [ "anyhow", "cc", @@ -781,6 +774,7 @@ dependencies = [ "libc", "log", "memfd", + "nix 0.29.0", "pin-project", "rand 0.8.5", "regex", @@ -885,13 +879,13 @@ dependencies = [ [[package]] name = "dogstatsd" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?rev=4dfe72ab1850680f41dd79d30a937eb68e7ba6da#4dfe72ab1850680f41dd79d30a937eb68e7ba6da" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-fips-builds#c17a011ed6a2dd9fa3d8f2489634fcee83809605" dependencies = [ "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", "ddsketch-agent 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", "derive_more", "fnv", - "hashbrown 0.14.5", + "hashbrown 0.15.2", "protobuf", "regex", "reqwest", @@ -1237,12 +1231,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - [[package]] name = "hashbrown" version = "0.15.2" @@ -1992,6 +1980,18 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.9.0", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -2693,6 +2693,7 @@ dependencies = [ "pin-project-lite", "quinn", "rustls", + "rustls-native-certs", "rustls-pemfile", "rustls-pki-types", "serde", @@ -3307,7 +3308,7 @@ dependencies = [ [[package]] name = "tinybytes" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=a0b92b643dff8bc28d87c974eddf7189c238eaa5#a0b92b643dff8bc28d87c974eddf7189c238eaa5" +source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" dependencies = [ "serde", ] @@ -3496,6 +3497,28 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" +[[package]] +name = "trace-agent" +version = "0.1.0" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-fips-builds#c17a011ed6a2dd9fa3d8f2489634fcee83809605" +dependencies = [ + "anyhow", + "async-trait", + "datadog-trace-normalization", + "datadog-trace-obfuscation", + "datadog-trace-protobuf", + "datadog-trace-utils", + "ddcommon", + "http-body-util", + "hyper 1.6.0", + "hyper-util", + "serde", + "serde_json", + "tokio", + "tower 0.5.2", + "tracing", +] + [[package]] name = "tracing" version = "0.1.41" diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index f23792346..cd669f2e5 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -10,13 +10,13 @@ bytes = { version = "1.2", default-features = false } chrono = { version = "0.4", features = ["serde", "std", "now"], default-features = false } datadog-protos = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki/" } ddsketch-agent = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki/" } -ddcommon = { git = "https://github.com/DataDog/libdatadog", rev = "a0b92b643dff8bc28d87c974eddf7189c238eaa5" } -datadog-trace-protobuf = { git = "https://github.com/DataDog/libdatadog", rev = "a0b92b643dff8bc28d87c974eddf7189c238eaa5" } -datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog", rev = "a0b92b643dff8bc28d87c974eddf7189c238eaa5", features = ["compression"] } -datadog-trace-mini-agent = { git = "https://github.com/DataDog/libdatadog", rev = "a0b92b643dff8bc28d87c974eddf7189c238eaa5" } -datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", rev = "a0b92b643dff8bc28d87c974eddf7189c238eaa5" } -datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "a0b92b643dff8bc28d87c974eddf7189c238eaa5" } -dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "4dfe72ab1850680f41dd79d30a937eb68e7ba6da" } +ddcommon = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap"} +datadog-trace-protobuf = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap" } +datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap", features = ["compression"] } +datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap"} +datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap" } +dogstatsd = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-fips-builds", default-features = false } +trace-agent = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-fips-builds" } figment = { version = "0.10", default-features = false, features = ["yaml", "env"] } hyper = { version = "1.6", default-features = false, features = ["server"] } hyper-util = { version = "0.1.10", features = [ @@ -31,7 +31,7 @@ log = { version = "0.4", default-features = false } nix = { version = "0.26", default-features = false, features = ["feature", "fs"] } protobuf = { version = "3.5", default-features = false } regex = { version = "1.10", default-features = false } -reqwest = { version = "0.12.11", features = ["json", "http2", "rustls-tls"], default-features = false } +reqwest = { version = "0.12.11", features = ["json", "http2"], default-features = false } serde = { version = "1.0", default-features = false, features = ["derive"] } serde_json = { version = "1.0", default-features = false, features = ["alloc"] } thiserror = { version = "1.0", default-features = false } @@ -60,6 +60,9 @@ proptest = "1.4" httpmock = "0.7" serial_test = "3.1" +[build-dependencies] +# No external dependencies needed for the build script + [[bin]] name = "bottlecap" @@ -68,3 +71,20 @@ opt-level = "z" # Optimize for size. lto = true codegen-units = 1 strip = true + +[profile.release-alpine-arm64-fips] +inherits = "release" +# Unfortunately opt-level "z" does not work for building aws-lc-fips-sys on +# Alpine for ARM with FIPS enabled. +opt-level = 3 + +[features] +default = ["reqwest/rustls-tls", "dogstatsd/default"] +fips = [ + "ddcommon/fips", + "datadog-trace-utils/fips", + "dogstatsd/fips", + "reqwest/rustls-tls-native-roots-no-provider", + "rustls/fips", +] +force_fallback = [] diff --git a/bottlecap/LICENSE-3rdparty.yml b/bottlecap/LICENSE-3rdparty.yml index 4cbf4f16b..574711595 100644 --- a/bottlecap/LICENSE-3rdparty.yml +++ b/bottlecap/LICENSE-3rdparty.yml @@ -4403,215 +4403,6 @@ third_party_libraries: Copyright 2024-present Datadog, Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -- package_name: datadog-trace-mini-agent - package_version: 17.0.0 - repository: '' - license: Apache-2.0 - licenses: - - license: Apache-2.0 - text: |2 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -7643,40 +7434,6 @@ third_party_libraries: DEALINGS IN THE SOFTWARE. - license: Apache-2.0 text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" -- package_name: hashbrown - package_version: 0.14.5 - repository: https://github.com/rust-lang/hashbrown - license: MIT OR Apache-2.0 - licenses: - - license: MIT - text: | - Copyright (c) 2016 Amanieu d'Antras - - Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the - Software without restriction, including without - limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of - the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice - shall be included in all copies or substantial portions - of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - license: Apache-2.0 - text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" - package_name: hashbrown package_version: 0.15.2 repository: https://github.com/rust-lang/hashbrown @@ -11627,6 +11384,34 @@ third_party_libraries: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +- package_name: nix + package_version: 0.29.0 + repository: https://github.com/nix-rust/nix + license: MIT + licenses: + - license: MIT + text: | + The MIT License (MIT) + + Copyright (c) 2015 Carl Lerche + nix-rust Authors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -22658,6 +22443,214 @@ third_party_libraries: OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- package_name: trace-agent + package_version: 0.1.0 + repository: '' + license: Apache-2.0 + licenses: + - license: Apache-2.0 + text: |2 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. - package_name: tracing package_version: 0.1.41 repository: https://github.com/tokio-rs/tracing diff --git a/bottlecap/build.rs b/bottlecap/build.rs new file mode 100644 index 000000000..c3390e4d7 --- /dev/null +++ b/bottlecap/build.rs @@ -0,0 +1,109 @@ +use std::process::Command; + +/// Checks if a specific dependency is present in the dependency tree when FIPS is enabled +fn check_forbidden_dependency(dependency_name: &str) -> Result<(), String> { + println!( + "cargo:warning=Checking for {} dependency...", + dependency_name + ); + + // First run cargo tree to get dependency with detailed info + let output = Command::new("cargo") + .args([ + "tree", + "-i", + dependency_name, + "--format={p} {f}", + "--prefix-depth", + "--features=fips", + "--no-default-features", + ]) + .output() + .map_err(|e| { + format!( + "Failed to execute cargo tree command for {}: {}", + dependency_name, e + ) + })?; + + // Also get the complete dependency path to help debugging + let path_output = Command::new("cargo") + .args([ + "tree", + "-i", + dependency_name, + "--features=fips", + "--no-default-features", + ]) + .output() + .map_err(|e| { + format!( + "Failed to execute detailed cargo tree command for {}: {}", + dependency_name, e + ) + })?; + + let output_str = String::from_utf8_lossy(&output.stdout); + let dependency_pattern = format!("{} v", dependency_name); + + // Check if the dependency is in the dependency tree + if output_str.contains(&dependency_pattern) { + // Get the dependency paths + let deps: Vec<&str> = output_str + .lines() + .filter(|line| line.contains(&dependency_pattern)) + .collect(); + + // Get the detailed dependency path + let path_str = String::from_utf8_lossy(&path_output.stdout); + + // Create detailed error message with dependency paths + let error_msg = format!( + "\n\nERROR: {} dependency detected with FIPS feature enabled!\n\ + FIPS compliance requires eliminating this dependency.\n\ + \n\ + {} dependency versions and features:\n{}\n\ + \n\ + Detailed dependency paths to {}:\n{}\n\ + \n\ + Ensure all dependencies use aws-lc-rs instead of non-FIPS compliant cryptographic libraries.\n\ + Consider updating the following in your Cargo.toml:\n\ + 1. Ensure all dependencies that use rustls have the 'aws-lc-rs' feature\n\ + 2. Check transitive dependencies in reqwest, hyper-rustls, etc.\n\ + 3. Update your dependencies to versions that support FIPS mode\n", + dependency_name, + dependency_name, + deps.join("\n"), + dependency_name, + path_str + ); + + Err(error_msg) + } else { + println!("cargo:warning=No {} dependency found. FIPS compliance check passed for this dependency!", dependency_name); + Ok(()) + } +} + +fn main() { + // Check if the "fips" feature is enabled + let fips_enabled = std::env::var("CARGO_FEATURE_FIPS").is_ok(); + + if fips_enabled { + println!("cargo:warning=FIPS feature is enabled, checking for forbidden dependencies..."); + + // List of dependencies that are not FIPS compliant + let forbidden_dependencies = vec!["ring", "openssl", "boringssl"]; + + // Check each forbidden dependency + for dependency in &forbidden_dependencies { + if let Err(error_msg) = check_forbidden_dependency(dependency) { + panic!("{}", error_msg); + } + } + + println!("cargo:warning=All dependency checks passed. No forbidden dependencies found!"); + } else { + println!("cargo:warning=FIPS feature is not enabled, skipping dependency checks."); + } +} diff --git a/bottlecap/src/bin/bottlecap/main.rs b/bottlecap/src/bin/bottlecap/main.rs index 8f8402ad5..c32722657 100644 --- a/bottlecap/src/bin/bottlecap/main.rs +++ b/bottlecap/src/bin/bottlecap/main.rs @@ -78,6 +78,42 @@ use tokio_util::sync::CancellationToken; use tracing::{debug, error}; use tracing_subscriber::EnvFilter; +#[cfg(all(feature = "default", feature = "fips"))] +compile_error!("When building in fips mode, the default feature must be disabled"); + +#[cfg(feature = "fips")] +fn log_fips_status() { + debug!("FIPS mode is enabled"); +} + +#[cfg(not(feature = "fips"))] +fn log_fips_status() { + debug!("FIPS mode is disabled"); +} + +/// Sets up the client provider for TLS operations. +/// In FIPS mode, this installs the AWS-LC crypto provider. +/// In non-FIPS mode, this is a no-op. +#[cfg(feature = "fips")] +fn prepare_client_provider() -> Result<()> { + rustls::crypto::default_fips_provider() + .install_default() + .map_err(|e| { + Error::new( + std::io::ErrorKind::InvalidData, + format!("Failed to set up fips provider: {e:?}"), + ) + }) +} + +#[cfg(not(feature = "fips"))] +// this is not unnecessary since the fips version can return an error +#[allow(clippy::unnecessary_wraps)] +fn prepare_client_provider() -> Result<()> { + // No-op in non-FIPS mode + Ok(()) +} + #[derive(Clone, Deserialize)] #[serde(rename_all = "camelCase")] struct RegisterResponse { @@ -189,14 +225,20 @@ async fn main() -> Result<()> { let (mut aws_config, config) = load_configs(start_time); enable_logging_subsystem(&config); + log_fips_status(); let version_without_next = EXTENSION_VERSION.split('-').next().unwrap_or("NA"); debug!("Starting Datadog Extension {version_without_next}"); - let client = Client::builder().no_proxy().build().map_err(|e| { - Error::new( - std::io::ErrorKind::InvalidData, - format!("Failed to create client: {e:?}"), - ) - })?; + prepare_client_provider()?; + let client = Client::builder() + .use_rustls_tls() + .no_proxy() + .build() + .map_err(|e| { + Error::new( + std::io::ErrorKind::InvalidData, + format!("Failed to create client: {e:?}"), + ) + })?; let r = register(&client) .await @@ -235,7 +277,7 @@ fn load_configs(start_time: Instant) -> (AwsConfig, Arc) { let aws_config = AwsConfig::from_env(start_time); let lambda_directory: String = env::var("LAMBDA_TASK_ROOT").unwrap_or_else(|_| "/var/task".to_string()); - let config = match config::get_config(Path::new(&lambda_directory), &aws_config.region) { + let config = match config::get_config(Path::new(&lambda_directory)) { Ok(config) => Arc::new(config), Err(_e) => { let err = Command::new("/opt/datadog-agent-go").exec(); diff --git a/bottlecap/src/config/mod.rs b/bottlecap/src/config/mod.rs index a51a202a3..95f4a1c18 100644 --- a/bottlecap/src/config/mod.rs +++ b/bottlecap/src/config/mod.rs @@ -34,7 +34,14 @@ fn log_fallback_reason(reason: &str) { println!("{{\"DD_EXTENSION_FALLBACK_REASON\":\"{reason}\"}}"); } -fn fallback(config: &EnvConfig, yaml_config: &YamlConfig, region: &str) -> Result<(), ConfigError> { +#[cfg(feature = "force_fallback")] +fn fallback(_: &EnvConfig, _: &YamlConfig) -> Result<(), ConfigError> { + log_fallback_reason("force_fallback"); + Err(ConfigError::UnsupportedField("force_fallback".to_string())) +} + +#[cfg(not(feature = "force_fallback"))] +fn fallback(config: &EnvConfig, yaml_config: &YamlConfig) -> Result<(), ConfigError> { // Customer explicitly opted out of the Next Gen extension let opted_out = match config.extension_version.as_deref() { Some("compatibility") => true, @@ -97,17 +104,11 @@ fn fallback(config: &EnvConfig, yaml_config: &YamlConfig, region: &str) -> Resul return Err(ConfigError::UnsupportedField("otel".to_string())); } - // Govcloud Regions - if region.starts_with("us-gov-") { - log_fallback_reason("gov_region"); - return Err(ConfigError::UnsupportedField("gov_region".to_string())); - } - Ok(()) } #[allow(clippy::module_name_repetitions)] -pub fn get_config(config_directory: &Path, region: &str) -> Result { +pub fn get_config(config_directory: &Path) -> Result { let path = config_directory.join("datadog.yaml"); // Get default config fields (and ENV specific ones) @@ -129,7 +130,7 @@ pub fn get_config(config_directory: &Path, region: &str) -> Result) -> reqwest::Client { fn build_client(config: Arc) -> Result { let client = reqwest::Client::builder() + .use_rustls_tls() .timeout(Duration::from_secs(config.flush_timeout)) // Temporarily not force http2 // Enable HTTP/2 for better multiplexing diff --git a/bottlecap/src/otlp/agent.rs b/bottlecap/src/otlp/agent.rs index 969db24ee..ee83fba43 100644 --- a/bottlecap/src/otlp/agent.rs +++ b/bottlecap/src/otlp/agent.rs @@ -1,6 +1,3 @@ -use datadog_trace_mini_agent::http_utils::{ - log_and_create_http_response, log_and_create_traces_success_http_response, -}; use datadog_trace_utils::send_data::SendData; use datadog_trace_utils::trace_utils::TracerHeaderTags as DatadogTracerHeaderTags; use ddcommon::hyper_migration; @@ -10,6 +7,9 @@ use std::io; use std::net::SocketAddr; use std::sync::Arc; use tokio::sync::mpsc::Sender; +use trace_agent::http_utils::{ + log_and_create_http_response, log_and_create_traces_success_http_response, +}; use tracing::{debug, error}; use crate::{ diff --git a/bottlecap/src/secrets/decrypt.rs b/bottlecap/src/secrets/decrypt.rs index 349d5482d..3ff0c240d 100644 --- a/bottlecap/src/secrets/decrypt.rs +++ b/bottlecap/src/secrets/decrypt.rs @@ -217,6 +217,16 @@ async fn request( Ok(v) } +#[cfg(not(feature = "fips"))] +fn compute_host(service: &String, region: &String, domain: &str) -> String { + format!("{service}.{region}.{domain}") +} + +#[cfg(feature = "fips")] +fn compute_host(service: &String, region: &String, domain: &str) -> String { + format!("{service}-fips.{region}.{domain}") +} + fn build_get_secret_signed_headers( aws_config: &AwsConfig, region: String, @@ -231,7 +241,7 @@ fn build_get_secret_signed_headers( "amazonaws.com" }; - let host = format!("{}.{}.{}", header_values.service, region, domain); + let host = compute_host(&header_values.service, ®ion, domain); let canonical_uri = "/"; let canonical_querystring = ""; diff --git a/bottlecap/src/telemetry/client.rs b/bottlecap/src/telemetry/client.rs index 639b9f124..9a4fe5c50 100644 --- a/bottlecap/src/telemetry/client.rs +++ b/bottlecap/src/telemetry/client.rs @@ -20,6 +20,7 @@ impl TelemetryApiClient { pub async fn subscribe(&self) -> Result> { let url = base_url(TELEMETRY_SUBSCRIPTION_ROUTE)?; let resp = reqwest::Client::builder() + .use_rustls_tls() .no_proxy() .build() .map_err(|e| { diff --git a/bottlecap/src/traces/stats_processor.rs b/bottlecap/src/traces/stats_processor.rs index f079c5b24..4f50ff113 100644 --- a/bottlecap/src/traces/stats_processor.rs +++ b/bottlecap/src/traces/stats_processor.rs @@ -13,7 +13,7 @@ use datadog_trace_protobuf::pb; use datadog_trace_utils::stats_utils; use super::trace_agent::MAX_CONTENT_LENGTH; -use datadog_trace_mini_agent::http_utils::{self, log_and_create_http_response}; +use trace_agent::http_utils::{self, log_and_create_http_response}; #[async_trait] pub trait StatsProcessor { diff --git a/bottlecap/src/traces/trace_agent.rs b/bottlecap/src/traces/trace_agent.rs index f03914c5f..f9d193364 100644 --- a/bottlecap/src/traces/trace_agent.rs +++ b/bottlecap/src/traces/trace_agent.rs @@ -24,11 +24,11 @@ use crate::tags::provider; use crate::traces::{ stats_aggregator, stats_processor, trace_aggregator, trace_processor, INVOCATION_SPAN_RESOURCE, }; -use datadog_trace_mini_agent::http_utils::{ - self, log_and_create_http_response, log_and_create_traces_success_http_response, -}; use datadog_trace_protobuf::pb; use datadog_trace_utils::trace_utils::{self, SendData}; +use trace_agent::http_utils::{ + self, log_and_create_http_response, log_and_create_traces_success_http_response, +}; const TRACE_AGENT_PORT: usize = 8126; const V4_TRACE_ENDPOINT_PATH: &str = "/v0.4/traces"; diff --git a/bottlecap/src/traces/trace_processor.rs b/bottlecap/src/traces/trace_processor.rs index 36eb48bfd..211bafdb6 100644 --- a/bottlecap/src/traces/trace_processor.rs +++ b/bottlecap/src/traces/trace_processor.rs @@ -17,9 +17,7 @@ use datadog_trace_utils::send_data::{Compression, SendData, SendDataBuilder}; use datadog_trace_utils::send_with_retry::{RetryBackoffType, RetryStrategy}; use datadog_trace_utils::trace_utils::{self}; use datadog_trace_utils::tracer_header_tags; -use datadog_trace_utils::tracer_payload::{ - TraceChunkProcessor, TraceCollection::V07, TracerPayloadCollection, -}; +use datadog_trace_utils::tracer_payload::{TraceChunkProcessor, TracerPayloadCollection}; use ddcommon::Endpoint; use std::str::FromStr; use std::sync::Arc; @@ -139,16 +137,15 @@ impl TraceProcessor for ServerlessTraceProcessor { body_size: usize, span_pointers: Option>, ) -> SendData { - let mut payload = trace_utils::collect_trace_chunks( - V07(traces), + let mut payload = trace_utils::collect_pb_trace_chunks( + traces, &header_tags, &mut ChunkProcessor { obfuscation_config: self.obfuscation_config.clone(), tags_provider: tags_provider.clone(), span_pointers, }, - true, - false, + true, // send agentless since we are the agent ) .unwrap_or_else(|e| { error!("Error processing traces: {:?}", e); diff --git a/images/Dockerfile.bottlecap.alpine.compile b/images/Dockerfile.bottlecap.alpine.compile index 62db2ee60..412d88d5c 100644 --- a/images/Dockerfile.bottlecap.alpine.compile +++ b/images/Dockerfile.bottlecap.alpine.compile @@ -1,11 +1,10 @@ FROM registry.ddbuild.io/images/mirror/alpine:3.16 AS compiler ARG PLATFORM -# FIPS is not used for now. ARG FIPS # Install dependencies -RUN apk add --no-cache curl gcc musl-dev make unzip bash autoconf automake libtool g++ +RUN apk add --no-cache curl gcc musl-dev make unzip bash autoconf automake libtool g++ perl go cmake linux-headers; SHELL ["/bin/bash", "-c"] @@ -21,6 +20,7 @@ RUN rustup component add rust-src --toolchain stable-$PLATFORM-unknown-linux-mus # Copy source code RUN mkdir -p /tmp/dd COPY ./bottlecap/src /tmp/dd/bottlecap/src +COPY ./bottlecap/build.rs /tmp/dd/bottlecap/build.rs COPY ./bottlecap/Cargo.toml /tmp/dd/bottlecap/Cargo.toml COPY ./bottlecap/Cargo.lock /tmp/dd/bottlecap/Cargo.lock @@ -28,9 +28,21 @@ COPY ./bottlecap/Cargo.lock /tmp/dd/bottlecap/Cargo.lock # # Added `-C link-arg=-lgcc` for alpine. ENV RUSTFLAGS="-C panic=abort -C link-arg=-lgcc" + WORKDIR /tmp/dd/bottlecap -RUN --mount=type=cache,target=/root/.cargo/registry cargo +stable build --release --target $PLATFORM-unknown-linux-musl -RUN cp /tmp/dd/bottlecap/target/$PLATFORM-unknown-linux-musl/release/bottlecap /tmp/dd/bottlecap/bottlecap +RUN --mount=type=cache,target=/root/.cargo/registry \ + export PROFILE="release"; \ + if [ "$FIPS" = "1" ]; then \ + export FEATURES=fips; \ + if [ "$PLATFORM" = "aarch64" ]; then \ + export PROFILE="release-alpine-arm64-fips"; \ + fi \ + else \ + export FEATURES=default; \ + fi; \ + env; \ + cargo +stable build --verbose --no-default-features --features $FEATURES --profile $PROFILE --target $PLATFORM-unknown-linux-musl; \ + cp /tmp/dd/bottlecap/target/$PLATFORM-unknown-linux-musl/$PROFILE/bottlecap /tmp/dd/bottlecap/bottlecap # Use the smallest image possible FROM scratch diff --git a/images/Dockerfile.bottlecap.compile b/images/Dockerfile.bottlecap.compile index 3d5a5a184..4194996da 100644 --- a/images/Dockerfile.bottlecap.compile +++ b/images/Dockerfile.bottlecap.compile @@ -1,11 +1,10 @@ FROM public.ecr.aws/lambda/provided:al2 AS compiler ARG PLATFORM -# FIPS is not used for now. ARG FIPS # Install dependencies -RUN yum install -y curl gcc gcc-c++ make unzip +RUN yum install -y curl clang make unzip cmake3 perl go # Install Protocol Buffers compiler by hand, since AL2 does not have a recent enough version. COPY ./scripts/install-protoc.sh / @@ -20,13 +19,23 @@ RUN rustup component add rust-src --toolchain stable-$PLATFORM-unknown-linux-gnu # Copy source code RUN mkdir -p /tmp/dd COPY ./bottlecap/src /tmp/dd/bottlecap/src +COPY ./bottlecap/build.rs /tmp/dd/bottlecap/build.rs COPY ./bottlecap/Cargo.toml /tmp/dd/bottlecap/Cargo.toml COPY ./bottlecap/Cargo.lock /tmp/dd/bottlecap/Cargo.lock # Build the binary ENV RUSTFLAGS="-C panic=abort" +ENV AWS_LC_FIPS_SYS_CC=clang +ENV AWS_LC_FIPS_SYS_CXX=clang++ + WORKDIR /tmp/dd/bottlecap -RUN --mount=type=cache,target=/usr/local/cargo/registry cargo +stable build --release --target $PLATFORM-unknown-linux-gnu +RUN --mount=type=cache,target=/usr/local/cargo/registry \ + if [ "$FIPS" = "1" ]; then \ + export FEATURES=fips; \ + else \ + export FEATURES=default; \ + fi; \ + cargo +stable build --no-default-features --features $FEATURES --release --target $PLATFORM-unknown-linux-gnu; RUN cp /tmp/dd/bottlecap/target/$PLATFORM-unknown-linux-gnu/release/bottlecap /tmp/dd/bottlecap/bottlecap # Use smallest image possible From 09103d348d537fb25749cbf6932b7750eec10130 Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Thu, 24 Apr 2025 14:54:17 -0400 Subject: [PATCH 02/12] chore: use the latest libdatadog and serverless components --- bottlecap/Cargo.lock | 170 +++++++++++++-------------------- bottlecap/Cargo.toml | 14 +-- bottlecap/LICENSE-3rdparty.yml | 116 ++++------------------ 3 files changed, 94 insertions(+), 206 deletions(-) diff --git a/bottlecap/Cargo.lock b/bottlecap/Cargo.lock index d0c55173e..defff3193 100644 --- a/bottlecap/Cargo.lock +++ b/bottlecap/Cargo.lock @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "ascii-canvas" @@ -293,9 +293,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.28.0" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f7720b74ed28ca77f90769a71fd8c637a0137f6fae4ae947e1050229cff57f" +checksum = "bfa9b6986f250236c27e5a204062434a773a13243d2ffc2955f37bdba4c5c6a1" dependencies = [ "bindgen", "cc", @@ -460,7 +460,7 @@ dependencies = [ "opentelemetry-proto", "opentelemetry-semantic-conventions", "proptest", - "prost 0.13.5", + "prost", "protobuf", "rand 0.8.5", "regex", @@ -518,9 +518,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.17" +version = "1.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" dependencies = [ "jobserver", "libc", @@ -669,7 +669,7 @@ version = "0.1.0" source = "git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222#c89b58e5784b985819baf11f13f7d35876741222" dependencies = [ "bytes 1.10.1", - "prost 0.13.5", + "prost", "protobuf", "protobuf-codegen", "tonic", @@ -679,10 +679,10 @@ dependencies = [ [[package]] name = "datadog-protos" version = "0.1.0" -source = "git+https://github.com/DataDog/saluki/#2975e5849bea86d43c234ee90f819e200847c274" +source = "git+https://github.com/DataDog/saluki/#c0156e46e08a30826338e074b413d8abe6e0e956" dependencies = [ "bytes 1.10.1", - "prost 0.13.5", + "prost", "protobuf", "protobuf-codegen", "tonic", @@ -692,7 +692,7 @@ dependencies = [ [[package]] name = "datadog-trace-normalization" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" +source = "git+https://github.com/DataDog/libdatadog?rev=d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae#d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -701,7 +701,7 @@ dependencies = [ [[package]] name = "datadog-trace-obfuscation" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" +source = "git+https://github.com/DataDog/libdatadog?rev=d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae#d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -718,9 +718,9 @@ dependencies = [ [[package]] name = "datadog-trace-protobuf" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" +source = "git+https://github.com/DataDog/libdatadog?rev=d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae#d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" dependencies = [ - "prost 0.11.9", + "prost", "serde", "serde_bytes", ] @@ -728,7 +728,7 @@ dependencies = [ [[package]] name = "datadog-trace-utils" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" +source = "git+https://github.com/DataDog/libdatadog?rev=d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae#d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" dependencies = [ "anyhow", "bytes 1.10.1", @@ -741,7 +741,7 @@ dependencies = [ "hyper 1.6.0", "hyper-http-proxy", "log", - "prost 0.11.9", + "prost", "rand 0.8.5", "rmp", "rmp-serde", @@ -756,7 +756,7 @@ dependencies = [ [[package]] name = "ddcommon" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" +source = "git+https://github.com/DataDog/libdatadog?rev=d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae#d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" dependencies = [ "anyhow", "cc", @@ -804,7 +804,7 @@ dependencies = [ [[package]] name = "ddsketch-agent" version = "0.1.0" -source = "git+https://github.com/DataDog/saluki/#2975e5849bea86d43c234ee90f819e200847c274" +source = "git+https://github.com/DataDog/saluki/#c0156e46e08a30826338e074b413d8abe6e0e956" dependencies = [ "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/)", "float-cmp", @@ -879,7 +879,7 @@ dependencies = [ [[package]] name = "dogstatsd" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-fips-builds#c17a011ed6a2dd9fa3d8f2489634fcee83809605" +source = "git+https://github.com/DataDog/serverless-components?rev=0aac11e23a31cdae22ebe42406028964a2b36cea#0aac11e23a31cdae22ebe42406028964a2b36cea" dependencies = [ "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", "ddsketch-agent 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", @@ -928,9 +928,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", "windows-sys 0.59.0", @@ -1157,9 +1157,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", @@ -1208,9 +1208,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633" dependencies = [ "atomic-waker", "bytes 1.10.1", @@ -1218,7 +1218,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.8.0", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -1683,9 +1683,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -1712,15 +1712,6 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.11.0" @@ -1840,9 +1831,9 @@ checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" [[package]] name = "libc" -version = "0.2.171" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libloading" @@ -1872,9 +1863,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" @@ -1939,9 +1930,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff70ce3e48ae43fa075863cef62e8b43b71a4f2382229920e0df362592919430" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" dependencies = [ "adler2", ] @@ -2056,7 +2047,7 @@ dependencies = [ "hex", "opentelemetry", "opentelemetry_sdk", - "prost 0.13.5", + "prost", "serde", "tonic", "tracing", @@ -2174,7 +2165,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.8.0", + "indexmap 2.9.0", ] [[package]] @@ -2184,7 +2175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset 0.5.7", - "indexmap 2.8.0", + "indexmap 2.9.0", ] [[package]] @@ -2283,9 +2274,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettyplease" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" dependencies = [ "proc-macro2", "syn 2.0.100", @@ -2293,9 +2284,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -2333,16 +2324,6 @@ dependencies = [ "unarray", ] -[[package]] -name = "prost" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" -dependencies = [ - "bytes 1.10.1", - "prost-derive 0.11.9", -] - [[package]] name = "prost" version = "0.13.5" @@ -2350,7 +2331,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ "bytes 1.10.1", - "prost-derive 0.13.5", + "prost-derive", ] [[package]] @@ -2366,26 +2347,13 @@ dependencies = [ "once_cell", "petgraph 0.7.1", "prettyplease", - "prost 0.13.5", + "prost", "prost-types", "regex", "syn 2.0.100", "tempfile", ] -[[package]] -name = "prost-derive" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" -dependencies = [ - "anyhow", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "prost-derive" version = "0.13.5" @@ -2405,7 +2373,7 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" dependencies = [ - "prost 0.13.5", + "prost", ] [[package]] @@ -2442,7 +2410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4aeaa1f2460f1d348eeaeed86aea999ce98c1bded6f089ff8514c9d9dbdc973" dependencies = [ "anyhow", - "indexmap 2.8.0", + "indexmap 2.9.0", "log", "protobuf", "protobuf-support", @@ -2488,9 +2456,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" +checksum = "bcbafbbdbb0f638fe3f35f3c56739f77a8a1d070cb25603226c83339b391472b" dependencies = [ "bytes 1.10.1", "getrandom 0.3.2", @@ -2582,7 +2550,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", ] [[package]] @@ -2605,9 +2573,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" +checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" dependencies = [ "bitflags 2.9.0", ] @@ -2618,7 +2586,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", "libredox", "thiserror 1.0.69", ] @@ -2720,7 +2688,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.16", "libc", "untrusted", "windows-sys 0.52.0", @@ -2798,15 +2766,15 @@ dependencies = [ "bitflags 2.9.0", "errno", "libc", - "linux-raw-sys 0.9.3", + "linux-raw-sys 0.9.4", "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.25" +version = "0.23.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" +checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0" dependencies = [ "aws-lc-rs", "once_cell", @@ -2894,9 +2862,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea091f6cac2595aa38993f04f4ee692ed43757035c36e67c180b6828356385b1" +checksum = "22b2d775fb28f245817589471dd49c5edf64237f4a19d10ce9a92ff4651a27f4" dependencies = [ "sdd", ] @@ -3035,7 +3003,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.8.0", + "indexmap 2.9.0", "itoa 1.0.15", "ryu", "serde", @@ -3106,9 +3074,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" dependencies = [ "libc", ] @@ -3136,9 +3104,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "socket2" @@ -3308,7 +3276,7 @@ dependencies = [ [[package]] name = "tinybytes" version = "17.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap#6b641484f25a57e21f0cd81a3b6dc67b68b588d2" +source = "git+https://github.com/DataDog/libdatadog?rev=d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae#d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" dependencies = [ "serde", ] @@ -3340,9 +3308,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.1" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes 1.10.1", @@ -3399,9 +3367,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" dependencies = [ "bytes 1.10.1", "futures-core", @@ -3427,7 +3395,7 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost 0.13.5", + "prost", "tokio", "tokio-stream", "tower 0.4.13", @@ -3500,7 +3468,7 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "trace-agent" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-fips-builds#c17a011ed6a2dd9fa3d8f2489634fcee83809605" +source = "git+https://github.com/DataDog/serverless-components?rev=0aac11e23a31cdae22ebe42406028964a2b36cea#0aac11e23a31cdae22ebe42406028964a2b36cea" dependencies = [ "anyhow", "async-trait", diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index cd669f2e5..56dcc6e81 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -10,13 +10,13 @@ bytes = { version = "1.2", default-features = false } chrono = { version = "0.4", features = ["serde", "std", "now"], default-features = false } datadog-protos = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki/" } ddsketch-agent = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki/" } -ddcommon = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap"} -datadog-trace-protobuf = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap" } -datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap", features = ["compression"] } -datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap"} -datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", branch = "aleksandr.pasechnik/svls-6242-fips-features-for-bottlecap" } -dogstatsd = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-fips-builds", default-features = false } -trace-agent = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-fips-builds" } +ddcommon = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } +datadog-trace-protobuf = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } +datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" , features = ["compression"] } +datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } +datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } +dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "0aac11e23a31cdae22ebe42406028964a2b36cea", default-features = false } +trace-agent = { git = "https://github.com/DataDog/serverless-components", rev = "0aac11e23a31cdae22ebe42406028964a2b36cea" } figment = { version = "0.10", default-features = false, features = ["yaml", "env"] } hyper = { version = "1.6", default-features = false, features = ["server"] } hyper-util = { version = "0.1.10", features = [ diff --git a/bottlecap/LICENSE-3rdparty.yml b/bottlecap/LICENSE-3rdparty.yml index 574711595..488896485 100644 --- a/bottlecap/LICENSE-3rdparty.yml +++ b/bottlecap/LICENSE-3rdparty.yml @@ -169,7 +169,7 @@ third_party_libraries: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - package_name: anyhow - package_version: 1.0.97 + package_version: 1.0.98 repository: https://github.com/dtolnay/anyhow license: MIT OR Apache-2.0 licenses: @@ -1064,7 +1064,7 @@ third_party_libraries: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - package_name: aws-lc-sys - package_version: 0.28.0 + package_version: 0.28.2 repository: https://github.com/aws/aws-lc-rs license: ISC AND (Apache-2.0 OR ISC) AND OpenSSL licenses: @@ -3102,7 +3102,7 @@ third_party_libraries: IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - package_name: cc - package_version: 1.2.17 + package_version: 1.2.19 repository: https://github.com/rust-lang/cc-rs license: MIT OR Apache-2.0 licenses: @@ -6477,7 +6477,7 @@ third_party_libraries: IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - package_name: errno - package_version: 0.3.10 + package_version: 0.3.11 repository: https://github.com/lambda-fairy/rust-errno license: MIT OR Apache-2.0 licenses: @@ -7231,7 +7231,7 @@ third_party_libraries: - license: MIT text: "The MIT License (MIT)\r\n\r\nCopyright (c) 2015 BartÅ‚omiej KamiÅ„ski\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE." - package_name: getrandom - package_version: 0.2.15 + package_version: 0.2.16 repository: https://github.com/rust-random/getrandom license: MIT OR Apache-2.0 licenses: @@ -7369,7 +7369,7 @@ third_party_libraries: - license: Apache-2.0 text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" - package_name: h2 - package_version: 0.4.8 + package_version: 0.4.9 repository: https://github.com/hyperium/h2 license: MIT licenses: @@ -9209,7 +9209,7 @@ third_party_libraries: IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - package_name: indexmap - package_version: 2.8.0 + package_version: 2.9.0 repository: https://github.com/indexmap-rs/indexmap license: Apache-2.0 OR MIT licenses: @@ -9527,40 +9527,6 @@ third_party_libraries: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- package_name: itertools - package_version: 0.10.5 - repository: https://github.com/rust-itertools/itertools - license: MIT/Apache-2.0 - licenses: - - license: MIT - text: | - Copyright (c) 2015 - - Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the - Software without restriction, including without - limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of - the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice - shall be included in all copies or substantial portions - of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - license: Apache-2.0 - text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" - package_name: itertools package_version: 0.14.0 repository: https://github.com/rust-itertools/itertools @@ -9938,7 +9904,7 @@ third_party_libraries: - license: Apache-2.0 text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" - package_name: libc - package_version: 0.2.171 + package_version: 0.2.172 repository: https://github.com/rust-lang/libc license: MIT OR Apache-2.0 licenses: @@ -10402,7 +10368,7 @@ third_party_libraries: IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - package_name: linux-raw-sys - package_version: 0.9.3 + package_version: 0.9.4 repository: https://github.com/sunfishcode/linux-raw-sys license: Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT licenses: @@ -11112,7 +11078,7 @@ third_party_libraries: - license: Apache-2.0 text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" - package_name: miniz_oxide - package_version: 0.8.7 + package_version: 0.8.8 repository: https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide license: MIT OR Zlib OR Apache-2.0 licenses: @@ -13674,7 +13640,7 @@ third_party_libraries: See the License for the specific language governing permissions and limitations under the License. - package_name: proc-macro2 - package_version: 1.0.94 + package_version: 1.0.95 repository: https://github.com/dtolnay/proc-macro2 license: MIT OR Apache-2.0 licenses: @@ -14085,13 +14051,6 @@ third_party_libraries: of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS -- package_name: prost - package_version: 0.11.9 - repository: https://github.com/tokio-rs/prost - license: Apache-2.0 - licenses: - - license: Apache-2.0 - text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" - package_name: prost package_version: 0.13.5 repository: https://github.com/tokio-rs/prost @@ -14099,13 +14058,6 @@ third_party_libraries: licenses: - license: Apache-2.0 text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" -- package_name: prost-derive - package_version: 0.11.9 - repository: https://github.com/tokio-rs/prost - license: Apache-2.0 - licenses: - - license: Apache-2.0 - text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" - package_name: prost-derive package_version: 0.13.5 repository: https://github.com/tokio-rs/prost @@ -14383,7 +14335,7 @@ third_party_libraries: See the License for the specific language governing permissions and limitations under the License. - package_name: quinn-proto - package_version: 0.11.10 + package_version: 0.11.11 repository: https://github.com/quinn-rs/quinn license: MIT OR Apache-2.0 licenses: @@ -16148,7 +16100,7 @@ third_party_libraries: same "printed page" as the copyright notice for easier identification within third-party archives. - package_name: redox_syscall - package_version: 0.5.10 + package_version: 0.5.11 repository: https://gitlab.redox-os.org/redox-os/syscall license: MIT licenses: @@ -17257,7 +17209,7 @@ third_party_libraries: IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - package_name: rustls - package_version: 0.23.25 + package_version: 0.23.26 repository: https://github.com/rustls/rustls license: Apache-2.0 OR ISC OR MIT licenses: @@ -19839,7 +19791,7 @@ third_party_libraries: See the License for the specific language governing permissions and limitations under the License. - package_name: signal-hook-registry - package_version: 1.4.2 + package_version: 1.4.5 repository: https://github.com/vorner/signal-hook license: Apache-2.0/MIT licenses: @@ -19905,7 +19857,7 @@ third_party_libraries: IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - package_name: smallvec - package_version: 1.14.0 + package_version: 1.15.0 repository: https://github.com/servo/rust-smallvec license: MIT OR Apache-2.0 licenses: @@ -20245,38 +20197,6 @@ third_party_libraries: licenses: - license: BSD-3-Clause text: "Copyright (c) 2016-2017 Isis Agora Lovecruft, Henry de Valence. All rights reserved.\nCopyright (c) 2016-2024 Isis Agora Lovecruft. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n1. Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\nIS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\nTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\nPARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \n" -- package_name: syn - package_version: 1.0.109 - repository: https://github.com/dtolnay/syn - license: MIT OR Apache-2.0 - licenses: - - license: MIT - text: | - Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the - Software without restriction, including without - limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of - the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice - shall be included in all copies or substantial portions - of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - license: Apache-2.0 - text: " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" - package_name: syn package_version: 2.0.100 repository: https://github.com/dtolnay/syn @@ -22111,7 +22031,7 @@ third_party_libraries: 3. This notice may not be removed or altered from any source distribution. - package_name: tokio - package_version: 1.44.1 + package_version: 1.44.2 repository: https://github.com/tokio-rs/tokio license: MIT licenses: @@ -22262,7 +22182,7 @@ third_party_libraries: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - package_name: tokio-util - package_version: 0.7.14 + package_version: 0.7.15 repository: https://github.com/tokio-rs/tokio license: MIT licenses: From 3770dcaa744e396c5632877c974a220fcb7f99ea Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Mon, 28 Apr 2025 13:11:40 -0400 Subject: [PATCH 03/12] chore: provide our own tls config so that we can check that it is FIPSish --- bottlecap/Cargo.lock | 99 +++++++++---------------- bottlecap/Cargo.toml | 6 +- bottlecap/src/bin/bottlecap/main.rs | 10 ++- bottlecap/src/fips.rs | 79 ++++++++++++++++++++ bottlecap/src/http_client.rs | 11 +-- bottlecap/src/lib.rs | 1 + bottlecap/src/otlp/agent.rs | 6 +- bottlecap/src/secrets/decrypt.rs | 11 ++- bottlecap/src/telemetry/client.rs | 4 +- bottlecap/src/traces/stats_processor.rs | 2 +- bottlecap/src/traces/trace_agent.rs | 6 +- 11 files changed, 151 insertions(+), 84 deletions(-) create mode 100644 bottlecap/src/fips.rs diff --git a/bottlecap/Cargo.lock b/bottlecap/Cargo.lock index defff3193..b13f50f1a 100644 --- a/bottlecap/Cargo.lock +++ b/bottlecap/Cargo.lock @@ -351,7 +351,7 @@ dependencies = [ "bitflags 2.9.0", "cexpr", "clang-sys", - "itertools 0.12.1", + "itertools", "lazy_static", "lazycell", "log", @@ -438,6 +438,7 @@ dependencies = [ "bytes 1.10.1", "chrono", "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/)", + "datadog-trace-agent", "datadog-trace-normalization", "datadog-trace-obfuscation", "datadog-trace-protobuf", @@ -467,6 +468,7 @@ dependencies = [ "reqwest", "rmp-serde", "rustls", + "rustls-native-certs", "serde", "serde-aux", "serde_json", @@ -475,7 +477,6 @@ dependencies = [ "thiserror 1.0.69", "tokio", "tokio-util", - "trace-agent", "tracing", "tracing-core", "tracing-subscriber", @@ -689,6 +690,28 @@ dependencies = [ "tonic-build", ] +[[package]] +name = "datadog-trace-agent" +version = "0.1.0" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#17157387c42a69a6296e05a32283e5d91eb90a9f" +dependencies = [ + "anyhow", + "async-trait", + "datadog-trace-normalization", + "datadog-trace-obfuscation", + "datadog-trace-protobuf", + "datadog-trace-utils", + "ddcommon", + "http-body-util", + "hyper 1.6.0", + "hyper-util", + "serde", + "serde_json", + "tokio", + "tower 0.5.2", + "tracing", +] + [[package]] name = "datadog-trace-normalization" version = "17.0.0" @@ -879,7 +902,7 @@ dependencies = [ [[package]] name = "dogstatsd" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?rev=0aac11e23a31cdae22ebe42406028964a2b36cea#0aac11e23a31cdae22ebe42406028964a2b36cea" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#17157387c42a69a6296e05a32283e5d91eb90a9f" dependencies = [ "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", "ddsketch-agent 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", @@ -889,6 +912,8 @@ dependencies = [ "protobuf", "regex", "reqwest", + "rustls", + "rustls-native-certs", "serde", "serde_json", "thiserror 1.0.69", @@ -991,12 +1016,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -[[package]] -name = "fixedbitset" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" - [[package]] name = "flate2" version = "1.1.1" @@ -1721,24 +1740,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "0.4.8" @@ -1789,9 +1790,9 @@ dependencies = [ "ascii-canvas", "bit-set 0.5.3", "ena", - "itertools 0.11.0", + "itertools", "lalrpop-util", - "petgraph 0.6.5", + "petgraph", "pico-args", "regex", "regex-syntax 0.8.5", @@ -2164,17 +2165,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ - "fixedbitset 0.4.2", - "indexmap 2.9.0", -] - -[[package]] -name = "petgraph" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" -dependencies = [ - "fixedbitset 0.5.7", + "fixedbitset", "indexmap 2.9.0", ] @@ -2341,11 +2332,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ "heck", - "itertools 0.14.0", + "itertools", "log", "multimap", "once_cell", - "petgraph 0.7.1", + "petgraph", "prettyplease", "prost", "prost-types", @@ -2361,7 +2352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools", "proc-macro2", "quote", "syn 2.0.100", @@ -3465,28 +3456,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" -[[package]] -name = "trace-agent" -version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?rev=0aac11e23a31cdae22ebe42406028964a2b36cea#0aac11e23a31cdae22ebe42406028964a2b36cea" -dependencies = [ - "anyhow", - "async-trait", - "datadog-trace-normalization", - "datadog-trace-obfuscation", - "datadog-trace-protobuf", - "datadog-trace-utils", - "ddcommon", - "http-body-util", - "hyper 1.6.0", - "hyper-util", - "serde", - "serde_json", - "tokio", - "tower 0.5.2", - "tracing", -] - [[package]] name = "tracing" version = "0.1.41" diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index 56dcc6e81..87a539bbf 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -15,8 +15,8 @@ datadog-trace-protobuf = { git = "https://github.com/DataDog/libdatadog", rev = datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" , features = ["compression"] } datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } -dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "0aac11e23a31cdae22ebe42406028964a2b36cea", default-features = false } -trace-agent = { git = "https://github.com/DataDog/serverless-components", rev = "0aac11e23a31cdae22ebe42406028964a2b36cea" } +dogstatsd = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false } +datadog-trace-agent = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection" } figment = { version = "0.10", default-features = false, features = ["yaml", "env"] } hyper = { version = "1.6", default-features = false, features = ["server"] } hyper-util = { version = "0.1.10", features = [ @@ -53,6 +53,7 @@ futures = { version = "0.3.31", default-features = false } serde-aux = { version = "4.7", default-features = false } opentelemetry-proto = { version = "0.29", features = ["trace", "with-serde", "gen-tonic"] } opentelemetry-semantic-conventions = { version = "0.29", features = ["semconv_experimental"] } +rustls-native-certs = { version = "0.8.1", optional = true } [dev-dependencies] figment = { version = "0.10", default-features = false, features = ["yaml", "env", "test"] } @@ -86,5 +87,6 @@ fips = [ "dogstatsd/fips", "reqwest/rustls-tls-native-roots-no-provider", "rustls/fips", + "rustls-native-certs", ] force_fallback = [] diff --git a/bottlecap/src/bin/bottlecap/main.rs b/bottlecap/src/bin/bottlecap/main.rs index c32722657..953fda706 100644 --- a/bottlecap/src/bin/bottlecap/main.rs +++ b/bottlecap/src/bin/bottlecap/main.rs @@ -18,6 +18,7 @@ use bottlecap::{ }, event_bus::bus::EventBus, events::Event, + fips::create_reqwest_client_builder, lifecycle::{ flush_control::FlushControl, invocation::processor::Processor as InvocationProcessor, listener::Listener as LifecycleListener, @@ -229,8 +230,13 @@ async fn main() -> Result<()> { let version_without_next = EXTENSION_VERSION.split('-').next().unwrap_or("NA"); debug!("Starting Datadog Extension {version_without_next}"); prepare_client_provider()?; - let client = Client::builder() - .use_rustls_tls() + let client = create_reqwest_client_builder() + .map_err(|e| { + Error::new( + std::io::ErrorKind::InvalidData, + format!("Failed to create client builder: {e:?}"), + ) + })? .no_proxy() .build() .map_err(|e| { diff --git a/bottlecap/src/fips.rs b/bottlecap/src/fips.rs new file mode 100644 index 000000000..96d33ee3f --- /dev/null +++ b/bottlecap/src/fips.rs @@ -0,0 +1,79 @@ +use reqwest::ClientBuilder; +use std::error::Error; +#[cfg(feature = "fips")] +use tracing::debug; + +// TODO: once we confirm that this does what we think it does we'll move it to a separate crate. +// for now going to copy the this code to bottlecap and make sure that all the clients we build do +// in fact do the fips thing right. + +/// Creates a reqwest client builder with TLS configuration. +/// When the "fips" feature is enabled, it uses a FIPS-compliant TLS configuration. +/// Otherwise, it uses reqwest's default rustls TLS implementation. +#[cfg(not(feature = "fips"))] +pub fn create_reqwest_client_builder() -> Result> { + // Just return the default builder with rustls TLS + Ok(reqwest::Client::builder().use_rustls_tls()) +} + +/// Creates a reqwest client builder with FIPS-compliant TLS configuration. +/// This version loads native root certificates and verifies FIPS compliance. +#[cfg(feature = "fips")] +pub fn create_reqwest_client_builder() -> Result> { + // Get the runtime crypto provider that should have been configured elsewhere in the application + let provider = + rustls::crypto::CryptoProvider::get_default().ok_or("No crypto provider configured")?; + + // Verify the provider is FIPS-compliant + if !provider.fips() { + return Err("Crypto provider is not FIPS-compliant".into()); + } + + // Create an empty root cert store + let mut root_cert_store = rustls::RootCertStore::empty(); + + // Load native certificates + let native_certs = rustls_native_certs::load_native_certs(); + + // Add the certificates to the store + let mut valid_count = 0; + + for cert in native_certs.certs { + match root_cert_store.add(cert) { + Ok(()) => valid_count += 1, + Err(err) => { + // Optionally log errors + debug!("Failed to parse certificate: {:?}", err); + } + } + } + + // Verify we have at least some valid certificates + if valid_count == 0 { + return Err("No valid certificates found in native root store".into()); + } + + // Configure TLS versions (FIPS typically requires TLS 1.2 or higher) + let versions = rustls::ALL_VERSIONS.to_vec(); + + // Build the client config + let config_builder = rustls::ClientConfig::builder_with_provider(provider.clone()) + .with_protocol_versions(&versions) + .map_err(|_| "Failed to set protocol versions")?; + + // Complete the configuration without client authentication + let config = config_builder + .with_root_certificates(root_cert_store) + .with_no_client_auth(); + + // Verify the final config is FIPS-compliant + if !config.fips() { + return Err("The final TLS configuration is not FIPS-compliant".into()); + } + debug!("Client Builder is in FIPS mode"); + + // Create the reqwest client builder with our FIPS-compliant TLS configuration + let client_builder = reqwest::Client::builder().use_preconfigured_tls(config); + + Ok(client_builder) +} diff --git a/bottlecap/src/http_client.rs b/bottlecap/src/http_client.rs index 2610b9a8c..280542b89 100644 --- a/bottlecap/src/http_client.rs +++ b/bottlecap/src/http_client.rs @@ -1,5 +1,7 @@ use crate::config; +use crate::fips::create_reqwest_client_builder; use core::time::Duration; +use std::error::Error; use std::sync::Arc; use tracing::error; @@ -15,9 +17,8 @@ pub fn get_client(config: Arc) -> reqwest::Client { }) } -fn build_client(config: Arc) -> Result { - let client = reqwest::Client::builder() - .use_rustls_tls() +fn build_client(config: Arc) -> Result> { + let client = create_reqwest_client_builder()? .timeout(Duration::from_secs(config.flush_timeout)) // Temporarily not force http2 // Enable HTTP/2 for better multiplexing @@ -36,8 +37,8 @@ fn build_client(config: Arc) -> Result, aws_config: &mut AwsConfig) -> if !config.api_key_secret_arn.is_empty() || !config.kms_api_key.is_empty() { let before_decrypt = Instant::now(); - let client = match Client::builder().use_rustls_tls().build() { + let builder = match create_reqwest_client_builder() { + Ok(builder) => builder, + Err(err) => { + error!("Error creating reqwest client builder: {}", err); + return None; + } + }; + + let client = match builder.build() { Ok(client) => client, Err(err) => { error!("Error creating reqwest client: {}", err); diff --git a/bottlecap/src/telemetry/client.rs b/bottlecap/src/telemetry/client.rs index 9a4fe5c50..dc511996b 100644 --- a/bottlecap/src/telemetry/client.rs +++ b/bottlecap/src/telemetry/client.rs @@ -1,3 +1,4 @@ +use crate::fips::create_reqwest_client_builder; use reqwest::Response; use serde_json; use std::error::Error; @@ -19,8 +20,7 @@ impl TelemetryApiClient { pub async fn subscribe(&self) -> Result> { let url = base_url(TELEMETRY_SUBSCRIPTION_ROUTE)?; - let resp = reqwest::Client::builder() - .use_rustls_tls() + let resp = create_reqwest_client_builder()? .no_proxy() .build() .map_err(|e| { diff --git a/bottlecap/src/traces/stats_processor.rs b/bottlecap/src/traces/stats_processor.rs index 4f50ff113..fbf0029ee 100644 --- a/bottlecap/src/traces/stats_processor.rs +++ b/bottlecap/src/traces/stats_processor.rs @@ -13,7 +13,7 @@ use datadog_trace_protobuf::pb; use datadog_trace_utils::stats_utils; use super::trace_agent::MAX_CONTENT_LENGTH; -use trace_agent::http_utils::{self, log_and_create_http_response}; +use datadog_trace_agent::http_utils::{self, log_and_create_http_response}; #[async_trait] pub trait StatsProcessor { diff --git a/bottlecap/src/traces/trace_agent.rs b/bottlecap/src/traces/trace_agent.rs index f9d193364..b863425da 100644 --- a/bottlecap/src/traces/trace_agent.rs +++ b/bottlecap/src/traces/trace_agent.rs @@ -24,11 +24,11 @@ use crate::tags::provider; use crate::traces::{ stats_aggregator, stats_processor, trace_aggregator, trace_processor, INVOCATION_SPAN_RESOURCE, }; -use datadog_trace_protobuf::pb; -use datadog_trace_utils::trace_utils::{self, SendData}; -use trace_agent::http_utils::{ +use datadog_trace_agent::http_utils::{ self, log_and_create_http_response, log_and_create_traces_success_http_response, }; +use datadog_trace_protobuf::pb; +use datadog_trace_utils::trace_utils::{self, SendData}; const TRACE_AGENT_PORT: usize = 8126; const V4_TRACE_ENDPOINT_PATH: &str = "/v0.4/traces"; From 2880d68e6659fbd6fedd6822e2d59b7f76da407d Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Tue, 29 Apr 2025 10:32:43 -0400 Subject: [PATCH 04/12] chore: use the new datadog-serverless-fips crate --- bottlecap/Cargo.lock | 19 +++++-- bottlecap/Cargo.toml | 4 +- bottlecap/src/bin/bottlecap/main.rs | 2 +- bottlecap/src/fips.rs | 79 ----------------------------- bottlecap/src/http_client.rs | 2 +- bottlecap/src/lib.rs | 1 - bottlecap/src/secrets/decrypt.rs | 2 +- bottlecap/src/telemetry/client.rs | 2 +- 8 files changed, 22 insertions(+), 89 deletions(-) delete mode 100644 bottlecap/src/fips.rs diff --git a/bottlecap/Cargo.lock b/bottlecap/Cargo.lock index b13f50f1a..1915485cd 100644 --- a/bottlecap/Cargo.lock +++ b/bottlecap/Cargo.lock @@ -438,6 +438,7 @@ dependencies = [ "bytes 1.10.1", "chrono", "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/)", + "datadog-serverless-fips", "datadog-trace-agent", "datadog-trace-normalization", "datadog-trace-obfuscation", @@ -690,10 +691,21 @@ dependencies = [ "tonic-build", ] +[[package]] +name = "datadog-serverless-fips" +version = "0.1.0" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#71a17a1cfd159a90bd9e2a0f89114ea0600465e4" +dependencies = [ + "reqwest", + "rustls", + "rustls-native-certs", + "tracing", +] + [[package]] name = "datadog-trace-agent" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#17157387c42a69a6296e05a32283e5d91eb90a9f" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#71a17a1cfd159a90bd9e2a0f89114ea0600465e4" dependencies = [ "anyhow", "async-trait", @@ -902,9 +914,10 @@ dependencies = [ [[package]] name = "dogstatsd" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#17157387c42a69a6296e05a32283e5d91eb90a9f" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#71a17a1cfd159a90bd9e2a0f89114ea0600465e4" dependencies = [ "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", + "datadog-serverless-fips", "ddsketch-agent 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", "derive_more", "fnv", @@ -912,8 +925,6 @@ dependencies = [ "protobuf", "regex", "reqwest", - "rustls", - "rustls-native-certs", "serde", "serde_json", "thiserror 1.0.69", diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index 87a539bbf..590f043df 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -17,6 +17,7 @@ datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } dogstatsd = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false } datadog-trace-agent = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection" } +datadog-serverless-fips = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false } figment = { version = "0.10", default-features = false, features = ["yaml", "env"] } hyper = { version = "1.6", default-features = false, features = ["server"] } hyper-util = { version = "0.1.10", features = [ @@ -80,11 +81,12 @@ inherits = "release" opt-level = 3 [features] -default = ["reqwest/rustls-tls", "dogstatsd/default"] +default = ["reqwest/rustls-tls", "dogstatsd/default", "datadog-serverless-fips/default" ] fips = [ "ddcommon/fips", "datadog-trace-utils/fips", "dogstatsd/fips", + "datadog-serverless-fips/fips", "reqwest/rustls-tls-native-roots-no-provider", "rustls/fips", "rustls-native-certs", diff --git a/bottlecap/src/bin/bottlecap/main.rs b/bottlecap/src/bin/bottlecap/main.rs index 953fda706..6933a8933 100644 --- a/bottlecap/src/bin/bottlecap/main.rs +++ b/bottlecap/src/bin/bottlecap/main.rs @@ -18,7 +18,6 @@ use bottlecap::{ }, event_bus::bus::EventBus, events::Event, - fips::create_reqwest_client_builder, lifecycle::{ flush_control::FlushControl, invocation::processor::Processor as InvocationProcessor, listener::Listener as LifecycleListener, @@ -48,6 +47,7 @@ use bottlecap::{ EXTENSION_ID_HEADER, EXTENSION_NAME, EXTENSION_NAME_HEADER, EXTENSION_ROUTE, LAMBDA_RUNTIME_SLUG, TELEMETRY_PORT, }; +use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder; use datadog_trace_obfuscation::obfuscation_config; use datadog_trace_utils::send_data::SendData; use decrypt::resolve_secrets; diff --git a/bottlecap/src/fips.rs b/bottlecap/src/fips.rs deleted file mode 100644 index 96d33ee3f..000000000 --- a/bottlecap/src/fips.rs +++ /dev/null @@ -1,79 +0,0 @@ -use reqwest::ClientBuilder; -use std::error::Error; -#[cfg(feature = "fips")] -use tracing::debug; - -// TODO: once we confirm that this does what we think it does we'll move it to a separate crate. -// for now going to copy the this code to bottlecap and make sure that all the clients we build do -// in fact do the fips thing right. - -/// Creates a reqwest client builder with TLS configuration. -/// When the "fips" feature is enabled, it uses a FIPS-compliant TLS configuration. -/// Otherwise, it uses reqwest's default rustls TLS implementation. -#[cfg(not(feature = "fips"))] -pub fn create_reqwest_client_builder() -> Result> { - // Just return the default builder with rustls TLS - Ok(reqwest::Client::builder().use_rustls_tls()) -} - -/// Creates a reqwest client builder with FIPS-compliant TLS configuration. -/// This version loads native root certificates and verifies FIPS compliance. -#[cfg(feature = "fips")] -pub fn create_reqwest_client_builder() -> Result> { - // Get the runtime crypto provider that should have been configured elsewhere in the application - let provider = - rustls::crypto::CryptoProvider::get_default().ok_or("No crypto provider configured")?; - - // Verify the provider is FIPS-compliant - if !provider.fips() { - return Err("Crypto provider is not FIPS-compliant".into()); - } - - // Create an empty root cert store - let mut root_cert_store = rustls::RootCertStore::empty(); - - // Load native certificates - let native_certs = rustls_native_certs::load_native_certs(); - - // Add the certificates to the store - let mut valid_count = 0; - - for cert in native_certs.certs { - match root_cert_store.add(cert) { - Ok(()) => valid_count += 1, - Err(err) => { - // Optionally log errors - debug!("Failed to parse certificate: {:?}", err); - } - } - } - - // Verify we have at least some valid certificates - if valid_count == 0 { - return Err("No valid certificates found in native root store".into()); - } - - // Configure TLS versions (FIPS typically requires TLS 1.2 or higher) - let versions = rustls::ALL_VERSIONS.to_vec(); - - // Build the client config - let config_builder = rustls::ClientConfig::builder_with_provider(provider.clone()) - .with_protocol_versions(&versions) - .map_err(|_| "Failed to set protocol versions")?; - - // Complete the configuration without client authentication - let config = config_builder - .with_root_certificates(root_cert_store) - .with_no_client_auth(); - - // Verify the final config is FIPS-compliant - if !config.fips() { - return Err("The final TLS configuration is not FIPS-compliant".into()); - } - debug!("Client Builder is in FIPS mode"); - - // Create the reqwest client builder with our FIPS-compliant TLS configuration - let client_builder = reqwest::Client::builder().use_preconfigured_tls(config); - - Ok(client_builder) -} diff --git a/bottlecap/src/http_client.rs b/bottlecap/src/http_client.rs index 280542b89..5eec15a08 100644 --- a/bottlecap/src/http_client.rs +++ b/bottlecap/src/http_client.rs @@ -1,6 +1,6 @@ use crate::config; -use crate::fips::create_reqwest_client_builder; use core::time::Duration; +use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder; use std::error::Error; use std::sync::Arc; use tracing::error; diff --git a/bottlecap/src/lib.rs b/bottlecap/src/lib.rs index cafdeaf10..29781eb30 100644 --- a/bottlecap/src/lib.rs +++ b/bottlecap/src/lib.rs @@ -20,7 +20,6 @@ pub mod config; pub mod event_bus; pub mod events; -pub mod fips; pub mod http_client; pub mod lifecycle; pub mod logger; diff --git a/bottlecap/src/secrets/decrypt.rs b/bottlecap/src/secrets/decrypt.rs index 5bddc4b8b..6d91f1784 100644 --- a/bottlecap/src/secrets/decrypt.rs +++ b/bottlecap/src/secrets/decrypt.rs @@ -1,7 +1,7 @@ use crate::config::{aws::AwsConfig, Config}; -use crate::fips::create_reqwest_client_builder; use base64::prelude::*; use chrono::{DateTime, Utc}; +use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder; use hmac::{Hmac, Mac}; use reqwest::header::{HeaderMap, HeaderValue}; use reqwest::Client; diff --git a/bottlecap/src/telemetry/client.rs b/bottlecap/src/telemetry/client.rs index dc511996b..7c551f4ec 100644 --- a/bottlecap/src/telemetry/client.rs +++ b/bottlecap/src/telemetry/client.rs @@ -1,4 +1,4 @@ -use crate::fips::create_reqwest_client_builder; +use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder; use reqwest::Response; use serde_json; use std::error::Error; From 28261b5fc26c52902ac35c0f78833aef940cc286 Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Tue, 29 Apr 2025 12:04:07 -0400 Subject: [PATCH 05/12] chore: move all the fips-ish things to their own mini-package --- bottlecap/src/bin/bottlecap/main.rs | 37 +------------------ bottlecap/src/fips/mod.rs | 56 +++++++++++++++++++++++++++++ bottlecap/src/lib.rs | 1 + bottlecap/src/secrets/decrypt.rs | 13 ++----- 4 files changed, 60 insertions(+), 47 deletions(-) create mode 100644 bottlecap/src/fips/mod.rs diff --git a/bottlecap/src/bin/bottlecap/main.rs b/bottlecap/src/bin/bottlecap/main.rs index 6933a8933..bbce0426b 100644 --- a/bottlecap/src/bin/bottlecap/main.rs +++ b/bottlecap/src/bin/bottlecap/main.rs @@ -18,6 +18,7 @@ use bottlecap::{ }, event_bus::bus::EventBus, events::Event, + fips::{log_fips_status, prepare_client_provider}, lifecycle::{ flush_control::FlushControl, invocation::processor::Processor as InvocationProcessor, listener::Listener as LifecycleListener, @@ -79,42 +80,6 @@ use tokio_util::sync::CancellationToken; use tracing::{debug, error}; use tracing_subscriber::EnvFilter; -#[cfg(all(feature = "default", feature = "fips"))] -compile_error!("When building in fips mode, the default feature must be disabled"); - -#[cfg(feature = "fips")] -fn log_fips_status() { - debug!("FIPS mode is enabled"); -} - -#[cfg(not(feature = "fips"))] -fn log_fips_status() { - debug!("FIPS mode is disabled"); -} - -/// Sets up the client provider for TLS operations. -/// In FIPS mode, this installs the AWS-LC crypto provider. -/// In non-FIPS mode, this is a no-op. -#[cfg(feature = "fips")] -fn prepare_client_provider() -> Result<()> { - rustls::crypto::default_fips_provider() - .install_default() - .map_err(|e| { - Error::new( - std::io::ErrorKind::InvalidData, - format!("Failed to set up fips provider: {e:?}"), - ) - }) -} - -#[cfg(not(feature = "fips"))] -// this is not unnecessary since the fips version can return an error -#[allow(clippy::unnecessary_wraps)] -fn prepare_client_provider() -> Result<()> { - // No-op in non-FIPS mode - Ok(()) -} - #[derive(Clone, Deserialize)] #[serde(rename_all = "camelCase")] struct RegisterResponse { diff --git a/bottlecap/src/fips/mod.rs b/bottlecap/src/fips/mod.rs new file mode 100644 index 000000000..c7d83cfbe --- /dev/null +++ b/bottlecap/src/fips/mod.rs @@ -0,0 +1,56 @@ +// This module contains all of the things we do a little bit differently when we compile for FIPS +// mode. This is used in conjunction with the datadog-serverless-fips crate to ensure that when we +// compile the extension in FIPS mode, everything is built and configured correctly. + +#[cfg(feature = "fips")] +use std::io::Error; +use std::io::Result; +use tracing::debug; + +#[cfg(all(feature = "default", feature = "fips"))] +compile_error!("When building in fips mode, the default feature must be disabled"); + +#[cfg(feature = "fips")] +pub fn log_fips_status() { + debug!("FIPS mode is enabled"); +} + +#[cfg(not(feature = "fips"))] +pub fn log_fips_status() { + debug!("FIPS mode is disabled"); +} + +/// Sets up the client provider for TLS operations. +/// In FIPS mode, this installs the AWS-LC crypto provider. +/// In non-FIPS mode, this is a no-op. +#[cfg(feature = "fips")] +pub fn prepare_client_provider() -> Result<()> { + rustls::crypto::default_fips_provider() + .install_default() + .map_err(|e| { + Error::new( + std::io::ErrorKind::InvalidData, + format!("Failed to set up fips provider: {e:?}"), + ) + }) +} + +#[cfg(not(feature = "fips"))] +// this is not unnecessary since the fips version can return an error +#[allow(clippy::unnecessary_wraps)] +pub fn prepare_client_provider() -> Result<()> { + // No-op in non-FIPS mode + Ok(()) +} + +#[cfg(not(feature = "fips"))] +#[must_use] +pub fn compute_aws_api_host(service: &String, region: &String, domain: &str) -> String { + format!("{service}.{region}.{domain}") +} + +#[cfg(feature = "fips")] +#[must_use] +pub fn compute_aws_api_host(service: &String, region: &String, domain: &str) -> String { + format!("{service}-fips.{region}.{domain}") +} diff --git a/bottlecap/src/lib.rs b/bottlecap/src/lib.rs index 29781eb30..cafdeaf10 100644 --- a/bottlecap/src/lib.rs +++ b/bottlecap/src/lib.rs @@ -20,6 +20,7 @@ pub mod config; pub mod event_bus; pub mod events; +pub mod fips; pub mod http_client; pub mod lifecycle; pub mod logger; diff --git a/bottlecap/src/secrets/decrypt.rs b/bottlecap/src/secrets/decrypt.rs index 6d91f1784..d3859f85f 100644 --- a/bottlecap/src/secrets/decrypt.rs +++ b/bottlecap/src/secrets/decrypt.rs @@ -1,4 +1,5 @@ use crate::config::{aws::AwsConfig, Config}; +use crate::fips::compute_aws_api_host; use base64::prelude::*; use chrono::{DateTime, Utc}; use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder; @@ -226,16 +227,6 @@ async fn request( Ok(v) } -#[cfg(not(feature = "fips"))] -fn compute_host(service: &String, region: &String, domain: &str) -> String { - format!("{service}.{region}.{domain}") -} - -#[cfg(feature = "fips")] -fn compute_host(service: &String, region: &String, domain: &str) -> String { - format!("{service}-fips.{region}.{domain}") -} - fn build_get_secret_signed_headers( aws_config: &AwsConfig, region: String, @@ -250,7 +241,7 @@ fn build_get_secret_signed_headers( "amazonaws.com" }; - let host = compute_host(&header_values.service, ®ion, domain); + let host = compute_aws_api_host(&header_values.service, ®ion, domain); let canonical_uri = "/"; let canonical_querystring = ""; From f01c40ef0766e59db8e7e197af8c1493653e7a97 Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Tue, 29 Apr 2025 13:10:54 -0400 Subject: [PATCH 06/12] chore: use the newly renamed datadog-fips package and add a clippy rule for reqwest::Client::builder --- bottlecap/Cargo.lock | 30 ++++++++++++++--------------- bottlecap/Cargo.toml | 6 +++--- bottlecap/clippy.toml | 3 +++ bottlecap/src/bin/bottlecap/main.rs | 2 +- bottlecap/src/fips/mod.rs | 2 +- bottlecap/src/http_client.rs | 2 +- bottlecap/src/secrets/decrypt.rs | 2 +- bottlecap/src/telemetry/client.rs | 2 +- 8 files changed, 26 insertions(+), 23 deletions(-) create mode 100644 bottlecap/clippy.toml diff --git a/bottlecap/Cargo.lock b/bottlecap/Cargo.lock index 1915485cd..15d7be829 100644 --- a/bottlecap/Cargo.lock +++ b/bottlecap/Cargo.lock @@ -437,8 +437,8 @@ dependencies = [ "base64 0.22.1", "bytes 1.10.1", "chrono", + "datadog-fips", "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/)", - "datadog-serverless-fips", "datadog-trace-agent", "datadog-trace-normalization", "datadog-trace-obfuscation", @@ -665,6 +665,17 @@ dependencies = [ "typenum", ] +[[package]] +name = "datadog-fips" +version = "0.1.0" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#5e97ef4f81343db4e8a40b9176dca10ac7f6c576" +dependencies = [ + "reqwest", + "rustls", + "rustls-native-certs", + "tracing", +] + [[package]] name = "datadog-protos" version = "0.1.0" @@ -691,21 +702,10 @@ dependencies = [ "tonic-build", ] -[[package]] -name = "datadog-serverless-fips" -version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#71a17a1cfd159a90bd9e2a0f89114ea0600465e4" -dependencies = [ - "reqwest", - "rustls", - "rustls-native-certs", - "tracing", -] - [[package]] name = "datadog-trace-agent" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#71a17a1cfd159a90bd9e2a0f89114ea0600465e4" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#5e97ef4f81343db4e8a40b9176dca10ac7f6c576" dependencies = [ "anyhow", "async-trait", @@ -914,10 +914,10 @@ dependencies = [ [[package]] name = "dogstatsd" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#71a17a1cfd159a90bd9e2a0f89114ea0600465e4" +source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#5e97ef4f81343db4e8a40b9176dca10ac7f6c576" dependencies = [ + "datadog-fips", "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", - "datadog-serverless-fips", "ddsketch-agent 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", "derive_more", "fnv", diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index 590f043df..703335f42 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -17,7 +17,7 @@ datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } dogstatsd = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false } datadog-trace-agent = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection" } -datadog-serverless-fips = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false } +datadog-fips = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false } figment = { version = "0.10", default-features = false, features = ["yaml", "env"] } hyper = { version = "1.6", default-features = false, features = ["server"] } hyper-util = { version = "0.1.10", features = [ @@ -81,12 +81,12 @@ inherits = "release" opt-level = 3 [features] -default = ["reqwest/rustls-tls", "dogstatsd/default", "datadog-serverless-fips/default" ] +default = ["reqwest/rustls-tls", "dogstatsd/default", "datadog-fips/default" ] fips = [ "ddcommon/fips", "datadog-trace-utils/fips", "dogstatsd/fips", - "datadog-serverless-fips/fips", + "datadog-fips/fips", "reqwest/rustls-tls-native-roots-no-provider", "rustls/fips", "rustls-native-certs", diff --git a/bottlecap/clippy.toml b/bottlecap/clippy.toml new file mode 100644 index 000000000..63b1f336a --- /dev/null +++ b/bottlecap/clippy.toml @@ -0,0 +1,3 @@ +disallowed-methods = [ + { path = "reqwest::Client::builder", reason = "prefer the FIPS-compatible adapter", replacement = "datadog_fips::reqwest_adapter::create_reqwest_client_builder" }, +] diff --git a/bottlecap/src/bin/bottlecap/main.rs b/bottlecap/src/bin/bottlecap/main.rs index bbce0426b..4c61a1577 100644 --- a/bottlecap/src/bin/bottlecap/main.rs +++ b/bottlecap/src/bin/bottlecap/main.rs @@ -48,7 +48,7 @@ use bottlecap::{ EXTENSION_ID_HEADER, EXTENSION_NAME, EXTENSION_NAME_HEADER, EXTENSION_ROUTE, LAMBDA_RUNTIME_SLUG, TELEMETRY_PORT, }; -use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder; +use datadog_fips::reqwest_adapter::create_reqwest_client_builder; use datadog_trace_obfuscation::obfuscation_config; use datadog_trace_utils::send_data::SendData; use decrypt::resolve_secrets; diff --git a/bottlecap/src/fips/mod.rs b/bottlecap/src/fips/mod.rs index c7d83cfbe..eeca1b44e 100644 --- a/bottlecap/src/fips/mod.rs +++ b/bottlecap/src/fips/mod.rs @@ -1,5 +1,5 @@ // This module contains all of the things we do a little bit differently when we compile for FIPS -// mode. This is used in conjunction with the datadog-serverless-fips crate to ensure that when we +// mode. This is used in conjunction with the datadog-fips crate to ensure that when we // compile the extension in FIPS mode, everything is built and configured correctly. #[cfg(feature = "fips")] diff --git a/bottlecap/src/http_client.rs b/bottlecap/src/http_client.rs index 5eec15a08..b6319da21 100644 --- a/bottlecap/src/http_client.rs +++ b/bottlecap/src/http_client.rs @@ -1,6 +1,6 @@ use crate::config; use core::time::Duration; -use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder; +use datadog_fips::reqwest_adapter::create_reqwest_client_builder; use std::error::Error; use std::sync::Arc; use tracing::error; diff --git a/bottlecap/src/secrets/decrypt.rs b/bottlecap/src/secrets/decrypt.rs index d3859f85f..dbd906b53 100644 --- a/bottlecap/src/secrets/decrypt.rs +++ b/bottlecap/src/secrets/decrypt.rs @@ -2,7 +2,7 @@ use crate::config::{aws::AwsConfig, Config}; use crate::fips::compute_aws_api_host; use base64::prelude::*; use chrono::{DateTime, Utc}; -use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder; +use datadog_fips::reqwest_adapter::create_reqwest_client_builder; use hmac::{Hmac, Mac}; use reqwest::header::{HeaderMap, HeaderValue}; use reqwest::Client; diff --git a/bottlecap/src/telemetry/client.rs b/bottlecap/src/telemetry/client.rs index 7c551f4ec..273586275 100644 --- a/bottlecap/src/telemetry/client.rs +++ b/bottlecap/src/telemetry/client.rs @@ -1,4 +1,4 @@ -use datadog_serverless_fips::reqwest_adapter::create_reqwest_client_builder; +use datadog_fips::reqwest_adapter::create_reqwest_client_builder; use reqwest::Response; use serde_json; use std::error::Error; From 0222b41fa605730e65b6544f73ddd6ae82a41766 Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Tue, 29 Apr 2025 13:39:19 -0400 Subject: [PATCH 07/12] chore: use the merged serverless-components code --- bottlecap/Cargo.lock | 6 +++--- bottlecap/Cargo.toml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bottlecap/Cargo.lock b/bottlecap/Cargo.lock index 15d7be829..68959a198 100644 --- a/bottlecap/Cargo.lock +++ b/bottlecap/Cargo.lock @@ -668,7 +668,7 @@ dependencies = [ [[package]] name = "datadog-fips" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#5e97ef4f81343db4e8a40b9176dca10ac7f6c576" +source = "git+https://github.com/DataDog/serverless-components?rev=3f3347790d4c7f3393589ef7efb7ccf22405a89a#3f3347790d4c7f3393589ef7efb7ccf22405a89a" dependencies = [ "reqwest", "rustls", @@ -705,7 +705,7 @@ dependencies = [ [[package]] name = "datadog-trace-agent" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#5e97ef4f81343db4e8a40b9176dca10ac7f6c576" +source = "git+https://github.com/DataDog/serverless-components?rev=3f3347790d4c7f3393589ef7efb7ccf22405a89a#3f3347790d4c7f3393589ef7efb7ccf22405a89a" dependencies = [ "anyhow", "async-trait", @@ -914,7 +914,7 @@ dependencies = [ [[package]] name = "dogstatsd" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?branch=aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection#5e97ef4f81343db4e8a40b9176dca10ac7f6c576" +source = "git+https://github.com/DataDog/serverless-components?rev=3f3347790d4c7f3393589ef7efb7ccf22405a89a#3f3347790d4c7f3393589ef7efb7ccf22405a89a" dependencies = [ "datadog-fips", "datadog-protos 0.1.0 (git+https://github.com/DataDog/saluki/?rev=c89b58e5784b985819baf11f13f7d35876741222)", diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index 703335f42..ab7efff57 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -15,9 +15,9 @@ datadog-trace-protobuf = { git = "https://github.com/DataDog/libdatadog", rev = datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" , features = ["compression"] } datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } -dogstatsd = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false } -datadog-trace-agent = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection" } -datadog-fips = { git = "https://github.com/DataDog/serverless-components", branch = "aleksandr.pasechnik/svls-6242-reqwest-fips-tls-injection", default-features = false } +dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "3f3347790d4c7f3393589ef7efb7ccf22405a89a", default-features = false } +datadog-trace-agent = { git = "https://github.com/DataDog/serverless-components", rev = "3f3347790d4c7f3393589ef7efb7ccf22405a89a" } +datadog-fips = { git = "https://github.com/DataDog/serverless-components", rev = "3f3347790d4c7f3393589ef7efb7ccf22405a89a", default-features = false } figment = { version = "0.10", default-features = false, features = ["yaml", "env"] } hyper = { version = "1.6", default-features = false, features = ["server"] } hyper-util = { version = "0.1.10", features = [ From 470c762052241693aa8fbcf1b716f682d7c77f8e Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Tue, 29 Apr 2025 13:40:28 -0400 Subject: [PATCH 08/12] chore: remove unnecessary force_fallback feature --- bottlecap/Cargo.toml | 1 - bottlecap/src/config/mod.rs | 7 ------- 2 files changed, 8 deletions(-) diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index ab7efff57..f4d3fea88 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -91,4 +91,3 @@ fips = [ "rustls/fips", "rustls-native-certs", ] -force_fallback = [] diff --git a/bottlecap/src/config/mod.rs b/bottlecap/src/config/mod.rs index 95f4a1c18..c4f990d65 100644 --- a/bottlecap/src/config/mod.rs +++ b/bottlecap/src/config/mod.rs @@ -34,13 +34,6 @@ fn log_fallback_reason(reason: &str) { println!("{{\"DD_EXTENSION_FALLBACK_REASON\":\"{reason}\"}}"); } -#[cfg(feature = "force_fallback")] -fn fallback(_: &EnvConfig, _: &YamlConfig) -> Result<(), ConfigError> { - log_fallback_reason("force_fallback"); - Err(ConfigError::UnsupportedField("force_fallback".to_string())) -} - -#[cfg(not(feature = "force_fallback"))] fn fallback(config: &EnvConfig, yaml_config: &YamlConfig) -> Result<(), ConfigError> { // Customer explicitly opted out of the Next Gen extension let opted_out = match config.extension_version.as_deref() { From f39175ad1512e081a4110448fb3f1c7fba676808 Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Tue, 29 Apr 2025 13:42:40 -0400 Subject: [PATCH 09/12] chore: fix licenses file --- bottlecap/LICENSE-3rdparty.yml | 634 ++++++++++++++++++++++----------- 1 file changed, 421 insertions(+), 213 deletions(-) diff --git a/bottlecap/LICENSE-3rdparty.yml b/bottlecap/LICENSE-3rdparty.yml index 488896485..bddff455e 100644 --- a/bottlecap/LICENSE-3rdparty.yml +++ b/bottlecap/LICENSE-3rdparty.yml @@ -3996,6 +3996,423 @@ third_party_libraries: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +- package_name: datadog-fips + package_version: 0.1.0 + repository: https://github.com/DataDog/serverless-components + license: Apache-2.0 + licenses: + - license: Apache-2.0 + text: |2 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +- package_name: datadog-protos + package_version: 0.1.0 + repository: https://github.com/DataDog/saluki + license: Apache-2.0 + licenses: + - license: Apache-2.0 + text: |2 + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024-present Datadog, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. - package_name: datadog-protos package_version: 0.1.0 repository: https://github.com/DataDog/saluki @@ -4205,14 +4622,13 @@ third_party_libraries: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- package_name: datadog-protos +- package_name: datadog-trace-agent package_version: 0.1.0 - repository: https://github.com/DataDog/saluki + repository: '' license: Apache-2.0 licenses: - license: Apache-2.0 text: |2 - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -4401,7 +4817,7 @@ third_party_libraries: same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2024-present Datadog, Inc. + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -9528,7 +9944,7 @@ third_party_libraries: See the License for the specific language governing permissions and limitations under the License. - package_name: itertools - package_version: 0.14.0 + package_version: 0.11.0 repository: https://github.com/rust-itertools/itertools license: MIT OR Apache-2.0 licenses: @@ -22363,214 +22779,6 @@ third_party_libraries: OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- package_name: trace-agent - package_version: 0.1.0 - repository: '' - license: Apache-2.0 - licenses: - - license: Apache-2.0 - text: |2 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - package_name: tracing package_version: 0.1.41 repository: https://github.com/tokio-rs/tracing From 49701a51be97f155fc98f6e85743ade4bb448dc7 Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Tue, 29 Apr 2025 16:07:08 -0400 Subject: [PATCH 10/12] chore: adding a note about clippy.toml in our owned repos --- bottlecap/Cargo.toml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index f4d3fea88..455586d95 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -8,16 +8,6 @@ publish = false async-trait = { version = "0.1", default-features = false } bytes = { version = "1.2", default-features = false } chrono = { version = "0.4", features = ["serde", "std", "now"], default-features = false } -datadog-protos = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki/" } -ddsketch-agent = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki/" } -ddcommon = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } -datadog-trace-protobuf = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } -datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" , features = ["compression"] } -datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } -datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } -dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "3f3347790d4c7f3393589ef7efb7ccf22405a89a", default-features = false } -datadog-trace-agent = { git = "https://github.com/DataDog/serverless-components", rev = "3f3347790d4c7f3393589ef7efb7ccf22405a89a" } -datadog-fips = { git = "https://github.com/DataDog/serverless-components", rev = "3f3347790d4c7f3393589ef7efb7ccf22405a89a", default-features = false } figment = { version = "0.10", default-features = false, features = ["yaml", "env"] } hyper = { version = "1.6", default-features = false, features = ["server"] } hyper-util = { version = "0.1.10", features = [ @@ -55,6 +45,21 @@ serde-aux = { version = "4.7", default-features = false } opentelemetry-proto = { version = "0.29", features = ["trace", "with-serde", "gen-tonic"] } opentelemetry-semantic-conventions = { version = "0.29", features = ["semconv_experimental"] } rustls-native-certs = { version = "0.8.1", optional = true } +# If you are adding or updating a datadog-owned code dependency, please ensure +# that it has a clippy.toml rule for disallowing the reqwest::Client::builder +# method in favor of our +# datadog_fips::reqwest_adapter::create_reqwest_client_builder. An example can +# be found in the clippy.toml file adjacent to this Cargo.toml. +datadog-protos = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki/" } +ddsketch-agent = { version = "0.1.0", default-features = false, git = "https://github.com/DataDog/saluki/" } +ddcommon = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } +datadog-trace-protobuf = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } +datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" , features = ["compression"] } +datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } +datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "d6a2da32c6b92d6865a7e7987c8a1df2203fb1ae" } +dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "3f3347790d4c7f3393589ef7efb7ccf22405a89a", default-features = false } +datadog-trace-agent = { git = "https://github.com/DataDog/serverless-components", rev = "3f3347790d4c7f3393589ef7efb7ccf22405a89a" } +datadog-fips = { git = "https://github.com/DataDog/serverless-components", rev = "3f3347790d4c7f3393589ef7efb7ccf22405a89a", default-features = false } [dev-dependencies] figment = { version = "0.10", default-features = false, features = ["yaml", "env", "test"] } From 72d2b94ba4ec1378b8b45aa08ad3bd7e27d2f410 Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Mon, 5 May 2025 11:10:10 -0400 Subject: [PATCH 11/12] chore: check for DD_LAMBDA_FIPS_MODE mismatch --- bottlecap/src/bin/bottlecap/main.rs | 2 +- bottlecap/src/fips/mod.rs | 32 +++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/bottlecap/src/bin/bottlecap/main.rs b/bottlecap/src/bin/bottlecap/main.rs index 4c61a1577..e5ccb6c3c 100644 --- a/bottlecap/src/bin/bottlecap/main.rs +++ b/bottlecap/src/bin/bottlecap/main.rs @@ -191,7 +191,7 @@ async fn main() -> Result<()> { let (mut aws_config, config) = load_configs(start_time); enable_logging_subsystem(&config); - log_fips_status(); + log_fips_status(&aws_config.region); let version_without_next = EXTENSION_VERSION.split('-').next().unwrap_or("NA"); debug!("Starting Datadog Extension {version_without_next}"); prepare_client_provider()?; diff --git a/bottlecap/src/fips/mod.rs b/bottlecap/src/fips/mod.rs index eeca1b44e..b0808e87c 100644 --- a/bottlecap/src/fips/mod.rs +++ b/bottlecap/src/fips/mod.rs @@ -2,6 +2,7 @@ // mode. This is used in conjunction with the datadog-fips crate to ensure that when we // compile the extension in FIPS mode, everything is built and configured correctly. +use std::env; #[cfg(feature = "fips")] use std::io::Error; use std::io::Result; @@ -10,14 +11,41 @@ use tracing::debug; #[cfg(all(feature = "default", feature = "fips"))] compile_error!("When building in fips mode, the default feature must be disabled"); +#[must_use] +pub fn runtime_layer_would_enable_fips_mode(region: &str) -> bool { + let is_gov_region = region.starts_with("us-gov-"); + + env::var("DD_LAMBDA_FIPS_MODE") + .map(|val| val.to_lowercase() == "true") + .unwrap_or(is_gov_region) +} + +#[cfg(feature = "fips")] +pub fn check_fips_mode_mismatch(region: &str) { + let runtime_would_enable = runtime_layer_would_enable_fips_mode(region); + if !runtime_would_enable { + debug!("FIPS mode is enabled in this Extension layer but would be disabled in the runtime layer based on region and environment settings. Set DD_LAMBDA_FIPS_MODE=true or deploy the standard (non-FIPS) version of the Extension layer to ensure consistent FIPS behavior."); + } +} + +#[cfg(not(feature = "fips"))] +pub fn check_fips_mode_mismatch(region: &str) { + let runtime_would_enable = runtime_layer_would_enable_fips_mode(region); + if runtime_would_enable { + debug!("FIPS mode is disabled in this Extension layer but would be enabled in the runtime layer based on region and environment settings. Deploy the FIPS version of the Extension layer or set DD_LAMBDA_FIPS_MODE=false to ensure consistent FIPS behavior."); + } +} + #[cfg(feature = "fips")] -pub fn log_fips_status() { +pub fn log_fips_status(region: &str) { debug!("FIPS mode is enabled"); + check_fips_mode_mismatch(region); } #[cfg(not(feature = "fips"))] -pub fn log_fips_status() { +pub fn log_fips_status(region: &str) { debug!("FIPS mode is disabled"); + check_fips_mode_mismatch(region); } /// Sets up the client provider for TLS operations. From 57a6119b30b0c8bebeeb61e05733acbedcb32c81 Mon Sep 17 00:00:00 2001 From: Aleksandr Pasechnik Date: Mon, 5 May 2025 15:55:11 -0400 Subject: [PATCH 12/12] chore: refactor mismatch check to be clearer --- bottlecap/src/fips/mod.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/bottlecap/src/fips/mod.rs b/bottlecap/src/fips/mod.rs index b0808e87c..7ff5c6d0c 100644 --- a/bottlecap/src/fips/mod.rs +++ b/bottlecap/src/fips/mod.rs @@ -15,24 +15,21 @@ compile_error!("When building in fips mode, the default feature must be disabled pub fn runtime_layer_would_enable_fips_mode(region: &str) -> bool { let is_gov_region = region.starts_with("us-gov-"); + // Note that we are defaulting to `is_gov_region` for this rather than a specific default + // value. So if the `DD_LAMBDA_FIPS_MODE` environment is not set, we expect lambdas in govcloud + // to be running the runtime layers in FIPS mode. env::var("DD_LAMBDA_FIPS_MODE") .map(|val| val.to_lowercase() == "true") .unwrap_or(is_gov_region) } -#[cfg(feature = "fips")] -pub fn check_fips_mode_mismatch(region: &str) { - let runtime_would_enable = runtime_layer_would_enable_fips_mode(region); - if !runtime_would_enable { - debug!("FIPS mode is enabled in this Extension layer but would be disabled in the runtime layer based on region and environment settings. Set DD_LAMBDA_FIPS_MODE=true or deploy the standard (non-FIPS) version of the Extension layer to ensure consistent FIPS behavior."); - } -} - -#[cfg(not(feature = "fips"))] pub fn check_fips_mode_mismatch(region: &str) { - let runtime_would_enable = runtime_layer_would_enable_fips_mode(region); - if runtime_would_enable { + if runtime_layer_would_enable_fips_mode(region) { + #[cfg(not(feature = "fips"))] debug!("FIPS mode is disabled in this Extension layer but would be enabled in the runtime layer based on region and environment settings. Deploy the FIPS version of the Extension layer or set DD_LAMBDA_FIPS_MODE=false to ensure consistent FIPS behavior."); + } else { + #[cfg(feature = "fips")] + debug!("FIPS mode is enabled in this Extension layer but would be disabled in the runtime layer based on region and environment settings. Set DD_LAMBDA_FIPS_MODE=true or deploy the standard (non-FIPS) version of the Extension layer to ensure consistent FIPS behavior."); } }