test(ffe): validate Java agentless exposure egress - #7494
Conversation
|
|
|
21c6a56 to
366ac3b
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for capturing agentless Java Spring Boot exposure egress through the HTTPS proxy by injecting the proxy CA into the JVM trust store and tightening/streamlining exposure-event synchronization in tests.
Changes:
- Introduces a Java startup wrapper that imports the mitmproxy CA into a temporary truststore and points the JVM at it.
- Updates the agentless end-to-end scenario to mount the wrapper + CA cert only for the Java
spring-bootvariant and set HTTPS proxy JVM properties. - Refactors exposure tests/utilities to wait explicitly for exposure events and updates manifest gating for Java tracer versions.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/build/docker/java/app-with-proxy-ca.sh | New Java entrypoint wrapper that installs proxy CA into a temp truststore and starts the Spring Boot app. |
| utils/_context/_scenarios/agentless_endtoend.py | Configures the Java Spring Boot container to use the wrapper + proxy CA when exposure egress is enabled. |
| tests/test_the_test/test_mock_ffe_agentless_backend.py | Adds a regression test ensuring only the standard Java Spring Boot variant is modified by the wrapper logic. |
| tests/ffe/utils/exposures.py | Extracts “wait for exposure event” into a reusable helper used by contract assertions. |
| tests/ffe/test_exposure_egress.py | Adjusts UFC fixture/expectations and adds an explicit wait for the exposure event during setup. |
| manifests/java.yml | Updates the Java manifest to gate agentless direct exposure egress on tracer version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| library_container.environment["JAVA_OPTS"] = ( | ||
| f"-Dhttps.proxyHost=proxy -Dhttps.proxyPort={ProxyPorts.datadog_direct}" |
| -keystore "${trust_store}" \ | ||
| -storepass changeit | ||
|
|
||
| JAVA_OPTS="${JAVA_OPTS:-} -Djavax.net.ssl.trustStore=${trust_store} -Djavax.net.ssl.trustStorePassword=changeit" |
| # shellcheck disable=SC2086 | ||
| exec java -Xmx362m ${JAVA_OPTS} -javaagent:/app/dd-java-agent.jar -jar /app/app.jar ${APP_EXTRA_ARGS:-} |
| egress = exposure_egress() | ||
| wait_for_exposure_event( | ||
| egress.interface, | ||
| flag_key=self.flag_key, | ||
| targeting_key=self.targeting_key, | ||
| ) |
Motivation
Java agentless Feature Flags can deliver exposures through a local EVP proxy or authenticated direct intake. System tests must validate each supported route without changing unrelated Java weblog startup.
Changes and Decisions
serverless-initexposure validation for Java.serverless-initroutes.Validation
9b8d7589aawith the Spring Boot weblog.serverless-initroutes each passed.