GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — [connectors] Optionally refuse local file URIs by swanandx · Pull Request #7737 · feldera/feldera Conversation
|
| /// The local paths of a Delta Lake or Iceberg connector, as (property, value) pairs. | ||
| /// Before references are `resolved`, skips them. After, checks every value, because a | ||
| /// resolved value can look like a reference. | ||
| pub fn local_file_uris(&self, resolved: bool) -> Vec<(&'static str, &str)> { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
tech-debt (medium): the only production caller passes resolved = true. The false branch, which skips anything that parses as a reference, is reached only from tests. That makes it a public API that can return a false "no local paths" for ${env:X}. If no pre-resolution caller is planned (for example, validation in the manager), drop the parameter and always check every value.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Kept: the enterprise Kubernetes runner calls this with false before secrets are resolved, so it can refuse the pipeline before it starts.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| fn local_file_uris_refused() -> bool { | ||
| std::env::var(feldera_types::config::REFUSE_LOCAL_FILE_URIS_ENV).is_ok_and(|v| v == "true") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
missing (medium): no test covers this toggle or the add_input_endpoint/add_output_endpoint wiring. Both tests call resolve_connector_config with refuse_local hard-coded. Nothing fails if the env var name is wrong, if a value such as "TRUE" or "1" is silently ignored (only "true" turns the check on), or if a call site goes back to calling resolve_secret_references_in_connector_config directly. Suggestion: pass the flag in from the controller config, or add one test that starts a controller with a file:// delta output and expects invalid_transport_configuration. Also consider rejecting values that are neither true nor false, instead of failing open.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed the fail-open: only unset, empty, false or 0 allow local paths now, with a test. No end-to-end test: the env var is process-wide and would break the local Delta tests that run in the same process. The cluster test of the runner change covers the wiring.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
What I ran
Findings
No hard gate fails: tests exist, nothing is flaky, there is no |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
5fa26f4 to
3a55908
Compare
|
fred-review did not finish; see https://github.com/feldera/feldera/actions/runs/41063206240 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Delta and Iceberg connectors can read pod files through file:// or a path without a scheme. This bypasses pipeline.deniedConnectors. With FELDERA_REFUSE_LOCAL_FILE_URIS=true, refuse such a path in the connector config, after secrets and env vars are resolved. Signed-off-by: Swanand Mulay <[email protected]>
3a55908 to
30712c2
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.