Repository navigation
test(e2e): port corporate-proxy tests from e2e/rust to features/corporate-proxy - #5786
Draft
matthewgrossman wants to merge 15 commits into
Conversation
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…settings Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…ting proxy
Run one corporate proxy in the guest that serves TLS, requires Basic auth and
intercepts the TLS in every tunnel with its own CA. It merges the three
fixture proxies from the legacy corporate-proxy tests into one asyncio
service, since TLS inside the listener's TLS needs asyncio's start_tls.
Point the gateway's driver at it through the gateway_overrides role, with a
port-qualified no_proxy entry, and publish
OPENSHELL_TEST_CORPORATE_PROXY_{URL,CA_CERT,BYPASS_PORT,LOG}.
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…ONNECT log Read OPENSHELL_TEST_CORPORATE_PROXY_* and parse the proxy's JSON-lines log from a cursor, so a test sees only the CONNECTs its own sandbox made. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…ers/matthewgrossman' into test/5730-port-corporate-proxy-tests/matthewgrossman Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…ariable Follow the environment contract's OPENSHELL_TEST_<SERVICE>_LISTEN name for an address the environment picks and a test binds. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Check sandbox egress through the environment's corporate proxy: approved requests are proxied with credentials and a validated IP target, denied ones never reach the proxy, the no_proxy port is dialed direct, and on Podman the per-sandbox credentials secret goes away with the sandbox. A second test checks that the supervisor and the workload both trust the intercepting proxy's CA. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…ments Add features/corporate-proxy rows for the rootful Docker and the rootful and rootless Podman corporate-proxy environments, and list the environment's OPENSHELL_TEST_CORPORATE_PROXY_* variables in the contract table. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
features/corporate-proxy replaces them. Their TOML-editing helper test checked only the file's own helper, so it goes with the file. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
matthewgrossman
force-pushed
the
test/5728-share-environment-helpers/matthewgrossman
branch
from
November 20, 2026 05:50
d1cf453 to
8005863
Compare
…matthewgrossman Take #5728's side for the files it owns, and publish the bypass port as OPENSHELL_TEST_CORPORATE_PROXY_BYPASS_PORT, following its renamed OPENSHELL_TEST_<SERVICE>_PORT convention. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Member
Author
|
/ok to test 7272553 |
|
Label |
Sandbox creation fails there because Podman can't relabel the root-owned proxy CA bind mount. Tracked in #5795. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Member
Author
|
/ok to test b483569 |
…ers/matthewgrossman' into test/5730-port-corporate-proxy-tests/matthewgrossman Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port the Docker and Podman corporate-proxy e2e tests to a testkit feature suite,
features/corporate-proxy. It runs on a new static<base>-corporate-proxytmachine environment. That environment runs one corporate proxy that does Basic auth, serves TLS and intercepts TLS, and points the gateway's driver at it.Related Issue
Closes #5730
Part of #5281
Stacks on #5780 (#5728), whose branch is merged in. That brings in the host-server TLS servers and fixed listen port, the
gateway_overridesrole and the environment contract table.Changes
tests/tmachine: newcorporate_proxyrole,corporate-proxy.yamlplaybook andcorporate-proxyfeature on the Docker and Podman bases.files/corporate-proxy.py, Python 3.11+), run as a systemd service with its own CA from openssl.gateway_overrides:https_proxy,proxy_auth_file,proxy_ca_bundle, and a port-qualifiedno_proxy.OPENSHELL_TEST_CORPORATE_PROXY_{URL,CA_CERT,BYPASS_PORT,LOG}.tests/support/corporate-proxy: new fixture that reads those variables and parses the proxy's log after a cursor.tests/support/container-engine:Engine::secret_exists, for the Podman secret check.tests/suites/features/corporate-proxy, two tests:approved_egress_uses_authenticated_proxy:openshell-proxy-auth-<id>secret exists while it runs and is gone after delete.intercepting_proxy_ca_is_trusted_by_supervisor_and_workload: the supervisor (on the inspected endpoint) and the workload (on thetls: skipendpoint) both trust the proxy's re-signed certificates, and the denied request never reaches the proxy..github/workflows/e2e-suites.yml: rows forubuntu-docker-rootful-corporate-proxyandfedora-podman-rootful-corporate-proxy.e2e/rust/tests/docker_corporate_proxy.rsandpodman_corporate_proxy.rs, plus their references ine2e/rust/Cargo.toml,e2e-podman.sh,tests/tmachine/artifacts.nixandTESTING.md.Behavior changes from the legacy tests
http://proxy withproxy_auth_allow_insecure. The suite now uses onehttps://proxy with Basic auth andproxy_ca_bundle, soallow_insecureis not needed. Thehttp://proxy scheme is no longer tested on its own.tls: skip) endpoint uses its own random port. The bypass port is always inno_proxy, so it can't serve as that endpoint.proxy_settings_are_inserted_before_nested_driver_tablesis deleted, not moved. It tested the legacy file's own TOML-editing helper, not gateway code.z. Tracked in test(features): corporate-proxy sandboxes fail to start on rootless Podman: proxy CA relabel denied #5795.Testing
cargo fmt,cargo clippy -D warningsand unit tests forcorporate-proxy-support,container-engine-supportand thecorporate-proxysuite (--listshows both tests).intercepted, 407 (missing and wrong auth), 502 andclient_tls_failedresults, and the role's readiness check passes. ruff and ansible-lint are clean for the new files.cargo checkfore2e/rustwithe2e-docker,e2e-podmanafter the deletions.Checklist