Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
da8fb6d
chore: ddcommon fips feature
apiarian-datadog Apr 4, 2025
c359b47
chore: propagate ddcommon/fips to trace-utils
apiarian-datadog Apr 7, 2025
d4c5263
chore: update verify_fips_deps script to account for additional features
apiarian-datadog Apr 7, 2025
ec8fcac
chore: do not initialize crypto in fips mode, it should be done already
apiarian-datadog Apr 15, 2025
e0ec4f6
chore: remove the verify script which is funky anyway
apiarian-datadog Apr 16, 2025
c4f7c77
chore: rearrange fips feature for tests
apiarian-datadog Apr 22, 2025
83af1e5
chore: make the fips feature unix-only
apiarian-datadog Apr 22, 2025
630dccc
chore: more details from test errors, please
apiarian-datadog Apr 23, 2025
fff172d
chore: back to a plain fips check for ensure_crypto_provider_initialized
apiarian-datadog Apr 23, 2025
e530cd2
chore: try without nasm on windows
apiarian-datadog Apr 23, 2025
f63aca1
chore: env var differently
apiarian-datadog Apr 23, 2025
088f47c
chore: fix typo
apiarian-datadog Apr 23, 2025
95ba19f
chore: maybe we export it
apiarian-datadog Apr 23, 2025
1a29663
chore: fix equal
apiarian-datadog Apr 23, 2025
9c3cb32
chore: which quoting??
apiarian-datadog Apr 23, 2025
9b455f3
chore: move shellcheck line
apiarian-datadog Apr 23, 2025
ec00d9a
chore: we want crypto providers in tests
apiarian-datadog Apr 23, 2025
4f89ae4
chore: is test a cfg and not a feature
apiarian-datadog Apr 23, 2025
f119824
chore: are we building the wrong thing?
apiarian-datadog Apr 23, 2025
cba7c85
chore: coverage job suggests maybe we need the coverage cfg actually
apiarian-datadog Apr 23, 2025
d71a033
chore: revert compile error now that coverage is working
apiarian-datadog Apr 23, 2025
3894ba1
chore: coverage is an okay config
apiarian-datadog Apr 23, 2025
fcaa39f
chore: updating 3rd party license file
apiarian-datadog Apr 23, 2025
ef22180
chore: review fixes
apiarian-datadog Apr 24, 2025
1a60690
chore: rebase and fix lock
apiarian-datadog Apr 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ jobs:
- name: Run clippy on ${{ matrix.platform }} ${{ matrix.rust_version }}
shell: bash
run: |
if [[ "${{ matrix.platform }}" == "windows-latest" ]]; then
export AWS_LC_FIPS_SYS_NO_ASM=1
fi
# shellcheck disable=SC2046
cargo clippy --workspace --all-targets --all-features -- -D warnings $([ ${{ matrix.rust_version }} = 1.78.0 ] || [ ${{ matrix.rust_version }} = stable ] && echo -Aunknown-lints -Ainvalid_reference_casting -Aclippy::redundant-closure-call)
licensecheck:
runs-on: ubuntu-latest
name: "Presence of licence headers"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ jobs:
# Run doc tests with cargo test and run tests with nextest and generate junit.xml
run: cargo test --workspace --exclude builder --doc --verbose && cargo nextest run --workspace --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)'
env:
RUST_BACKTRACE: 1
RUST_BACKTRACE: full
- name: "[${{ steps.rust-version.outputs.version}}] Tracing integration tests: cargo nextest run --workspace --exclude builder --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'"
if: runner.os == 'Linux'
shell: bash
run: cargo nextest run --workspace --exclude builder --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'
env:
RUST_BACKTRACE: 1
RUST_BACKTRACE: full
- name: "[${{ steps.rust-version.outputs.version}}] RUSTFLAGS=\"-C prefer-dynamic\" cargo nextest run --package test_spawn_from_lib --features prefer-dynamic -E '!test(tracing_integration_tests::)'"
shell: bash
run: cargo nextest run --package test_spawn_from_lib --features prefer-dynamic -E '!test(tracing_integration_tests::)'
env:
RUSTFLAGS: "-C prefer-dynamic"
RUST_BACKTRACE: 1
RUST_BACKTRACE: full
- name: Report Test Results
if: success() || failure()
uses: mikepenz/action-junit-report@db71d41eb79864e25ab0337e395c352e84523afe # 4.3.1
Expand Down
54 changes: 25 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 5 additions & 12 deletions LICENSE-3rdparty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2492,7 +2492,7 @@ third_party_libraries:
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
- package_name: aws-lc-rs
package_version: 1.10.0
package_version: 1.13.0
repository: https://github.com/aws/aws-lc-rs
license: ISC AND (Apache-2.0 OR ISC)
licenses:
Expand Down Expand Up @@ -2905,7 +2905,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.22.0
package_version: 0.28.0
repository: https://github.com/aws/aws-lc-rs
license: ISC AND (Apache-2.0 OR ISC) AND OpenSSL
licenses:
Expand Down Expand Up @@ -15402,9 +15402,9 @@ third_party_libraries:
limitations under the License.

- package_name: itertools
package_version: 0.12.1
package_version: 0.10.5
repository: https://github.com/rust-itertools/itertools
license: MIT OR Apache-2.0
license: MIT/Apache-2.0
licenses:
- license: MIT
text: |
Expand Down Expand Up @@ -17827,13 +17827,6 @@ third_party_libraries:
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: mirai-annotations
package_version: 1.12.0
repository: https://github.com/facebookexperimental/MIRAI
license: MIT
licenses:
- license: MIT
text: NOT FOUND
- package_name: msvc-demangler
package_version: 0.10.1
repository: https://github.com/mstange/msvc-demangler-rust
Expand Down Expand Up @@ -23406,7 +23399,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.18
package_version: 0.23.23
repository: https://github.com/rustls/rustls
license: Apache-2.0 OR ISC OR MIT
licenses:
Expand Down
13 changes: 13 additions & 0 deletions ddcommon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,16 @@ use_webpki_roots = ["hyper-rustls/webpki-roots"]
# Enable this feature to enable stubbing of cgroup
# php directly import this crate and uses functions gated by this feature for their test
cgroup_testing = []
# FIPS mode uses the FIPS-compliant cryptographic provider (Unix only)
fips = ["https", "hyper-rustls/fips"]

[lints.rust]
# We run coverage checks in our github actions. These checks are run with
# --all-features which is incompatible with our fips feature. The crypto
# provider default needs to be set by the caller in fips mode. For now, we want
# to make sure that the coverage tests use the non-fips version of the crypto
# provider initialization logic, so we added a coverage cfg check on the
# function in src/connector/mod.rs. The coverage config is actually not used in
# normal environments, so we need to let the rust linter know that it is in
# fact a real thing, though one that shows up only in some situations.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)'] }
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like a comment here to explain what this is doing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

7 changes: 7 additions & 0 deletions ddcommon/src/connector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ mod https {
/// sometimes this is done as a side-effect of other operations, but we need to ensure it
/// happens here. On non-unix platforms, ddcommon uses `ring` instead, which handles this
/// at rustls initialization. TODO: Move to the more ergonomic LazyLock when MSRV is 1.80
/// In fips mode we expect someone to have done this already.
#[cfg(any(not(feature = "fips"), coverage))]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#[cfg(any(not(feature = "fips"), coverage))]
#[cfg(any(not(feature = "fips"), coverage))]

Can't there be a default here? instead of doing not feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how would we write that in a cfg line? we want this to be run in both coverage checks or for a non-fips build

fn ensure_crypto_provider_initialized() {
use std::sync::OnceLock;
static INIT_CRYPTO_PROVIDER: OnceLock<()> = OnceLock::new();
Expand All @@ -108,6 +110,11 @@ mod https {
});
}

// This actually needs to be done by the user somewhere in their own main. This will only
// be active on Unix platforms
#[cfg(all(feature = "fips", not(coverage)))]
fn ensure_crypto_provider_initialized() {}

#[cfg(feature = "use_webpki_roots")]
pub(super) fn build_https_connector_with_webpki_roots() -> anyhow::Result<
hyper_rustls::HttpsConnector<hyper_util::client::legacy::connect::HttpConnector>,
Expand Down
5 changes: 5 additions & 0 deletions local-linux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ RUN apt-get update && \
protobuf-compiler \
docker.io \
sudo \
wget \
&& rm -rf /var/lib/apt/lists/*

# We need go in order to build aws-lc-fips-sys
RUN wget -O go1.24.2.linux-arm64.tar.gz https://go.dev/dl/go1.24.2.linux-arm64.tar.gz \
&& tar -C /usr/local -xzf go1.24.2.linux-arm64.tar.gz

# Docker-in-Docker configuration (necessary for integration tests)
RUN mkdir -p /var/lib/docker
EXPOSE 2375
Expand Down
2 changes: 2 additions & 0 deletions trace-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ test-utils = [
]
proxy = ["hyper-http-proxy"]
compression = ["zstd", "flate2"]
# FIPS mode uses the FIPS-compliant cryptographic provider (Unix only)
fips = ["ddcommon/fips"]
Loading