Intel-bigdata / SSM

Smart Storage Management for Big Data, a comprehensive hot/cold data optimized solution
Apache License 2.0
133 stars 67 forks source link

Add whitelist filter for action and rule. #2199

Closed lipppppp closed 3 years ago

lipppppp commented 3 years ago

As we discussed, whitelist function should also filter related rules and actions except filtering namespace. So, I add check method to filter path in rule and action submitting process. This ensures that the SSM layer only covers the paths in the whitelist.

PHILO-HE commented 3 years ago

There is a check style issue.

[ERROR] src/main/java/org/smartdata/server/engine/RuleManager.java:[25] (imports) ImportOrder: Import org.smartdata.conf.SmartConf appears after other imports that it should precede.

lipppppp commented 3 years ago

Good suggestion. I will move these methods to WhitelistHelper and make them static. And let the method return true/false. The exception will be thrown by the judgement result.

PHILO-HE commented 3 years ago

Committed the patch, thanks for your continuous contribution!