public class ACLProvider implements com.netflix.curator.framework.api.ACLProvider { @Override public List<ACL> getAclForPath(String path) { // The first letter of the path is the ACL id final String firstLetter = String.valueOf(path.charAt(1)); final Id FIRST_USER_LETTER = new Id("user", firstLetter); // Create a new ACL with the first letter of the path as // an ID and give all permissions for users ACL acl = new ACL(Perms.ALL, FIRST_USER_LETTER); return Collections.singletonList(acl); } }