← Back to Pull requests

feat(otel-agent): Ship secret-generic-connector in the standalone image #61245

Closed
unknown closed this pull request without merging on Nov 30, 2026 09:57 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 14:58 UTC
Author

What does this PR do?

Adds secret-generic-connector to the standalone non-FIPS otel-agent image at /opt/datadog-agent/embedded/bin/secret-generic-connector, the path the secrets component runs it from when secret_backend_type is set. The image jobs take the binary from the existing secret_generic_connector-build_ jobs, the same way the cluster-agent image gets it.

It also makes the connector usable in the FIPS image, which already had one from its base (the FIPS Agent image) but couldn't start it: the final stage is split into release and release-fips, and the latter, which the FIPS jobs now target, sets OPENSSL_CONF and OPENSSL_MODULES to the embedded OpenSSL.

<details>
<summary>Functional changes</summary>

| Before | After |
| --- | --- |
| Standalone non-FIPS otel-agent image with secret_backend_type set (e.g. DD_SECRET_BACKEND_TYPE=hashicorp.vault): ENC[] resolution fails at startup because the connector doesn't exist, and otel-agent exits | The connector ships at that path, and ENC[] handles are resolved by the configured backend |
| Standalone FIPS otel-agent image with secret_backend_type set: otel-agent exits at startup (failed to resolve secrets), the connector panicking with FIPS mode requested … but not available | The connector starts and resolves ENC[] handles |
| — | In the non-FIPS image, the connector is 0550 root:root: root, dd-agent (uid 100, group 0), and any UID in group 0 (OpenShift) can run it; UIDs outside group 0 can't |
| CI: the otel-agent image builds didn't check the connector | Each image build fails if the connector is missing or can't start; the non-FIPS jobs also wait for secret_generic_connector-build_{amd64,arm64} |

Unchanged: secret_backend_command setups; the Agent and Agent+DDOT images; the otel-agent binary.

</details>

Motivation

OTAGENT-1480

Standalone DDOT supports secret_backend_type, but the non-FIPS image is built from agent-base-image, which doesn't have the connector. Found while dogfooding standalone DDOT on a staging cluster, where an init container had to copy the binary out of the Agent image to read the API key from Vault.

The FIPS image, built from the full FIPS Agent image, has the connector, but it panics on start in every FIPS Agent image since 7.77.0: it has no RPATH, so it loads Ubuntu's libcrypto (3.0.13) instead of the embedded one. The core Agent doesn't hit it because its Python init sets OPENSSL_CONF/OPENSSL_MODULES in-process (pkg/collector/python/init.go), which the connector inherits; otel-agent has no Python. The root cause is fixed in #61380 (RPATH to /opt/datadog-agent/embedded/lib); the two variables can be dropped from this image once it lands.

The image grows by ~13 MB.

Describe how you validated your changes

Built the image locally with podman:

  • Non-FIPS (Ubuntu base + connector in the build context): installed 0550 root:root; runs as 100:0 and 5000:0, refused for 1000:1000; resolves a file.json request when run as dd-agent.

  • FIPS (agent:7.86.0-fips base, no connector in the build context): --target release-fips passes and the connector, run as dd-agent with only the image's environment, resolves a file.json request; --target release fails the build with the panic.

  • No connector anywhere: the build fails at the --version step.

  • Public ddot-collector:7.86.0-fips with DD_API_KEY=ENC[api_key] and DD_SECRET_BACKEND_TYPE=file.json exits at startup, and resolves the key once the two variables are set.
  • Buildah rejects a COPY glob that matches nothing, unlike BuildKit, hence the single COPY otel- secret-generic-connector*.

    Not tested: the Dockerfile's build-from-source path. qa/rc-required to check ENC[] resolution on the published images.

    🤖 Generated with Claude Code

    [OTAGENT-1480]: https://datadoghq.atlassian.net/browse/OTAGENT-1480?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 515 lines (+386 / -129) across 6 files Reviewer: alopezz Review duration: 8339m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.71) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.71 · 515 lines diff across 6 files
    0.71
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.374
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.071
    Real PR Conversation Timeline
    1 comments
    "Review active on #61245"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 70.9% (HIGH) · Higher = larger blast radius
    70.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.0% · Safe to merge
    28.0%