-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fail loading an ACL config if the provided file is empty and enforceTableACLConfig is true #17274
base: main
Are you sure you want to change the base?
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: garfthoffman <[email protected]>
47325bb
to
c636acf
Compare
@@ -367,7 +367,8 @@ func (tsv *TabletServer) initACL(tableACLConfigFile string, enforceTableACLConfi | |||
tsv.ClearQueryPlanCache() | |||
}, | |||
) | |||
if err != nil { | |||
// Log failure if either there was a problem loading the ACL, or if the ACL is empty | |||
if err != nil || tableacl.GetCurrentConfig().String() == "" { |
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.
I'm not sure if this is the correct place to perform this validation. I think a config file containing an empty JSON object should be treated as "valid", but a truncated file seems like a pretty clear configuration mistake. 🤔
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.
Addressed in eca5d61
Signed-off-by: garfthoffman <[email protected]>
Signed-off-by: garfthoffman <[email protected]>
Signed-off-by: garfthoffman <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17274 +/- ##
=======================================
Coverage 67.37% 67.37%
=======================================
Files 1573 1573
Lines 253113 253116 +3
=======================================
+ Hits 170538 170544 +6
+ Misses 82575 82572 -3 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Description
When the ACL file is loaded, add a check to verify that the config is not empty and fail execution if the
--enforce-tableacl-config
flag has been provided.Related Issue(s)
closes #17273
Checklist
Deployment Notes