Repository navigation
Conversation
… env vars (#445) Integration tests set ORBIT_OUTBOUND_ALLOWED_HOSTS=127.0.0.1 (the outcome-writer test and, through a Once, the output-delivery tests) and ORBIT_LICENSE_PUBLIC_KEYS process-wide and never unset them. Every outbound check read the environment on each call, so whether the Kubernetes guard test saw loopback refused depended on which test ran first. The S3 delivery tests only passed because of that leak. - AppState gains `outbound: OutboundPolicy`, read once from ORBIT_OUTBOUND_* at startup. Work sources (dispatcher, team outcomes), output delivery and credential checks, provider and connection probes, connection URL validation and portable import use it instead of `OutboundPolicy::from_env()` / `guarded_client`. - `S3Client::with_policy` lets the API pass its policy; `S3Client::new` (the worker) still reads the environment. The orbit-s3 unit tests use the injected policy too. - Tests: `test_app_allowing_loopback` exempts 127.0.0.1 in one app's state only; `licensed_test_app` installs a verified licence status instead of signing a token against an env-supplied key. New `outbound_policy_is_per_app_state` shows a loopback-allowing app and a default app side by side. No `std::env::set_var` is left in crates/*/tests. - AGENTS.md: connector probes use the API's policy. Finding 2 was fixed in #472, so this completes #445. The Kubernetes connector crate still reads the policy from the environment (only the worker and the API's Kubernetes test path use it; #497 moves it onto the client config). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #445 (finding 1; finding 2 was fixed in #472).
Summary
Integration tests set ORBIT_OUTBOUND_ALLOWED_HOSTS=127.0.0.1 (the outcome-writer
test and, through a Once, the output-delivery tests) and ORBIT_LICENSE_PUBLIC_KEYS
process-wide and never unset them. Every outbound check read the environment on each
call, so whether the Kubernetes guard test saw loopback refused depended on which test
ran first. The S3 delivery tests only passed because of that leak.
outbound: OutboundPolicy, read once from ORBIT_OUTBOUND_* atstartup. Work sources (dispatcher, team outcomes), output delivery and credential
checks, provider and connection probes, connection URL validation and portable import
use it instead of
OutboundPolicy::from_env()/guarded_client.S3Client::with_policylets the API pass its policy;S3Client::new(the worker)still reads the environment. The orbit-s3 unit tests use the injected policy too.
test_app_allowing_loopbackexempts 127.0.0.1 in one app's state only;licensed_test_appinstalls a verified licence status instead of signing a tokenagainst an env-supplied key. New
outbound_policy_is_per_app_stateshows aloopback-allowing app and a default app side by side. No
std::env::set_varis leftin crates/*/tests.
Finding 2 was fixed in #472, so this completes #445. The Kubernetes connector crate still reads the policy from
the environment (only the worker and the API's Kubernetes test path use it; #497 moves
it onto the client config).
Testing
cargo fmt --check,clippy --workspace --all-targets -D warnings: cleancargo test --workspacewith a database: 762 passed, 0 failedgrep std::env::set_var crates/*/tests: noneoutbound_policy_is_per_app_state; the Kubernetes guard test passes alone and in a single-threaded run with the 13 delivery testspnpm docs:check: passedRemoving the leak exposed three S3 delivery tests that only passed because another test had allowed loopback;
S3Client::with_policyfixes that. Conflicts with #497 incatalog.rsandimport_portable.rs(thevalidate_connection_configrename); whichever merges second needs a merge.🤖 Generated with Claude Code