tinaselenge commented on code in PR #14995:
URL: https://github.com/apache/kafka/pull/14995#discussion_r1440994447
##########
clients/src/main/java/org/apache/kafka/common/config/provider/FileConfigProvider.java:
##########
@@ -40,7 +44,21 @@ public class FileConfigProvider implements ConfigProvider {
private static final Logger log =
LoggerFactory.getLogger(FileConfigProvider.class);
+ public static final String ALLOWED_PATHS_CONFIG = "allowed.paths";
+ public static final String ALLOWED_PATHS_DOC = "Path that this config
provider is allowed to access";
+ private List<Path> allowedPaths;
+
public void configure(Map<String, ?> configs) {
+ if (configs.containsKey(ALLOWED_PATHS_CONFIG)) {
+ String configValue = (String) configs.get(ALLOWED_PATHS_CONFIG);
+
+ if (configValue != null && !configValue.isEmpty()) {
Review Comment:
If the user configure the config with null or empty value, should that be
considered as a bad value or should that be considered same as not setting it,
therefore allowing access to all paths?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]