-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
acl for zookeeper is added #2258
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
package io.druid.curator; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.common.base.Preconditions; | ||
|
||
import javax.validation.constraints.Min; | ||
|
||
|
@@ -37,6 +38,9 @@ public class CuratorConfig | |
@JsonProperty("compress") | ||
private boolean enableCompression = true; | ||
|
||
@JsonProperty("acl") | ||
private boolean enableAcl = false; | ||
|
||
public String getZkHosts() | ||
{ | ||
return zkHosts; | ||
|
@@ -57,13 +61,25 @@ public void setZkSessionTimeoutMs(Integer zkSessionTimeoutMs) | |
this.zkSessionTimeoutMs = zkSessionTimeoutMs; | ||
} | ||
|
||
public Boolean getEnableCompression() | ||
public boolean getEnableCompression() | ||
{ | ||
return enableCompression; | ||
} | ||
|
||
public void setEnableCompression(Boolean enableCompression) | ||
{ | ||
Preconditions.checkNotNull(enableCompression, "enableCompression"); | ||
this.enableCompression = enableCompression; | ||
} | ||
|
||
public boolean getEnableAcl() | ||
{ | ||
return enableAcl; | ||
} | ||
|
||
public void setEnableAcl(Boolean enableAcl) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @drcrallen if someone typos a config, you want an error thrown versus a default value set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. allright that's reasonable. Can it be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also a unit test to verify the behavior would be awesome. (but IMHO not required) |
||
{ | ||
Preconditions.checkNotNull(enableAcl, "enableAcl"); | ||
this.enableAcl = enableAcl; | ||
} | ||
} |
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.
Is it possible this might break indexing service? The overlord currently has to delete nodes created by peons. Is that still possible if only the node creator has permissions to those nodes?
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.
Not sure. @genevien do you know?
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.
@xvrl @fjy Inconsistency in acl config might cause some problems. I assume that person who enables it for one service does it consciously and also enables it for other services. Some warning may be added in the documentation.
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.
@genevien This config will go in the common runtime properties file so it should be applied to every node in Druid. Do you know if Druid servers on different IPs creating Znodes will cause any issues?
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.
@fjy in our environment we have separate properties files for each node, that's why I've mentioned it. Could you give more details for the situation you are asking about?
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.
@genevien ah, usually we recommend having a common.runtime.properties file that holds the configuration that is common to the cluster (ZK IP, metastore location, deep storage location, etc). This common configuration file is copied and included in the classpath of every node. This new ACL config should be a part of the common configuration. It should like though, with proper configuration, things will work.
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.
@fjy ok, thank you. In theory and in my environment it works, so we have to wait until someone need it and try it in the future.