-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strip Matrix parameter from BasePath check #14383
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14383 +/- ##
============================================
+ Coverage 61.75% 63.78% +2.03%
- Complexity 207 1555 +1348
============================================
Files 2436 2660 +224
Lines 133233 145967 +12734
Branches 20636 22350 +1714
============================================
+ Hits 82274 93101 +10827
- Misses 44911 45985 +1074
- Partials 6048 6881 +833
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, the intention is to avoid bypassing the isBaseFile()
check?
What is the purpose of isBaseFile()
? I'd suggest making it very limited (e.g. only allow "."
, or is it even required?)
@Jackie-Jiang I’m not aware of the historical reasons for why this check is necessary, This type of check is generally used to filter paths, likely to allow access only to certain files, such as configuration files or top-level resources, while excluding directories and complex paths. For example : The check we have already ensures we don't allow for directory access and just top-level resources like Do we want to allow for something like just |
@soumitra-st Can you help take a look? Which path do we need to allow bypassing the auth check? I want to make this whitelist very restricted so that only the allowed path can bypass the auth check. This way we can avoid other possible attacks, instead of explicitly handling them one by one. |
@praveenc7 ,Pinot does not support MatrixParam. Can you elaborate on the context of handling MatrixParam for top-level resources only? |
The current whitelist paths are HERE: In addition to the above whitelisted paths, all top files having at least one '.' are allowed. This is likely done to allow access to top-level resource files. If we need to remove implicit access to all the top-level resources, we must figure out the list and add it to the UNPROTECTED_PATHS. |
Summary
Modify Parser to strip matrix parameter when checking for basePath
Testing
unit test added