Repository navigation
[CALCITE-7860] Add controls for remote fetches on file adapter - #5334
Conversation
20c90b4 to
dc99b69
Compare
zabetak
left a comment
There was a problem hiding this comment.
Instead of adding two new properties for filtering URLs based on protocols and hosts why not simply going for a single property defining a list of allowed URL prefixes (e.g., calcite.file.urls.allowed). This would simplify documentation, implementation, and usage.
|
@zabetak what about proposing something like
|
|
for(String prefix: allowedPrefixes) {
if(url.startWith(prefix) {
return true;
}
}
return false;As a conf separator the pipe char |
|
startsWith check might be a bit problematic ( |
zabetak
left a comment
There was a problem hiding this comment.
The regex based proposal LGTM! I left some minor refactor/nit suggestions to handle at your discretion.
|
Thanks for the review @zabetak ! I think I have applied all your suggestions. If you want to take another look, please let me know if you have any further remark. |
604d8e4 to
066ec8b
Compare
|
|
Thanks @zabetak for your help here! |



Jira Link
CALCITE-7860
Changes Proposed
Disable remote fetches by default to comply with threat model. Add new opt-in property to enable this feature.