-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Adding controller config for disabling Groovy in ingestionConfig #8169
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
Conversation
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
Outdated
Show resolved
Hide resolved
cb5693b to
b4a3fc9
Compare
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
Outdated
Show resolved
Hide resolved
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
Outdated
Show resolved
Hide resolved
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
Outdated
Show resolved
Hide resolved
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.
Let's add a method isGroovyExpression() instead of passing disableGroovy to the getter
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.
So are you saying that we first call isGroovyExpression(String transformExpression, boolean disableGroovy) and pass the return value to the getter? i.e.
public static FunctionEvaluator getExpressionEvaluator(String transformExpression, boolean isGroovyExpression).
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.
Basically adding a method public static boolean isGroovyExpression(String transformExpression). The table config validator can call this method, and throw exception if it returns true
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.
Updated. Let me know if this was what you were thinking.
Codecov Report
@@ Coverage Diff @@
## master #8169 +/- ##
=======================================
Coverage 30.67% 30.68%
=======================================
Files 1612 1612
Lines 83962 83970 +8
Branches 12602 12604 +2
=======================================
+ Hits 25754 25764 +10
+ Misses 55919 55917 -2
Partials 2289 2289
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
01ba3ca to
38e0d00
Compare
Description
This change adds a broker config for disabling Groovy transform and filter functions in the table ingestion config as it is a security risk. See Github issue #7966. By default, Groovy is allowed for backwards compatibility to not break existing use cases which currently use Groovy.
This PR is a follow up to #8159 which adds the broker config for disabling groovy in Pinot queries.
Testing
Added unit tests and tested config with quick-start config override.
Upgrade Notes
Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
backward-incompat, and complete the section below on Release Notes)Does this PR fix a zero-downtime upgrade introduced earlier?
backward-incompat, and complete the section below on Release Notes)Does this PR otherwise need attention when creating release notes? Things to consider:
release-notesand complete the section on Release Notes)Release Notes
Introduced new config for disabling Groovy in ingestionConfig:
controller.disable.ingestion.groovy. If not defined, defaults tofalse.