return true;
}
@Override
public void initializeSecurity(TCredentials itw, String rootuser) throws AccumuloSecurityException {
IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
// create the root user with all system privileges, no table privileges, and no record-level authorizations
Set<SystemPermission> rootPerms = new TreeSet<SystemPermission>();
for (SystemPermission p : SystemPermission.values())
rootPerms.add(p);
Map<String,Set<TablePermission>> tablePerms = new HashMap<String,Set<TablePermission>>();
// Allow the root user to flush the !METADATA table
tablePerms.put(Constants.METADATA_TABLE_ID, Collections.singleton(TablePermission.ALTER_TABLE));
try {
// prep parent node of users with root username
if (!zoo.exists(ZKUserPath))
zoo.putPersistentData(ZKUserPath, rootuser.getBytes(Constants.UTF8), NodeExistsPolicy.FAIL);
initUser(rootuser);
zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserAuths, ZKSecurityTool.convertAuthorizations(Constants.NO_AUTHS), NodeExistsPolicy.FAIL);
} catch (KeeperException e) {
log.error(e, e);
throw new RuntimeException(e);
} catch (InterruptedException e) {
log.error(e, e);